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– Alex Tereshenkov2016年01月25日 14:54:31 +00:00Commented Jan 25, 2016 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– adellarocca2016年01月25日 14:58:54 +00:00Commented Jan 25, 2016 at 14:58
2 Answers 2
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– adellarocca2016年01月25日 15:37:47 +00:00Commented Jan 25, 2016 at 15:37
-
You may need to define the proper transformation.Ben S Nadler– Ben S Nadler2016年01月25日 15:44:10 +00:00Commented Jan 25, 2016 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– adellarocca2016年01月25日 16:04:23 +00:00Commented Jan 25, 2016 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– Alex Tereshenkov2016年01月25日 16:16:35 +00:00Commented Jan 25, 2016 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– adellarocca2016年01月25日 16:26:48 +00:00Commented Jan 25, 2016 at 16:26
I've resolved this proble following procedure at this link.
-
-
1Yes! 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– adellarocca2016年01月29日 09:41:55 +00:00Commented Jan 29, 2016 at 9:41