Summary
Converts JSON features based on ArcGIS REST API specification into a feature class. The feature class will have fields, geometry type, and spatial reference as defined in the JSON.
Usage
If the input JSON file has the hasZ or hasM property set to True, the output features will have Z and M values.
Syntax
JSONToFeatures(in_json_file, out_features)
Parameter | Explanation | Data Type |
in_json_file | The JSON file (.json) to convert. | File |
out_features | The output feature class to create. | Feature Class |
Code sample
JSONToFeatures example
The following Python script demonstrates how to use the JSONToFeatures function.
import arcpy
import os
arcpy.env.workspace = "c:/data"
arcpy.JSONToFeatures_conversion("myjsonfeatures.json", os.path.join("outgdb.gdb","myfeatures"))
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes