<div dir="ltr">On Thu, Oct 19, 2017 at 2:04 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On jeudi 19 octobre 2017 13:38:38 CEST James Klassen wrote:<br>
> Has anyone looked at reading curved geometries from an Esri rest service<br>
> queried with "returnTrueCurves=true"?<br>
><br>
> My end goal is to import the data into PostGIS. We were successful using<br>
> ogr2ogr to translate the curved features from a geodatabase download in the<br>
> past, but that download is being replaced with a rest service. OGR reads<br>
> the rest service correctly without "returnTrueCurves=true", but we would<br>
> like to preserve the integrity of the curves in the source data if possible.<br>
><br>
> It doesn't look like there is any code in GDAL 2.2 to deal with this<br>
> situation. `ogresrijsonreader.cpp:OGRESRI<wbr>JSONReadPolygon()` looks like it<br>
> is only looking for a "rings" member, not "curveRings", etc.<br>
<br>
</span>This is indeed not supported at the moment.<br>
It appears to be documented in<br>
<a href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000n1000000%23CURVE" rel="noreferrer" target="_blank">http://resources.arcgis.com/en<wbr>/help/arcgis-rest-api/index.ht<wbr>ml#//02r3000000n1000000#CURVE</a><br>
<br>
The data model is, non suprisingly, super close to what exists in Personnal Geodatabase<br>
or FileGeodatabase. Arc/CircularArc could be translated to CIRCULARSTRING/COMPOUNDCURVE/<br>
CURVEPOLYGON. Bezier curves would have to be linearized since there's no equivalent in<br>
OGC SF / ISO SQL-MM Part 3 standards.<br>
So this is "just" a matter of coding it.<br>
<span class="m_-6437039657725241648HOEnZb"></span><br></blockquote><div><br></div><div>Interesting. So, some new JSON parsing code feeding into similar code to what already exists in other drivers to create the right OGR objects. It just comes down to time and/or money to actually implement it.<br><br></div></div></div></div>