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?

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..

  • 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? – Alexejevitsch Apr 13 '17 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, – Bill Chappell Apr 13 '17 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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