Simply GIS

I had some endpoints of a lines that I needed to convert to GeoJSON today.  Before I started I do what every GIS professional does, take inventory of the multitude of ways to actually accomplish this.  I mentally jotted down the following:

  • Esri ArcGIS
  • QGIS
  • Online tools (csv -> json)
  • R
  • Python

I started to realize that these are all pretty heavy tools to just accomplish something as simple as a line string to line.  We literally pull out a chainsaw when all we want it to trim a little piece of paper.  Nothing simple about converting some coordinates into JSON.  Enter Turf.js.

turf.linestring – Creates a LineString based on a coordinate array. Properties can be added optionally.

So simple, plus it’s JavaScript already.  Honestly I need to keep coming back to Turf.js, the docs cover easily 90% of what we mostly do with GIS every day.  I just run Turf.js on my laptop and now I don’t even have to open up QGIS to get my work done.  The best part, all JavaScript!  So who is writing the Turf.js book right now?

GIS without GIS Servers

My bandmate, Sheldon McGee, and I presented at AGIC 2014 on how to serve up vector data in Google Maps without using some crazy GIS Server type software. Just a little node.js and some PostGIS is all one needs. You can view the presentation by clicking this link and view the code on Github which is a fork of Mano Marks’ fork of Bill Dollins’ original code.

Some of our goals with this project are to extend the Node.js to work with SQL Server and possibly Oracle1. Possibly even write spatial objects to PostGIS from the app2. We used Google Maps for this demo but I think the sweet spot is TileMill generated background tiles with Leaflet.js.

  1. I might need beer for that 

  2. Oddly that was a big question from the audience after our presentation