Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tiles
.gitignore
LICENSE
README.md
austria.png
index.html
index.js
italy.png
leaflet-hash.js
map.js
package.json
plot.gp
thumb.png

README.md

tortuOSMity

Calculates road-curviness from OpenStreetMap data using osm-qa-tiles and tile-reduce.

Here, the curviness is defined as the average quotient between road length and end-to-end beeline distance of each osm way tagged as a highway (primary, …, residential) in each zoom-level 12 mercator tile. Each pixel in the output corresponds to one of these tiles and is colored according from violet (where the length quotient is near 1 which means almost straight roads) to red (quotient >= 2).

how to

$ npm install
<install gnuplot, parallel, optipng, imagemagick>
$ node index.js "path to planet.mbtiles" > world.txt
$ gnuplot plot.gp
$ cd tiles
$ for i in {0..15}; do mkdir $i; done
$ convert ../world.png -crop 256x256 -set filename:tile "%[fx:page.x/256]/%[fx:page.y/256]" +repage +adjoin "%[filename:tile].png"
$ find -type f | parallel optipng

result

(click for world map)

see also