Permalink
Browse files

merge

  • Loading branch information...
2 parents 608b2fc + 2c1a591 commit 5a65faaa4a7158d34efba5d6c05ae3cd12341f39 Calvin Metcalf committed Apr 10, 2013
Showing with 18 additions and 0 deletions.
  1. +3 −0 README.md
  2. +15 −0 merge.py
View
@@ -1,7 +1,10 @@
esri2geo
========
+
Looking for the esri toolbox? It's over at [it's own repo](https://github.com/calvinmetcalf/esri2open) to hopefully merge with [@feomike's version](https://github.com/feomike/esri2open)
+Here have a tool to turn esri json to geojson should work in the browser, in a worker, and in node.
+
```javascript
var geoJSON = toGeoJSON(esriJSON);
View
@@ -0,0 +1,15 @@
+from arcpy import GetParameterAsText
+from esri2geo import prepareGeoJson,writeFile,closeUp
+features = GetParameterAsText(0).split(";")
+outJSON=GetParameterAsText(1)
+includeGeometry = True
+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, first)
+ first=False
+closeUp(out,fileType)

0 comments on commit 5a65faa

Please sign in to comment.