As far as I'm aware the arcpy.JSONToFeatures_conversion utility only takes a flat file, e.g., your-json-file.json sitting in a directory.
I would like to suggest that this utility provide support for strings embedded right in one's script instead of having to summon os and mess with paths. So basically instead of:
import arcpy
import os
file = your_file.json
path = r"C:\Temp"
json_file = os.path.join(path, file)
arcpy.JSONToFeatures(json_fileaaaaahhhhh just makes my head hurt writing it)
it should be like this:
import arcpy
json = { bunch of json/geojson }
arcpy.JSONToFeatures(json, output)
Currently, the second approach throws a series of GP errors as it does not appear the tool is set up to handle strings but only files.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.