Missing support for curveRings
Closed this issue · 3 comments
see https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm
Please note the "curveRings" and "a" (arc) and "c" (curve) sub elements.
{"attributes": {"OBJECTID": 1, "SHAPE_Length": 805537.4115684855, "SHAPE_Area": 2112154014.3018234}, "geometry": {"curveRings": [[[149.12727210247652, -35.4212143679875], [149.12752876991442, -35.42141914018136],...,
[[149.1058535132325, -35.36227454544572], [149.1068481686017, -35.36403515635332], {"a": [[149.1078283222431, -35.36423260491624], [149.10725558992584, -35.36454419046313], 1, 1, 1.634440547892481, 0.0006520029603579291, 0.9999999999673727]}, [149.1078531917493, -35.36427530079017], [149.1081456005895, -35.36476045354947], {"a": [[149.10865404238527, -35.3649093717257], [149.1082331954929, -35.36540381310371], 1, 1, 1.6505728935396604, 0.0006492952973245373, 0.999999999978183]}, [149.1090321075761, -35.36520613522933], {"c": [[149.11080906542628, -35.36528749555381], [149.1106174356746, -35.36522861722279]]}, [149.11123748446576, -35.365485861922345], {"a": [[149.11156822568088, -35.36589306774236], [149.11100128894847, -35.366015625367325], 1, 1, 1.6872148079115887, 0.000580032438778483, 0.9999999999384529]}, [149.1116166331043, -35.366228085409794], {"a": [[149.11112920227166, -35.36681457489669], [149.1110355305778, -35.366240928059554], 1, 1, 1.4964161085847754, 0.0005812444236218323, 0.9999999999334054]}, [149.10998161567082, -35.36706219628817], [149.10985623887484, -35.36724787834585], [149.1103982955488, -35.367785679597255], .....
see response of https://data.actmapi.act.gov.au/arcgis/rest/services/ACT_EMERGENCY_MANAGEMENT/esa_sbmp_BPA_current/MapServer/0/query?objectIds=1&outFields=*&returnGeometry=true&outSR=4326&returnTrueCurves=true&returnIdsOnly=false&returnCountOnly=false&f=pjson
for full example.
There is not an equivalent concept in GeoJSON to map these elements on to, but I can probably at least add some better error handling to warn about unrecognised/unconvertible element types as I agree
curl --silent "https://data.actmapi.act.gov.au/arcgis/rest/services/ACT_EMERGENCY_MANAGEMENT/esa_sbmp_BPA_current/MapServer/0/query?objectIds=1&outFields=*&returnGeometry=true&outSR=4326&returnTrueCurves=true&returnIdsOnly=false&returnCountOnly=false&f=pjson" | arcgis2geojson | jq
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": null,
"properties": {
"OBJECTID": 1,
"SHAPE_Length": 805537.4115684855,
"SHAPE_Area": 2112154014.3018234
},
"id": 1
}
]
}
is not a super-helpful way to deal with this.
In the case of the example you gave, you can get ArcGIS REST to output a file that can be converted to GeoJSON by passing returnTrueCurves=false
instead of returnTrueCurves=true
in your API query:
https://data.actmapi.act.gov.au/arcgis/rest/services/ACT_EMERGENCY_MANAGEMENT/esa_sbmp_BPA_current/MapServer/0/query?objectIds=1&outFields=*&returnGeometry=true&outSR=4326&returnTrueCurves=false&returnIdsOnly=false&returnCountOnly=false&f=pjson
I hadn't even noticed the returnTrueCurves
parameter, that's a great workaround! Thank you!