I heard you like tiles Michal Migurski, Geomeetup April 2013 so I - - PowerPoint PPT Presentation

i heard you like tiles
SMART_READER_LITE
LIVE PREVIEW

I heard you like tiles Michal Migurski, Geomeetup April 2013 so I - - PowerPoint PPT Presentation

I heard you like tiles Michal Migurski, Geomeetup April 2013 so I put some vectors in your tiles so you could tile while you vector. Why? Using OpenStreetMap should be as easy as pasting a URL. OSM is big, and computers &


slide-1
SLIDE 1

I heard you like tiles…

Michal Migurski, Geomeetup April 2013

slide-2
SLIDE 2

…so I put some vectors in your tiles so you could tile while you vector.

slide-3
SLIDE 3

Why?

  • Using OpenStreetMap should

be as easy as pasting a URL.

  • OSM is big, and computers & networks

aren’t getting much faster.

  • Vector Tiles exist and work with

worldwide data right now.

slide-4
SLIDE 4

Explosion of cheap & easy data

http://nationalatlas.gov

We’re living in an explosion of cheap, easy-to-get geographic data on the internet.

slide-5
SLIDE 5

Natural Earth Data: plain shapefiles, million+ downloads

http://naturalearthdata.com

Datasets like Natural Earth are widely available. Nathaniel publishes Natural Earth as a plain series of shapefiles, and has had hundreds of thousands of downloads from cartographers and mapmakers.

slide-6
SLIDE 6

A simple file download or URL should never be far away

For those things that can’t be gotten with a simple download, a simple URL should suffjce.

slide-7
SLIDE 7

“It ain’t Rocket Science, we’ve just made it seem like it is.” —Paul Ramsey

http://teczno.com/s/9b8

Most things should be gettable with dumb files in directories. *Paul Ramsey rant about FTP* I spent weeks locating non-seamless, non-UI zip files for NED and SRTM data before finally finding them.

slide-8
SLIDE 8

Uh oh.

“…we hit the era of what I’m calling Peak MHz in about 2004. That’s the point when processor speed effectively peaked as chip manufacturers began competing along other dimensions.” —Mike Kuniavsky, http://sta.mn/5cm

Peak MHz: uh oh. Our computers haven’t actually gotten significantly faster in almost ten years. They’ve gotten smaller, and able to do more things at once, but not faster. Our typical internet has also not gotten faster in ten years. It’s everywhere now including the BART tunnel, but for a lot of typical users it’s actually smaller.

slide-9
SLIDE 9

OSM demand continues to grow

http://teczno.com/s/cbz

OSM is getting hugely popular, 5 of the 6 map projects in Atlantic Cities’s “12 Fresh Ideas” choose

  • OSM. How do they use them? Dumb tile URLs. Which one doesn’t? The one with satellite imagery and

fancy choropleths.

slide-10
SLIDE 10

Planet file is now 27GB

OSM data is getting bigger, though. When I first publicly talked about this a year and a half ago, the planet file was a paltry 19GB. Now it’s 27GB and growing all the time.

slide-11
SLIDE 11

http://sta.mn/gjh

PostGIS is not getting any easier to administer, especially if you’re a newspaper or a civic data gadfly.

slide-12
SLIDE 12

http://sta.mn/gjh

slide-13
SLIDE 13

OSM data is getting bigger, more difficult, and slower to handle.

slide-14
SLIDE 14

OSM extracts help, sort–of.

http://metro.teczno.com

I’ve helped this situation some on the past by creating metro extracts, which helps on just one dimension of ease by making shapefiles for small urban areas available. If you’re not looking for one of these almost cities and can’t wait for me to accept a pull request, you are out of luck.

slide-15
SLIDE 15

Meanwhile, on your telephone…

http://teczno.com/s/14s

But! We’re starting to see the next steps beyond raster tiles, and they’re coming to us on our mobile phones in iOS, Google and Nokia maps. Bottom line: this stufg should be easy.

slide-16
SLIDE 16

It’s time for OSM to get (more) creative about distribution.

It’s time for OpenStreetMap to get creative (again) about how its data is distributed.

slide-17
SLIDE 17

Time for vector tiles! (tl;dr: teczno.com/s/r3p)

Why are vector tiles right for now?

slide-18
SLIDE 18

Tiles over HTTP are easy: edge caches, REST, etc.

http://sta.mn/xq

They’re easy to bake and distribute. Vector tiles are cheaper to render than image tiles, because there’s no server-side rasterization step beyond the packaging of the data. Distribution is easier thanks to all the HTTP infrastructure that we’re now able to take for granted: edge caches like Fastly, etc.

slide-19
SLIDE 19

They’ve worked well before; we used BSON & PVR for iOS

http://sta.mn/v7f

(talk GeoJSON vs. BSON + National Geographic here? backend infrastructure of that project)

slide-20
SLIDE 20

Storage is cheap, rendering is last-mile

Storage for these things is cheap. You can imagine putting an entire world of render-ready tile onto a single small hard drive, the size wouldn’t be much larger than planet itself. Most of that size is buildings anyway. Rendering can be a last-mile problem, with fast, high-quality GPU in everyone’s pocket.

slide-21
SLIDE 21

Google uses pure vector at z16+

(Show some screen grabs of Google iOS maps with tile boundaries visible)

slide-22
SLIDE 22

Simple formats like GeoJSON work well, with clipped precision

E.g. , “37.123456” instead of “37.1234567890…”

(Talk relative effjciency of GeoJSON with clipped precision; show Rainbow Road map)

slide-23
SLIDE 23

GeoJSON tiles + WebGL, sorted.

http://teczno.com/s/m0x

slide-24
SLIDE 24

Debugging Boston’s z-index

http://teczno.com/s/hjk

slide-25
SLIDE 25

http://teczno.com/s/djb

Browser technologies like WebGL are an obvious way forward for showing this stufg. Google has had GL in its maps for a year now, though it’s a useless gimmick from our point of view without a data API.

slide-26
SLIDE 26

WKB data with clipped precision also compresses well

E.g. replace three bytes in each double-precision floating point value with 0x00, then zlib that

(Talk MVT specifically)

slide-27
SLIDE 27

Small size, easy to parse, easy to describe

Three kinds of efficiency for file formats

Two kinds of effjciency for a file format:

  • small size
  • easy to parse

A third kind of effjciency:

  • easy for a programmer to understand
slide-28
SLIDE 28

And so: Mapnik Vector Tiles teczno.com/s/r3p

With the introduction of Mapnik Python Datasource last year, we can use vector tiles right in our favorite raster renderer.

slide-29
SLIDE 29

Currently, Four Layers

  • Streets
  • Street Labels
  • Urban Areas (parks, schools, etc.)
  • Water
slide-30
SLIDE 30

Use with Carto & Mapnik

{ "type": "python", "factory": "TileStache.Goodies.VecTiles:Datasource", "template":

"http://tile.openstreetmap.us/vectiles-highroad/{z}/{x}/{y}.mvt",

}

slide-31
SLIDE 31

(not Tile Mill, yet)

slide-32
SLIDE 32

Render your own hills

http://mapy.cz

slide-33
SLIDE 33

Combine streets and data

slide-34
SLIDE 34

Go nuts.

http://sta.mn/pm

slide-35
SLIDE 35

teczno.com/s/r3p

slide-36
SLIDE 36

Thank you.

@michalmigurski mike.teczno.com