1

I try to download data from the city of Rome with this command:

ogr2ogr -f GeoJSON EVC_rome.json "http://services2.arcgis.com/NZMqCJwY3kMjFOqf/arcgis/rest/services/ricarica_elettrica/FeatureServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json" OGRGeoJSON -gt 1000

The OSGeo4Q Shell says "unable to open datasource `http://services2.arcgis.com/NZMqCJwY3kMjFOqf/arcgis/rest/services/ricarica_elettrica/FeatureServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json' with the following drivers."

Any ideas?

asked Apr 13, 2017 at 10:19

1 Answer 1

2

Just taking your url and copying it into the browser I get back:

{"error":{"code":400,"message":"Cannot perform query. Invalid query parameters.","details":["'Invalid field: objectid' parameter is invalid"]}}

So the issue is in your url format.

http://services2.arcgis.com/NZMqCJwY3kMjFOqf/ArcGIS/rest/services/ricarica_elettrica/FeatureServer/0/query?where=1%3D1&objectIds&returnGeometry=true&f=json works so it's how you are forming your url..

answered Apr 13, 2017 at 12:38
2
  • Great, it works. But now I get this error:"EPSG PCS/GCS code 102100 not found in EPSG support files. Is this a valid EPSG coordinate system?" The spatial reference is stored here spatialReference":{"wkid":102100,"latestWkid":3857} Any idea how I can select the latestWkid? Commented Apr 13, 2017 at 14:50
  • If you look at resources.arcgis.com/en/help/arcgis-rest-api/index.html#/… you will see 102100 and 3857 are the same. For the Esri rest service I would just substitute 3857 for 102100 in the URL. I would test it to see if it's giving you the correct locations, Commented Apr 13, 2017 at 18:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.