I have a large ESRI json (which I got from a request at an ESRI Rest API) that I need to convert to some sort of vector file, preferably a Shapefile.

It seems there are ways of doing this using ArcPy, but I do not own an ArcGIS license. Is there a way to work around this or is ArcGIS the only way to do it?

  • 1
    Use GDAL. Ogr2ogr gdal.org/ogr2ogr.html and esrijson driver gdal.org/drv_esrijson.html. In released versions ESRI json is read with the GeoJSON driver but from user point of view it does not make sense. – user30184 Nov 16 '17 at 19:38
  • @user30184 Thanks for your reply. I'm still a bit confused since I don't have a deep understanding of GDAL beyond a little "rgdal" in R. 1.- The ESRI json driver seems to be available only on GDAL 2.3 but the latest released version is 2.1, if I'm correct. How could I use an unreleased version? (I'm using MacOS) 2.- You stated that in released versions of GDAL, ESRI json files are read with the GeoJSON driver. I tried doing that in R (with the "rgdal" package function "readOGR()") which has the GeoJSON driver, but I'm still unable to read the file. Any suggestions? Thanks! – Daniel Villarroel Torrez Nov 17 '17 at 19:38
  • Can you share some small sample of data? – user30184 Nov 17 '17 at 20:28
  • Or try yourself. Download some data and run ogrinfo your_file.json. – user30184 Nov 17 '17 at 20:57
  • @user30184 Here is the result of a query for one polygon. I tried saving it as JSON and running ogrInfo on it (in R) but I get or "Cannot open data source", or "Cannot open layer" if I specify the layer name as the file. – Daniel Villarroel Torrez Nov 18 '17 at 17:27

Your Answer

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

Browse other questions tagged or ask your own question.