f=geojson

On November 11, 2011, I gave a lightning talk at the ESRI Dev Meetup in Silver Spring, MD. My talk was titled “If I Were Jack For a Day.” Despite the infinite comedic potential of that title, it was a tongue-in-cheek look at some items on my wish list for the ArcGIS platform.

An increasing portion of my consulting work deals with helping users integrate their established ArcGIS infrastructures with other spatial technologies. So my talk was a semi-selfish look at things that would make my life as a consultant and integrator easier.

Nick Furness will post the slides but they aren’t designed to stand on their own so I thought I’d address them here to provide context. I’ll take them one or two per post in no particular order. With that, first up on the docket:

I’d love to see GeoJSON support, where appropriate, in the ArcGIS Server REST API (or the GeoServices REST Specification or whatever it’s called). I say “where appropriate” because the scope of the REST API is wide-ranging and only potentially meshes up with GeoJSON in a few areas. (Yes, I voted for this on the ArcGIS Ideas site.) One such example is querying a feature layer. Take this query for instance:

http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_1990-2000_Population_Change/MapServer/4/query?where=Name%3D%27Maryland%27&f=json

I envision the option to specify “f=geojson” and have the result returned as a GeoJSON FeatureCollection. Why? Because it would make it much easier to integrate outputs from ArcGIS Server into applications or APIs that support GeoJSON. At least that’s my parochial view of the world. This could be added side-by-side with the current JSON capability so as not to break existing clients.

Frankly, I’d like to see GeoJSON support on the consumption side all up and down the stack. It would be nice if ArcMap could be pointed at a URL that emits GeoJSON and load it into a map as a fully functional layer. Of course, it would be nice if ArcGIS supported direct access to a number of other spatial data sources but that was the topic of another slide which I’ll get to in another post.

Now I realize that GeoJSON hasn’t been “formally” adopted as a standard but, then again, neither has the shapefile. In terms of adoption, the market has spoken with support across a number of platforms and an increasing number of APIs. In my opinion, GeoJSON has quickly become one of the more widely accepted de facto standards in our industry. (Don’t take my word for it, ask Google.)

This doesn’t offer up too many business drivers for ESRI to do such a thing, aside from greater flexibility and utility for ArcGIS Server as a data source, but as I said before, this is my semi-selfish look at things. GeoJSON support in ArcGIS Server would make my life easier and I’m sure I’m not alone.

  • Thanks for speaking up for GeoJSON at the meetup, Bill. Is the graphic your work? The format could use a logo.

    • My pleasure. I feel like it’s so ubiquitous now that anything seriously purporting to play in the geo+web area needs to support it.

      Yes, I made that graphic for the talk. Feel free to crowdsource it. I can remove the “f=geojson” if you want to use it.

  • Why not just make f=json return real geojson instead of the incompatible esri-json which seems to exist for no reason other than to break compatibility with an existing de-facto standard?

    • I think Sean himself discussed it best here: http://sgillies.net/blog/1045/why-not-geojson/

      Basically, the two were built roughly in parallel, which happens. I would love to see it eventually roll to GeoJSON as the default wherever feature data is communicated but there are applications written against to existing syntax so I thought I’d not propose something that immediately forced users to rewrite. It strikes me as a transition that would need to happen over time.

      I think as people begin looking at other APIs like OpenLayers, Leaflet, etc. (which is happening), they will arrive at the conclusion that GeoJSON is the better way to go.

    • I suppose I’d be remiss if I didn’t point out that ESRI is not alone in this. Platforms such as GeoIQ and CartoDB also have their own JSON variants in addition to GeoJSON.

      • HTTP + JSON APIs are a bit like snowflakes. Different initial conditions, different environments, different forms. I think the core of GeoJSON is representation of geometries, and that’s something useful in many kinds of formats.

  • Just a little update: Simon Hope tells me that his company is working on GeoJSON support in their exporter extension for ArcGIS Server.