Tag: turf.js

  • Toolkits

    Bill and I have a podcast that we do almost once a month. Podcasts are a lot of fun because you can talk about things easier than writing about them. There is a free flow of ideas (or maybe garbage) out of your head and on to a mp3. One topic we talked about months ago was GIS clients. We talked about tools we use but I just happened to be listening to it last night and I realized maybe I wasn’t as honest with myself as I should have been.

    GIS users, if you need a friend, get a dog.

    I’m not a GIS user…

    Fair point though, what is a GIS user? I think of it as someone who uses GIS software. But even that it is somewhat of a mess because one person’s GIS software is another person’s toolkit. Ignoring that issue for a second, what do I use for GIS?

    1. GDAL/OGR
    2. Turf.js
    3. Elastic
    4. PostGIS

    I think that pretty much covers it. I mean there is some Shapely and some other libraries, but that short list is all I use anymore. That of course has a lot to do with my job, if I was GIS Manager at the City of Townsville I might need other tools, but that list above is pretty much it. I can’t help but think of these things as Toolkits rather than GIS software. They are all part of a deeper workflow that I use when I need to use it. The end result is never QGIS, ArcGIS, uDIG or whatever madness you use in your daily life. It is either GeoJSON or “database” (where database could mean a lot of things).

    God made men. Men made proprietary software systems

    This blog is about to have it’s 15th year anniversary and I can’t think of a better example of how things have changed since that moment. I also think GIS lends itself for this workflow orientated environment anyway. Ignoring the crazy ArcGIS Desktop years with wizard based GIS, mostly GIS has been scripting workflows to accomplish your needs. Fortran, AML, Python, you name it. We use these methods to not only get results but document them. In the end I think all the tools we use for GIS are Toolkits and not software. Yes, one must put a name on something, but GIS has always been about toolkits, even in proprietary workflows, and will always be this. Maybe when we check in right before I retire in 2035 we can see how we are doing with this.

    My guess? Still using toolkits.

    Toolkits are a “real genius” move…
  • 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.

    https://gist.github.com/cageyjames/400f050b24db613f83a3.js

    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?

  • SpatialTau v1.5 – Santa Bring Turf

    SpatialTau is my weekly newsletter that goes out every Wednesday. The archive shows up in my blog a month after the newsletter is published. If you’d like to subscribe, please do so here.


    I’m on holiday this week for obvious reasons but there is one bit of news that came out that has my attention.

    Turf: GIS for web maps

    Via Mapbox:

    Turf is GIS for web maps. It’s a fast, compact, and open-source JavaScript library that implements the most common geospatial operations: buffering, contouring, triangular irregular networks (TINs), and more. Turf speaks GeoJSON natively, easily connects to Leaflet, and is now available as a Mapbox.js plugin on our cloud platform.

    I love this, client side GIS in the browser.  I told someone a couple weeks ago that they should think about JavaScript as a GIS scripting engine.  Don’t toss the Python just yet but this is the clearest sign that we’re not far away from tossing the old GIS servers out on the street.

    Merry Christmas everyone!