I have a shapefile and I would like to convert in ESRI Json with ArcGIS toolbox From feature to JSON. When i convert it I visualize x and y values in meters while I want latitude and longitude information. How can I set this option to visualize geo coordinates in json file?

  • So, you have a shapefile that is defined in projected coordinate system (meters as units) and when you convert it to JSON you get meters as well, but you want to have JSON coordinates defined in a geographic coordinate system (decimal degrees)? – Alex Tereshenkov Jan 25 '16 at 14:54
  • Yes, my shapefile is defined in this way: PROJCS["WGS_1984_UTM_Zone_32N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] I want a json file with geo coordinates. – adellarocca Jan 25 '16 at 14:58

Some of the geoprocessing tools in ArcGIS respect output coordinate system environment setting, but not this one.

You need to run the Project tool beforehand creating a projected shapefile first (use the WGS 1984 GCS). This will create a new shapefile on the disk with coordinates defined in lat/long.

  • I' ve launched the script as indicated in [Project Tool]( resources.arcgis.com/en/help/main/10.2/index.html#/Project/…) but I receive following error Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\arcobjects\mixins.py", line 949, in init self._arc_object.createFromFile(item) RuntimeError: ERROR 999999: Errore durante l'esecuzione della funzione. – adellarocca Jan 25 '16 at 15:37
  • You may need to define the proper transformation. – Ben S Nadler Jan 25 '16 at 15:44
  • I' ve defined the transformation as follow:WGS 1984 UTM Zone 32N. I've executed this script and I correctly generate a new shapefile. What is the next step to obtain the json file with coordinates? – adellarocca Jan 25 '16 at 16:04
  • You run the same GP tool as you did, Features to JSON. Because you have your features in geographic coordinate system, the geometry coordinates will be exported with decimal degrees. – Alex Tereshenkov Jan 25 '16 at 16:16
  • I've used GP tool Features to JSON but the result is the same. Results are in meters. Where's the error? – adellarocca Jan 25 '16 at 16:26

I've resolved this proble following procedure at this link.

How to convert coordinates from meters to decimal degrees?

  • So you used QGis? – til_b Jan 28 '16 at 15:32
  • 1
    Yes! I've used QGIS to obtain a new shape file with coordinates in degree and then I've converted it in ArcGIS using FeatureToJSON toolbox. – adellarocca Jan 29 '16 at 9:41

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.