Lightning talk presentation given to the Esri Dev Meetup in Washington, DC on 19 November 2014. The talk describes an open-source server object extension (SOE) that enables GeoJSON output from ArcGIS Server.
9. Who
Bill Dollins
GitHub: geobabbler
Twitter: @billdollins
e-mail: bill@zekiah.com
Zekiah Technologies, Inc
We are hiring developers
www.zekiah.com/index.php?q=careers
Hinweis der Redaktion
Hi everyone, I’m here to talk about an ArcGIS Server Object Extension we developed to enable GeoJSON output from ArcGIS Server.
Raise your hand if you are familiar with GeoJSON. If your hand isn’t up, please catch up with some whose hand is up. (During Q&A: GeoJSON is a JSON syntax for encoding geographic objects and features. It is a community-developed specification that has gained wide acceptance throughout the geospatial industry and is supported by a large number of tools. I consider it an important interoperability tool and wanted to see it supported in ArcGIS Server.)
So why did I want to do this? Because I could. A couple of years ago, I gave a lightning talk at another Esri GeoDev meetup in which I called for Esri to bake support for GeoJSON into ArcGIS Server. Afterward, I figured I could post it to ideas.arcgis.com and wait, or I could build it. So I chose to build it.
The truth is that, while we can control how our data is served, we usually have very little control over how it is consumed. Tools like those shown here have taken over the geospatial web and they all understand GeoJSON natively. While Esri has Leaflet extensions, for example, I can’t make a site I don’t own use them so it’s best to provide my data in a format I can be certain is supported.
And then there’s this guy…the IT guy. It’s not as if Esri hasn’t paid attention to GeoJSON. They have tools like Koop which provide GeoJSON support to ArcGIS feature services and works pretty well. Koop is a Node application, which implies adding another application server to your IT infrastructure. That’s where this guy, with his reams of accreditation paperwork, gets in the way. It can be a lot of work to add support for a single data format. That’s where this SOE simplifies things mightily.
As I mentioned before, this tool is simply an ArcGIS Server Object Extension, written in C# to extend a map service. It has been tested with ArcGIS Server 10.1 and 10.2. Since I originally posted the code, I’ve interacted with several organizations who have implemented it and I’m looking forward to a public-facing instance coming online soon.
So how does it work? It extends the REST API so you just interact via HTTP GET. I’ve tried to keep the URL syntax as consistent as possible with the core REST API so you can follow your nose to get results. You can pass in attribute queries to pare down the results. You are streaming JSON-encoded vectors here so it’s best to keep performance in mind.
The SOE is open-source under an MIT license and can be found on GitHub here. Currently, you need to download the source and build it. I am working on refactoring the GeoJSON serialization away from using a StringBuilder to serializing anonymous types using NewtonSoft JSON.NET. Once that’s complete, I’ll post a binary build as well. The GitHub page has some sample URLs also.
I do answer questions about the SOE, though there can be a bit of a delay. Here some of the various ways to get in touch with me. My company is currently hiring software developers, so feel free to contact me about that as well.