Maptime!

Geoprocessing with turf.js


July 27, 2016

Me: Bill Morris

using turf.js for spatial data crunching

Plan:

GIS + the internet: a lightning history

1993: Xerox PARC

xerox

~2000:

2004: Complexity increases

2005: Year G

goog

[a.k.a. Year of The Tile, a.k.a. The Resurrection of Gerardus]

"GIS in the browser"

2010:

gis via Dave Bouwman

biden

2016:

It's actually a thing:

buffer

Try it out on the great state of Vermont

Powered by turf.js

A javascript library for live, client-side geoprocessing

Instead of this:

arcpro

This:

hull

Javascript

afraid

function bidenize() {
  document.getElementById('topbar').innerHTML = 'Random Biden quote'
}

GeoJSON

Looks like this in a text editor:

{
  "type": "Feature",
  "properties": {
    "marker-color": "#ab4ca9",
    "marker-size": "large",
    "marker-symbol": "alcohol-shop",
    "name": "Geobeers @ Parlor Sports"
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      -71.10146641731262,
      42.374473211292404
    ]
  }
}

Looks like this in a web browser:

cap

Let's do a quick project, starting with data creation:

draw1

Then we bring the data over to dropchop and do some basic turf geoprocessing on it:

process2

Could you spot the server in there?

Again, GIS in the web browser. LOL.

biden2

What do end users care about geoprocessing?

Geoprocessing as part of a layperson's user experience:

Nearest neighbor: Post-swimming brews near

Distance along a line: Meet me halfway distance

Buffering: Race route water fountains water via Morgan Herlocker

Intersection and grids: Neighborhood mapping hoods

node.js is javascript, just built for servers. turf works the same way when used as a server-side tool

But . . . Data from hell

A more complicated problem, wth bigger data, needs more power than a browser can provide.

tile-reduce

tiles via Stevage

Comparing two gigantic datasets

run via Alex Barth

A time-sensitive analysis to save lives. . .

nepal via Morgan Herlocker

Offline geoprocessing off via Bryan McBride

Linear referencing ref via Tobias Sauerwein

Realtime geoprocessing rt via Molly Lloyd

Resources to get you started:

Questions? Hit me up: