0

I am using ogr2ogr to move data between a file geodatabase and a postgres database with postgis installed.

the layer is returning the error: ERROR 1: Non contiguous curves

Googling the error does not turn up results that are helpful from what I can see. My understanding is that fgdb implementation in ogr2ogr is a little limited as the standard from ESRI is closed source.

I wanted to ask if anyone has more information or a solution for this error.

For my purposes, I solved the error and some other errors due to ring self intersections by using qgis to export to geopackage and then uploading via the qgis DB Manager.

>>> ogr2ogr --version 
>>> GDAL 3.1.4, released 2020/10/20
"SELECT VERSION();"

 PostgreSQL 12.7 (Ubuntu 12.7-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2
  • Error seems to mean that GDAL is finding invalid geometries. If ESRI considers that everything is fine then GDAL developers might be interested if you could isolate the problematic geometries and share them.
    – user30184
    Aug 3, 2021 at 9:00
  • yeah agreed, I thought I'd give this some time and then follow up on the gdal mailing list to see if anyone has more info or would like a close look at the geoms. Aug 3, 2021 at 16:41

1 Answer 1

0

Are you using the -MakeValid tag when using ogr2ogr? From the documetation https://gdal.org/programs/ogr2ogr.html

-makevalid Run the OGRGeometry::MakeValid() operation, followed by OGRGeometryFactory::removeLowerDimensionSubGeoms(), on geometries to ensure they are valid regarding the rules of the Simple Features specification.

May not work as it appears the MakeValid operation tries to keep the position of the vertices. But it is worth a try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.