[gdal-dev] Esri JSON Curves

James Klassen klassen.js at gmail.com
Thu Oct 19 11:38:38 PDT 2017


Has anyone looked at reading curved geometries from an Esri rest service
queried with "returnTrueCurves=true"?

My end goal is to import the data into PostGIS. We were successful using
ogr2ogr to translate the curved features from a geodatabase download in the
past, but that download is being replaced with a rest service.  OGR reads
the rest service correctly without "returnTrueCurves=true", but we would
like to preserve the integrity of the curves in the source data if possible.

It doesn't look like there is any code in GDAL 2.2 to deal with this
situation.  `ogresrijsonreader.cpp:OGRESRIJSONReadPolygon()` looks like it
is only looking for a "rings" member, not "curveRings", etc.

I am seeing the response with curves is still identified as a polygon layer:

 "geometryType": "esriGeometryPolygon"

where some of the geometries are normal polygons as (I've changed the
numbers to protect the innocent):

 "geometry": {
    "rings": [
     [
      [
       544413.0,
       198310.9
      ],
...

while some of the other geometries confuse OGR and are as follows:

   "geometry": {
    "curveRings": [
     [
      [
       583150.8,
       150314.1
      ],
      {
       "c": [
        [
         583162.9,
         150317.4
        ],
        [
         583190.8,
         150313.8
        ]
       ]
      },
      [
       583141.3,
       150317.0
      ],
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171019/cb85fcab/attachment-0001.html>


More information about the gdal-dev mailing list