Home
Softono

Every Street

Open source MIT JavaScript
80
Stars
9
Forks
5
Issues
7
Watchers
8 years
Last Commit

 About Every Street

Drawing every street in Romania using OpenStreetMap data, Node.js and SVG

Platforms

Web Self-hosted

Languages

JavaScript

Need Help Installing Every Street?

We provide expert installation service for this software. Our team will install, configure, and secure Every Street on your server. plans start at just $30.

Every Street

View on GitHub

every-street

Draw every street in Romania, based on OpenStreetMap data.

Sample

Read the article here: http://danburzo.ro/every-street

Installing

Clone this repository and run npm install on it.

Using

Here's how to create a similar map for any area:

  1. Dowload an .osm.pbf OpenStreetMap data file for your country/area from download.geofabrik.de and place it into data/data.osm.pbf.
  2. node tools/extract-data.js to extract node data into output/nodes.txt and street data into output/streets.txt;
  3. node tools/load-nodes.js to load the nodes into a database so they can be looked up;
  4. node tools/apply-nodes.js to replace the node IDs in your street file with the actual coordinates of the nodes into output/streets-with-coordinates.txt;
  5. node tools/bbox.js to compute the bounding box and the aspect ratio for the map area into output/bbox.json;
  6. node tools/map-coords.js to transform the geographical coordinates to screen coordinates using a Spherical Mercator projection into output/streets-with-coordinates-mapped.txt;
  7. node tools/generate-svg.js to generate the final SVG.

Or, if you're brave enough, run them all in one fell swoop:

node tools/extract-data.js && node tools/load-nodes.js && node tools/apply-nodes.js && node tools/bbox.js && node tools/map-coords.js && node tools/generate-svg.js

...and wait... and wait.

Converting the SVG to PNG

ImageMagick has worked for me:

convert -density 900 output/streets.svg output/streets.png