Skip to main content
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
added 21 characters in body
Source Link

I have a folder on my local drive with 1,500+ JSON files (lines) that I need converted to shapefiles. (JSON to feature tool in ArcGIS works great on a single JSON file)

I've tried getting a batch model in Python to work, but I'm not getting any response from the scriptthis code seems to give me an ERROR 000206 after 31 JSON files...

Any ideas?

(I'm using ArcGIS 10.2 and PyScripter)

import arcpy
import os

dirOfJSON = 'c:/temp/jsons'
outputDIrectory = 'c:/temp/jsonSHPs'

arcpy.env.workspace = dirOfJSON

for f in arcpy.ListFiles(''*.json'):
    j = os.path.join(dirOfJSON, f)
    outputShp = os.path.join(outputDIrectory, os.path.splitext(f)[0] + "'.shp"shp')
    print("Processing : {}".format(outputShp))
    arcpy.JSONToFeatures_conversion(j, outputShp)

I have a folder on my local drive with 1,500+ JSON files (lines) that I need converted to shapefiles. (JSON to feature tool in ArcGIS works great on a single JSON file)

I've tried getting a batch model in Python to work, but I'm not getting any response from the script.

Any ideas?

(I'm using ArcGIS 10.2 and PyScripter)

import arcpy
import os

dirOfJSON = 'c:/temp/jsons'
outputDIrectory = 'c:/temp/jsonSHPs'

arcpy.env.workspace = dirOfJSON

for f in arcpy.ListFiles('.json'):
    j = os.path.join(dirOfJSON, f)
    outputShp = os.path.join(outputDIrectory, os.path.splitext(f)[0] + ".shp")
    print("Processing : {}".format(outputShp))
    arcpy.JSONToFeatures_conversion(j, outputShp)

I have a folder on my local drive with 1,500+ JSON files (lines) that I need converted to shapefiles. (JSON to feature tool in ArcGIS works great on a single JSON file)

I've tried getting a batch model in Python to work, but this code seems to give me an ERROR 000206 after 31 JSON files...

Any ideas?

(I'm using ArcGIS 10.2 and PyScripter)

import arcpy
import os

dirOfJSON = 'c:/temp/jsons'
outputDIrectory = 'c:/temp/jsonSHPs'

arcpy.env.workspace = dirOfJSON

for f in arcpy.ListFiles('*.json'):
    j = os.path.join(dirOfJSON, f)
    outputShp = os.path.join(outputDIrectory, os.path.splitext(f)[0] + '.shp')
    print("Processing : {}".format(outputShp))
    arcpy.JSONToFeatures_conversion(j, outputShp)
corrected spelling, fixed grammar, improved formatting.
Source Link
whyzar
  • 12.1k
  • 23
  • 39
  • 72

I have a folder on my local drive with 1,500+ JSON files (lines) that I need converted to shapefiles. (JSON to feaurefeature tool in ArcGIS works great on a single JSON file) 

I've tried getting a batch model in Python to work, but I'm not getting any response from the script.

Any ideas?

(I'm using ArcGIS 10.2 and PyScripter)

import arcpy
import os

dirOfJSON = 'c:/temp/jsons'
outputDIrectory = 'c:/temp/jsonSHPs'

arcpy.env.workspace = dirOfJSON

for f in arcpy.ListFiles('.json'):
    j = os.path.join(dirOfJSON, f)
    outputShp = os.path.join(outputDIrectory, os.path.splitext(f)[0] + ".shp")
    print("Processing : {}".format(outputShp))
    arcpy.JSONToFeatures_conversion(j, outputShp)

I have a folder on my local drive with 1,500+ JSON files (lines) that I need converted to shapefiles. (JSON to feaure tool in ArcGIS works great on a single JSON file) I've tried getting a batch model in Python to work, but I'm not getting any response from the script.

Any ideas?

(I'm using ArcGIS 10.2 and PyScripter)

import arcpy
import os

dirOfJSON = 'c:/temp/jsons'
outputDIrectory = 'c:/temp/jsonSHPs'

arcpy.env.workspace = dirOfJSON

for f in arcpy.ListFiles('.json'):
    j = os.path.join(dirOfJSON, f)
    outputShp = os.path.join(outputDIrectory, os.path.splitext(f)[0] + ".shp")
    print("Processing : {}".format(outputShp))
    arcpy.JSONToFeatures_conversion(j, outputShp)

I have a folder on my local drive with 1,500+ JSON files (lines) that I need converted to shapefiles. (JSON to feature tool in ArcGIS works great on a single JSON file) 

I've tried getting a batch model in Python to work, but I'm not getting any response from the script.

Any ideas?

(I'm using ArcGIS 10.2 and PyScripter)

import arcpy
import os

dirOfJSON = 'c:/temp/jsons'
outputDIrectory = 'c:/temp/jsonSHPs'

arcpy.env.workspace = dirOfJSON

for f in arcpy.ListFiles('.json'):
    j = os.path.join(dirOfJSON, f)
    outputShp = os.path.join(outputDIrectory, os.path.splitext(f)[0] + ".shp")
    print("Processing : {}".format(outputShp))
    arcpy.JSONToFeatures_conversion(j, outputShp)
Source Link
Loading