All examples By author By category About

Fil

World roads (topojson mesh + simplify)

We use topojson tools to get the roads data file as small as possible.

Data from Natural Earth.

Makefile (thank you @mbostock!)

ne_10m_roads.json:
	wget https://github.com/visionscarto/some-geo-data/blob/master/ne_10m_roads.json

roads_4-simplified.json:
	ndjson-cat ne_10m_roads.json | ndjson-split 'd.features' | ndjson-filter 'd.properties.scalerank <= 4' | ndjson-reduce 'delete d.properties,p.features.push(d), p' '{type: "FeatureCollection", features: []}' | geo2topo roads=- > roads_4.json
	toposimplify --spherical-quantile 0.05 roads_4.json | topomerge --mesh roads=roads --filter 'true' | topoquantize 2e4 > roads_4-simplified.json