geotoarc

geoJson > arcJson

So I put together a dead simple interface to convert geojson to arcjson using the esri geojson utils repo on github. I also threw in a feature to view it on a map, but its spotty…

brightrain.github.io/geoconverter

source available

It truly is a wrapper around geojson utils.

Include, create, use

I ended up doing this for a few reasons: I wanted to try out the awesome geoJson creation and editing tool by @tmcwgeojson.io. And I also wanted to play with the new Boostrap 3 flatness, a significant departure from the old version in both workings and looks.

The idea hit me when I found myself in need of a course polygon dataset representing world regions and I wanted to be able to publish them to a map service for use in an ArcGIS Javascript API application. It was super simple to create the handful of regions I needed with geojson.io and I ended up with geoJson polygons in just a few minutes. I then needed to get them into an ArcGIS feature service. Uh oh, although it’s looking increasingly imminent, geoJson is not supported in the ArcGIS world currently. So here we are.

The new developers.arcgis.com allowed me to quickly create and publish a new feature service to contain the new data. I just copied the output from geojson.io, pasted it into a text box, hit the button and I had arcJson. Another copy and paste to get it into the feature service rest endpoint, addFeatures and I had my regions in my map service.

A note that if you need the same workflow you need to ‘unwrap’ the output arcjson into just the array of features i.e. remove the outter ‘features’ object before pasting into an addFeatures end point. Peel off this bit here and the very last curly too:

stripfeatures

 

Definitely ‘innovation time’ as this is just a bridge across the open water until esri provides full support for geojson. Let me know if you find it useful.

One thought on “geoJson > arcJson

  1. Pingback: Updated geoconverter: { geoJson } { arcJson } | bright rain blog

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>