- install node/npm, curl
- compile and install tippecanoe (version 1.8.1 works, not sure about newer releases)
- download
run.shfrom cruncher repo andchmod +xit - replace osmqatiles-planet url with the extract you want
- adjust paths in
run.sh(and mkdir the respective working directories) - comment out
hotprojects.sh(would fail because it requires valid AWS credentials to upload stuff into a hardcoded bucket). - comment out the
forever restart …lines (requires a tile-serving script to be already running) - execute
run.sh-> … -> two.mbtilesfiles in results directory
There are some options:
- use mb-util (e.g.
mb-util --image_format=pbf buildings.mbtile buildings) to unpack mbtiles file and serve it via a local web server (or upload the data to S3, or …). - use mapbox-tile-copy to upload contents directly to S3
- use a server script like the example in the repo that serves tiles directly from the mbtiles file. (code needs to be adjusted!)
HTTP API schema is:
http://.../.../<feature-type>/<z>/<x>/<y>.pbf
where feature-type is buildings,highways, etc.
The web server needs to return proper CORS headers, the Content-Encoding=gzip header (!) and the Content-Type header needs to be either application/x-protobuf or application/octet-stream.
- clone repo
git clone https://github.com/hotosm/osm-analytics - run
npm install - adjust base-url setting in
./app/settings/settings.js - run
npm start(for a development-server) ornpm run buildto build a production build (results as HTML5 in./static)
(not yet tested, sorry)
- on frontend side: add new type in
./app/settings/options.js(as entry infiltersarray) - on backend:
- add new type definition json file (like
buildings.json) (use"objects"as a generic user-experience field) - add a new crunching section in
run.shfor the newly created feature type - serve results (see above)
- add new type definition json file (like