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.

4 thoughts on “geoJson > arcJson

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

  2. kanishk

    hello,
    I’m actually trying to create an attribute table for my GeoJSON data. So i thought i’ll convert the GeoJSON data to JSON data and then use the handsontable.js to create an attribute table alongside my map but i cant seem to find anything online on how to convert GeoJSON to JSON. Or how to create a table using GeoJSON data instead of JSON. could you help be or point me in the right direction please?

    PS: Im very much a novice at WEB based GIS so please dont mind if i sound vague. If there’s any more information i can give you. please let me know. thankyou.

    Reply

Leave a Reply

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