Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with intersection on CompoundCurve's and CurvePolygon's #9382

Closed
OWiger opened this issue Mar 5, 2024 · 2 comments
Closed

Problem with intersection on CompoundCurve's and CurvePolygon's #9382

OWiger opened this issue Mar 5, 2024 · 2 comments
Assignees

Comments

@OWiger
Copy link

OWiger commented Mar 5, 2024

Hi!

I'm running into problems using the OgrGeometry intersection function on geometry built using compound curve. I get this error message:

ERROR 1: Non contiguous curves

and for CurvePolygons I get the additional message:

Warning 1: Non closed ring detected. To avoid accepting it, set the OGR_GEOMETRY_ACCEPT_UNCLOSED_RING configuration option to NO

I've checked all sub geometries to see if they in fact are not contiguous, but as far as I can see, they are.

The operation works in QGIS, but it seems that the geometry is linearized in order to get a result, and this works as well using gdal/ogr, but I get the same error if I try to convert the result back into curved geometry.

Example object I want to clip:

MULTISURFACE (CURVEPOLYGON (COMPOUNDCURVE ((299507.39 6695735.55,299506.99 6695732.33,299507.04 6695732.37,299507.53 6695732.73,299507.99 6695733.03,299508.41 6695733.27,299508.62 6695733.38,299508.85 6695733.48,299509.15 6695733.62,299509.2 6695733.64,299509.57 6695733.79,299509.93 6695733.91,299510.28 6695734.02,299510.62 6695734.1,299510.95 6695734.18,299511.27 6695734.24,299511.58 6695734.28,299511.89 6695734.32,299512.22 6695734.34,299512.49 6695734.35,299512.78 6695734.36,299513.06 6695734.35,299513.34 6695734.34,299513.62 6695734.32,299513.89 6695734.29,299514.16 6695734.25,299514.42 6695734.21,299514.68 6695734.16,299514.93 6695734.1,299515.18 6695734.04,299515.43 6695733.97,299515.68 6695733.89,299515.92 6695733.81,299516.15 6695733.72,299516.29 6695733.66,299516.45 6695733.6,299516.6 6695733.53,299516.76 6695733.45,299517.0 6695733.33,299517.16 6695733.25,299517.32 6695733.16,299517.47 6695733.07,299517.63 6695732.98,299517.79 6695732.88,299517.95 6695732.77,299518.1 6695732.67,299518.26 6695732.55,299518.41 6695732.44,299518.57 6695732.31,299518.72 6695732.19,299518.88 6695732.06,299519.03 6695731.92,299519.18 6695731.78,299519.33 6695731.63,299519.48 6695731.47,299519.63 6695731.32,299519.77 6695731.15,299519.92 6695730.98,299520.06 6695730.8,299520.2 6695730.62,299520.34 6695730.43,299520.47 6695730.23,299520.6 6695730.03,299520.73 6695729.82,299520.85 6695729.6,299520.97 6695729.38,299521.09 6695729.15,299521.2 6695728.91,299521.31 6695728.67,299521.41 6695728.42,299521.45 6695728.29,299521.5 6695728.16,299521.55 6695728.03,299521.59 6695727.9,299521.63 6695727.77,299521.67 6695727.63,299521.71 6695727.49,299521.74 6695727.35,299521.8 6695727.12,299521.84 6695726.93,299521.87 6695726.78,299521.89 6695726.63,299521.92 6695726.49,299521.94 6695726.34,299521.96 6695726.19,299521.97 6695726.03,299521.99 6695725.88,299522.0 6695725.72,299522.01 6695725.57,299522.02 6695725.41,299522.02 6695725.25,299522.02 6695725.09,299522.02 6695724.93,299522.01 6695724.77,299522.0 6695724.53,299521.99 6695724.39,299521.97 6695724.12,299521.93 6695723.86,299521.86 6695723.34,299521.8 6695723.02),CIRCULARSTRING (299521.8 6695723.02,299521.59 6695722.2,299521.31 6695721.4),(299521.31 6695721.4,299521.05 6695720.79,299518.66 6695716.32,299504.68 6695689.87,299504.39 6695689.3,299504.15 6695688.81,299503.92 6695688.31,299503.7 6695687.81,299503.49 6695687.3,299503.29 6695686.78,299503.1 6695686.27,299502.92 6695685.75,299502.75 6695685.23,299502.59 6695684.7,299502.44 6695684.17,299502.3 6695683.64,299502.17 6695683.1,299502.06 6695682.56,299501.95 6695682.02,299501.86 6695681.48,299501.77 6695680.94,299501.7 6695680.39,299501.64 6695679.84,299501.59 6695679.3,299501.55 6695678.75,299501.52 6695678.2,299501.5 6695677.65,299501.49 6695677.1,299501.5 6695676.55,299501.51 6695676.0,299501.54 6695675.45,299501.57 6695674.9,299501.62 6695674.35,299501.68 6695673.8,299501.75 6695673.26,299501.83 6695672.71,299501.92 6695672.17,299502.03 6695671.63,299502.14 6695671.09,299502.26 6695670.56,299502.4 6695670.02,299502.54 6695669.49,299502.7 6695668.96,299502.86 6695668.44,299503.04 6695667.92,299503.23 6695667.4,299503.43 6695666.89,299503.63 6695666.38,299503.83 6695665.91,299504.08 6695665.37,299504.41 6695664.68,299504.56 6695664.4,299505.04 6695663.47,299505.53 6695662.56,299506.04 6695661.65,299506.57 6695660.75,299507.11 6695659.86,299507.66 6695658.98,299508.23 6695658.1,299508.81 6695657.24,299509.41 6695656.39,299510.02 6695655.55,299510.65 6695654.71,299511.29 6695653.89,299511.94 6695653.08,299512.61 6695652.28,299513.29 6695651.49,299513.99 6695650.71,299514.69 6695649.95,299515.41 6695649.19,299515.85 6695648.75,299522.08 6695642.45,299522.21 6695642.31,299522.34 6695642.16,299522.5 6695641.98,299522.65 6695641.79,299522.79 6695641.6,299522.92 6695641.4,299523.05 6695641.19,299523.17 6695640.98,299523.28 6695640.77,299523.38 6695640.55,299523.47 6695640.33,299523.56 6695640.11,299523.64 6695639.88,299523.71 6695639.65,299523.77 6695639.42,299523.82 6695639.18,299523.87 6695638.95,299523.9 6695638.71,299523.93 6695638.47,299523.94 6695638.23,299523.95 6695637.97,299523.95 6695637.71,299523.94 6695637.51,299523.92 6695637.27,299523.9 6695637.03,299523.86 6695636.79,299523.81 6695636.56,299523.76 6695636.32,299523.7 6695636.09,299523.63 6695635.86,299523.55 6695635.64,299523.46 6695635.41,299523.37 6695635.19,299523.26 6695634.98,299523.15 6695634.76,299523.03 6695634.55,299522.9 6695634.35,299522.77 6695634.15,299522.63 6695633.96,299522.48 6695633.77,299522.32 6695633.59,299522.14 6695633.39,299523.95 6695631.64),CIRCULARSTRING (299523.95 6695631.64,299526.49 6695636.88,299525.28 6695642.57),(299525.28 6695642.57,299525.27 6695642.6,299525.25 6695642.62),CIRCULARSTRING (299525.25 6695642.62,299524.18 6695644.05,299522.85 6695645.24),(299522.85 6695645.24,299519.85 6695648.29,299517.68 6695650.45,299515.68 6695652.54,299514.47 6695653.96,299513.31 6695655.34,299512.26 6695656.76,299510.88 6695658.7,299509.18 6695661.31,299507.91 6695663.45,299507.0 6695665.14,299506.15 6695666.83,299505.66 6695667.96,299505.17 6695669.34,299504.73 6695670.89,299504.51 6695672.12,299504.28 6695673.25,299504.16 6695674.23,299504.04 6695675.52,299504.02 6695676.71,299504.04 6695678.21,299504.17 6695679.65,299504.35 6695681.05,299504.6 6695682.09,299504.93 6695683.49,299505.42 6695685.25,299505.76 6695686.24,299506.46 6695687.85,299507.61 6695690.04,299508.61 6695691.81,299510.41 6695695.45,299512.26 6695699.0,299513.81 6695701.97,299515.76 6695705.61,299517.56 6695708.9,299518.86 6695711.35,299520.77 6695714.84,299521.01 6695715.38,299522.44 6695718.04),CIRCULARSTRING (299522.44 6695718.04,299523.17 6695719.52,299523.79 6695721.04),(299523.79 6695721.04,299524.17 6695722.26),CIRCULARSTRING (299524.17 6695722.26,299520.91 6695733.58,299509.47 6695736.38),(299509.47 6695736.38,299509.45 6695736.38),CIRCULARSTRING (299509.45 6695736.38,299508.4 6695736.01,299507.39 6695735.55))))

Clip-polygon:
POLYGON ((299458.99 6695651.94,299542.69 6695651.94,299542.69 6695576.99,299458.99 6695576.99,299458.99 6695651.94))

@jratike80
Copy link
Collaborator

What is your GDAL version?

@OWiger
Copy link
Author

OWiger commented Mar 5, 2024

What is your GDAL version?

3.8.3.0

@rouault rouault self-assigned this Mar 5, 2024
rouault added a commit to rouault/gdal that referenced this issue Mar 5, 2024
…mpound curves with infered circular strings (fixes OSGeo#9382)
@rouault rouault closed this as completed in 79cea9c Mar 6, 2024
rouault added a commit that referenced this issue Mar 6, 2024
OGRGeometry::getCurveGeometry(): avoid failures when building some compound curves with infered circular strings (fixes #9382)
rouault added a commit that referenced this issue Mar 6, 2024
…mpound curves with infered circular strings (fixes #9382)
rouault added a commit that referenced this issue Mar 6, 2024
[Backport release/3.8] OGRGeometry::getCurveGeometry(): avoid failures when building some compound curves with infered circular strings (fixes #9382)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants