Skip to content
Browse files

bug fixes

  • Loading branch information...
1 parent 5a91df9 commit 99a1aa28752142c5d51edd4601323253a6198575 Calvin Metcalf committed Mar 25, 2013
Showing with 5 additions and 4 deletions.
  1. +2 −3 esri2geo.py
  2. BIN esri2geo.tbx
  3. +3 −1 merge.py
View
5 esri2geo.py
@@ -245,15 +245,14 @@ def closeUp(out,fileType):
if fileType=="geojson" or fileType=="json":
out.write("""]}""")
out.close()
-def writeFile(outFile,featureClass,fileType,includeGeometry):
+def writeFile(outFile,featureClass,fileType,includeGeometry, first=True):
[shp,shpType]=getShp(featureClass)
fields=listFields(featureClass)
oid=getOID(fields)
sr=SpatialReference()
sr.loadFromString(wgs84)
rows=SearchCursor(featureClass,"",sr)
del fields[shp]
- first = True
i=0
iPercent=0
featureCount = int(GetCount_management(featureClass).getOutput(0))
@@ -307,7 +306,7 @@ def writeFile(outFile,featureClass,fileType,includeGeometry):
del row
del rows
return True
-def toOpen(featureClass, outJSON,includeGeometry="true"):
+def toOpen(featureClass, outJSON, includeGeometry="true"):
if not int(GetCount_management(featureClass).getOutput(0)):
AddMessage("No features found, skipping")
return
View
BIN esri2geo.tbx
Binary file not shown.
View
4 merge.py
@@ -6,8 +6,10 @@
fileType = "geojson"
out=open(outJSON,"wb")
prepareGeoJson(out)
+first=True
for feature in features:
if feature[0] in ("'",'"'):
feature = feature[1:-1]
- writeFile(out,feature,fileType,includeGeometry)
+ writeFile(out,feature,fileType,includeGeometry, first)
+ first=False
closeUp(out,fileType)

0 comments on commit 99a1aa2

Please sign in to comment.
Something went wrong with that request. Please try again.