コード例 #1
0
def prepareFile(outJSON, featureClass, fileType, includeGeometry):
    if fileType == "geojson":
        return prepareGeoJSON(outJSON, featureClass, fileType, includeGeometry)
    elif fileType == "csv":
        return prepareCSV(outJSON, featureClass, fileType, includeGeometry)
    elif fileType == "json":
        return prepareJSON(outJSON, featureClass, fileType, includeGeometry)
    elif fileType == "sqlite":
        return prepareSqlite(outJSON, featureClass, fileType, includeGeometry)
    else:
        return False
コード例 #2
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
def prepareFile(outJSON,featureClass,fileType,includeGeometry):
    if fileType == "geojson":    
        return prepareGeoJSON(outJSON,featureClass,fileType,includeGeometry)
    elif fileType == "csv":    
        return prepareCSV(outJSON,featureClass,fileType,includeGeometry)
    elif fileType == "json":    
        return prepareJSON(outJSON,featureClass,fileType,includeGeometry)
    elif fileType == "sqlite": 
        return prepareSqlite(outJSON,featureClass,fileType,includeGeometry)
    else:
        return False
コード例 #3
0
ファイル: merge.py プロジェクト: rclark/esri2open
from arcpy import GetParameterAsText
from esri2open import writeFile, prepareGeoJSON, closeJSON
#compute the peramaters
features = GetParameterAsText(0).split(";")
outJSON = GetParameterAsText(1)
includeGeometry = "geojson"
fileType = "geojson"
out = prepareGeoJSON(outJSON)
first = True  #this makes sure sure we arn't missing commas
for feature in features:
    if feature[0] in ("'", '"'):
        feature = feature[1:-1]
    writeFile(out, feature, fileType, includeGeometry, first)
    first = False
closeJSON(out)
コード例 #4
0
ファイル: merge.py プロジェクト: AndreaLisbette/esri2open
from arcpy import GetParameterAsText
from esri2open import writeFile, prepareGeoJSON, closeJSON
#compute the peramaters
features = GetParameterAsText(0).split(";")
outJSON=GetParameterAsText(1)
includeGeometry = "geojson"
fileType = "geojson"
out=prepareGeoJSON(outJSON)
first=True#this makes sure sure we arn't missing commas
for feature in features:
    if feature[0] in ("'",'"'):
        feature = feature[1:-1]
    writeFile(out,feature,fileType,includeGeometry, first)
    first=False
closeJSON(out)