4

Is there a function exposed by ESRI's python geoprocessor that converts the JSON format used in the various web clients to a valid feature class.

Clearly, the function exists because something is converting these JSON strings into a format usable by the geoprocessor. I can't find it anywhere.

1
2

If you have the json data to parse with python, you could grab the lat/longs and use an insert cursor and the writing geometry object found here http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Writing_geometries

1

No, there's no built-function to do this.

Edit: As of ArcGIS 10.1 (Spring 2012), arcpy.AsShape will convert an Esri JSON FeatureSet/RecordSet to a Python FeatureSet/RecordSet object if you set the esri_json parameter to True. Additionally, FeatureSet and RecordSet objects have a .JSON property to do the reverse.

1

Test the arcpy.JSONToFeatures_conversion(jsonfile, outputshapefile) function.

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.