Raster is a disaster, vector is a spectre

The tale of one startup on a budget, wading through the tile wars

FOSS4G Boston | August 18th, 2017

Interactive mapping is a battlefield: vector tiles are the alluring wave of the future, but raster tiles are quick and reliable. What's a startup to do? What follows is the tale of Faraday Inc, a map-driven analytics company with a dedication to FOSS technologies, a willingness to build from the ground up, and a familiar-to-the-industry limit on engineering resources. We'll walk through comparisons of servers and clients, benchmark crazy geometry experiments, and rediscover some ancient carto-lore we should have paid attention to in the first place, before revealing where we arrived: at an optimal stack for mapping on the web in 2017.

I am:

Bill Morris, Cartographer at Faraday Inc.

What I do:

data plumbing gif of some sort

Customer Intelligence Platform

platform

This requires piles of data

fig

A map-centered application

map

But it wasn't always this way . . .

Phase 1 (2014): Just let Carto[DB] handle it for us

cartodb.js_dots

cartodb_ui_hexes

Establishing the visual style . . .

prototype

Side note:

olivia

Credit: "Olivia Forms a Band" by Ian Falconer

OH @faradayio: "We've heard vector tiles are awesome; let's try them out!"

Phase 2: Use Tilestache (Thanks, @michalmigurski), serve GeoJSON into a hacked-together d3.js-based client (Thanks, @nelson)

artifact_hexes

Phase 3: Build Tilesplash, serve TopoJSON into a dedicated canvas-based client layer (Hoverboard)

pitt_1

pitt_2

Scale troubles: tile_load

Phase 4: Update Tilesplash to serve MVT

Phase 5: Rewrite the client. Again. Try out the new Mapbox GL hotness.

. . . and prepare to introduce multivariate maps. Experiments:

Revisit the design for multivariate, with implications for the tiling

multivar_choropleth

circles

3d_hexes

dots

This last one is promising - it lets us sidestep the multivariate acarto-tricks and just show the raw data, but it's slow when served by tilesplash to MapboxGL. OH is only(!) 10M points, but we have way more than that nationally.

Phase 6: Start over. Consider old adages.

"What if we . . . drew dots on a bitmap really fast?"

Enter Rust, and "Grout".

. . . the work of Eric Kidd and Tristan Davies

Node begs PostGIS for some coords:

PostGIS abides

Rust devours the output, renders pngs:

drawcircles

Current status: Speed and Stability

final

Q: Why might you go raster these days?

A: Speed + reliability in very narrow, million-point use cases

Q: Why might you just ride the vector wave?

A: Lord. A million reasons, but here's one from just this week

Thanks! Hit me up with any other questions: bill@faraday.io @vtcraghead on Twitter