Skip to content
Gather infrastructure insights from OSM quickly
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.eslintrc Add readme Jan 30, 2019
.gitignore first commit Jan 29, 2019
.nvmrc Add readme Jan 30, 2019
README.md
index.js
map.js format Feb 5, 2019
package-lock.json
package.json Update readme Feb 7, 2019

README.md

OSM road/building coverage by tiles

This is a script to get the road and buildings coverage by tiles using the OpenStreetMap data.

ezgif com-optimize

Installation

$ git clone https://github.com/developmentseed/osm-coverage-tiles.git
$ cd osm-coverage-tiles/
$ npm link

Usage

$ osmcov <file.mbtiles> --zoom=15 > output.json

Arguments

  • zoom, It should be the same zoom as the mbtiles.
  • bbox, We could pass this parameter to reduce the size of evaluation.

Where to get the Mbtiles?

Creating our own Mbtiles

For creating the mbtiles is necesary to use minjur and tippecanoe, both tool we could find in geokit.

$ wget http://download.geofabrik.de/south-america/colombia-latest.osm.bz2
$ docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest minjur colombia-latest.osm.bz2 > colombia.geojson
$ docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest tippecanoe -l osm -n osm-latest -o colombia.mbtiles -z15 -Z15 -psfk colombia.geojson
docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest osmcov colombia.mbtiles --zoom=15 > colombia-output.json

Note

The output of osmcov command is a json file, which needs to cover into a geojson file, for it we use the geokit.

$ docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit osmcov <file.mbtiles> --zoom=15 > colombia-output.json
$ docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit jsonlines2geojson colombia-output.json > colombia-tiles.geojson
You can’t perform that action at this time.