Slide 1

Slide 1 text

hello, friends!

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

random cool stuff I’ve been hacking on JSGeo, August 15th 2017 Vlad (mostly spatial indices)

Slide 4

Slide 4 text

github.com/mourner/rbush

Slide 5

Slide 5 text

box queries

Slide 6

Slide 6 text

finding nearest neighbors

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

• rendering and querying shapes in OpenLayers • processing shapes in MapShaper • placing labels and handling annotations in iD OpenStreetMap editor • interactive plotting in Bokeh real time apps

Slide 12

Slide 12 text

• deriving road speed profiles and live traffic from telemetry data • deriving lane geometry, turn restrictions, one-way roads, sidewalks from telemetry data • detecting and fixing issues in OSM data • comparing road networks (e.g. OSM vs TIGER) map matching / processing

Slide 13

Slide 13 text

map matching / processing • matching Wikidata against OSM for geocoding • TurfJS modules like line-intersect, line-split, line- overlap, dissolve, mask, collect • matching features against polygons (e.g. administrative classification) • concaveman: generating an outline of a point set

Slide 14

Slide 14 text

github.com/mapbox/tile-reduce

Slide 15

Slide 15 text

osmlab.github.io/osm-qa-tiles

Slide 16

Slide 16 text

tile-reduce

Slide 17

Slide 17 text

which polygon?

Slide 18

Slide 18 text

github.com/mapbox/which-polygon

Slide 19

Slide 19 text

github.com/mapbox/linematch

Slide 20

Slide 20 text

buffer, union, difference: slow

Slide 21

Slide 21 text

github.com/mapbox/linematch freaking fast

Slide 22

Slide 22 text

github.com/mapbox/lineclip freaking fast

Slide 23

Slide 23 text

github.com/mourner/rbush-knn

Slide 24

Slide 24 text

distance from a point to a bounding box

Slide 25

Slide 25 text

distance from a segment to a bounding box

Slide 26

Slide 26 text

github.com/mapbox/concaveman

Slide 27

Slide 27 text

github.com/mapbox/concaveman

Slide 28

Slide 28 text

github.com/mourner/kdbush

Slide 29

Slide 29 text

github.com/mourner/kdbush •supports points only (not boxes) •can’t add/remove points dynamically •indexing is 5–8 times faster

Slide 30

Slide 30 text

github.com/mapbox/supercluster

Slide 31

Slide 31 text

github.com/mapbox/supercluster

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

geodesic nearest neighbors?

Slide 34

Slide 34 text

distance from a point to a bounding box on a sphere?!

Slide 35

Slide 35 text

bbox on a sphere

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

convert to 3D coords?

Slide 38

Slide 38 text

convert to 3D coords? •can’t use the same index for bounding box queries •imprecise for bigger distances •indexing and querying can be slow

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

when you found a use for differential math for the first time in a 13-year career

Slide 43

Slide 43 text

github.com/mourner/geokdbush

Slide 44

Slide 44 text

measuring distances fast

Slide 45

Slide 45 text

measuring distances fast

Slide 46

Slide 46 text

euclidean geometry with lat/lon

Slide 47

Slide 47 text

euclidean geometry with lat/lon

Slide 48

Slide 48 text

github.com/mapbox/cheap-ruler •distance •bearing •destination •lineDistance •area •along •pointOnLine •lineSlice •lineSliceAlong •bufferPoint •bufferBBox •insideBBox freaking fast!

Slide 49

Slide 49 text

github.com/mapbox/earcut

Slide 50

Slide 50 text

github.com/mapbox/delaunator

Slide 51

Slide 51 text

github.com/mapbox/alpha-shake coming soon…

Slide 52

Slide 52 text

github.com/mapbox/polysnap coming soon… my long-time nemesis

Slide 53

Slide 53 text

github.com/mapbox/geobuf GeoJSON <–> compact binary lossless & freaking fast!

Slide 54

Slide 54 text

github.com/mapbox/webgl-wind

Slide 55

Slide 55 text

awesome job alert: GL Map Rendering Engineer grnh.se/7g6l4h1