All Projects → hotosm → osm-analytics-cruncher

hotosm / osm-analytics-cruncher

Licence: other
Backend code for osm-analytics

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to osm-analytics-cruncher

osmose-backend
Part of osmose that runs the analysis, and send the results to the frontend.
Stars: ✭ 74 (+428.57%)
Mutual labels:  openstreetmap, openstreetmap-data
taghistory
📈 History of OSM tag usage
Stars: ✭ 33 (+135.71%)
Mutual labels:  openstreetmap, openstreetmap-data
vectorpipe
Convert Vector data to VectorTiles with GeoTrellis.
Stars: ✭ 64 (+357.14%)
Mutual labels:  vector-tiles, openstreetmap
map
🏳️‍🌈🗺 A map of community centers and other helpful information for queer (LGBTQ) people.
Stars: ✭ 15 (+7.14%)
Mutual labels:  openstreetmap, openstreetmap-data
HMap
:earth: HMap | 基于openlayers的封装组件
Stars: ✭ 64 (+357.14%)
Mutual labels:  vector-tiles, openstreetmap
tilekiln
No description or website provided.
Stars: ✭ 3 (-78.57%)
Mutual labels:  vector-tiles, openstreetmap
cloud-tileserver
Serve mapbox vectortiles via AWS stack
Stars: ✭ 48 (+242.86%)
Mutual labels:  vector-tiles, openstreetmap
planetiler
Flexible tool to build planet-scale vector tilesets from OpenStreetMap data fast
Stars: ✭ 823 (+5778.57%)
Mutual labels:  vector-tiles, openstreetmap
oshdb
OpenStreetMap History Data Analysis Framework
Stars: ✭ 82 (+485.71%)
Mutual labels:  openstreetmap, openstreetmap-data
cosmogony
easy to use & easy to update geographic regions
Stars: ✭ 90 (+542.86%)
Mutual labels:  openstreetmap, openstreetmap-data
pydriosm
PyDriosm: an open-source tool for downloading, reading and PostgreSQL-based I/O of OpenStreetMap data
Stars: ✭ 42 (+200%)
Mutual labels:  openstreetmap, openstreetmap-data
ohsome-api
API for analysing OpenStreetMap history data
Stars: ✭ 25 (+78.57%)
Mutual labels:  openstreetmap, openstreetmap-data
openstreetmap-carto-vector-tiles
A general-purpose OpenStreetMap mapnik style, in CartoCSS, served with vector tiles
Stars: ✭ 46 (+228.57%)
Mutual labels:  vector-tiles, openstreetmap
mapsplit
A fast way to split OSM data in to a portable tiled format
Stars: ✭ 55 (+292.86%)
Mutual labels:  vector-tiles, openstreetmap
osm-extracts
Each day, OSM Extracts by Interline mirrors the entire OpenStreetMap planet and creates city and region sized extracts
Stars: ✭ 34 (+142.86%)
Mutual labels:  openstreetmap, openstreetmap-data
Osmunda
An offline geocode library for android, powered by SQLite, using osm data. 离线地理编码Android库,基于SQLite,使用开放街道地图数据。
Stars: ✭ 37 (+164.29%)
Mutual labels:  openstreetmap, openstreetmap-data
qgis-maptiler-plugin
QGIS MapTiler Plugin: vector tiles, basemaps, geocoding, OSM, QuickMapServices
Stars: ✭ 73 (+421.43%)
Mutual labels:  vector-tiles, openstreetmap
ohsome-quality-analyst
Data quality estimations for OpenStreetMap
Stars: ✭ 28 (+100%)
Mutual labels:  openstreetmap, openstreetmap-data
openpoiservice
📍 Openpoiservice is a flask application which hosts a highly customizable points of interest database derived from OpenStreetMap data.
Stars: ✭ 134 (+857.14%)
Mutual labels:  openstreetmap, openstreetmap-data
osm-node-density
🌇 a visualization of OpenStreetMaps node density
Stars: ✭ 48 (+242.86%)
Mutual labels:  openstreetmap, openstreetmap-data

osm data analysis tool backend

Backend for an OSM data analysis tool. Uses osm-qa-tiles as input data.

Requirements

If you want to use the cruncher natively, you'll need:

  • NodeJS
  • NPM

Be sure to run npm install before running the commands bellow

Alternatively, you can install and use docker and docker-compose.

Usage

The tool is split in two parts: data generation and serving.

Data generation

Invoking app/run.sh (or ./docker.sh gen command in a docker environment) starts the process to re-generate osm-analytics data. It will automatically download a fresh osm-qa-tiles planet file, crunch the data and stores the results in a supplied directory.

Environment Variables

The data generation can be configured by setting the following shell environment variables:

  • ANALYTICS_FILE – file defining analytics job (e.g. what layers to crunch), see example-analytics.json for an example
  • WORKING_DIR – working directory where intermediate data is stored
  • RESULTS_DIR – directory where resulting .mbtiles files are stored
  • OSMQATILES_SOURCE – URL to fetch osmqatiles from

analytics.json

The data generation process is controlled via a single "analytics definition file", which specifies which parts of the OpenStreetMap data has to be processed in which way and how the result should be interpreted. An example can be found at app/example-analytics.json. Further details about this file can be found in the specification document.

Serving data

Natively

The app/server/serve.js script is an example for how to provide the data to the osm-analytics frontend over the web. It expects the directory where the result of the crunching step is stored and the analytics definition json file as parameters.

With docker

You can use the ./docker server buildings.mbtile command to serve a pre-computed mbtile file. The mbtile file must be available in the ./results local folder.

Running the cruncher using a cron task

The cruncher alternates between periods of heavy processing and no load at all after that. Due to this, it is worth considering an execution environment that does not rely on an always-on server, but rather on a job-based approach. This can be achieved using Google Cloud and the following command:

gcloud compute --project "osma-174310" instances create "osma-cruncher" --zone "us-central1-c" --machine-type "custom-16-30720" --subnet "default" --maintenance-policy "MIGRATE" --service-account <your google data> --scopes "https://www.googleapis.com/auth/cloud-platform" --image "osma-cruncher-v2" --image-project "osma-174310" --boot-disk-size "100" --boot-disk-type "pd-ssd" --boot-disk-device-name "osma-cruncher"

Its worth noting that this is not a requirement of the cruncher, nor a dependency on Google Cloud. A similar approach can be achieved with different hosting services with no code changes, and the cruncher can be set up periodically on a "traditional", always-on server.

Hardware profile

The crunching process is a resource-intensive task, requiring significant CPU, memory and storage to execute. To the date of these tests, the cruncher required 16 processing cores, 30GB of RAM and 100GB of storage to process the data in around 6h.

The necessary storage space depends on the amount of data input and output, so it may need to vary if the OSM tiles grow in size, or if more features need to be processed.

CPU and RAM are linearly correlated, and mostly dictate the time it takes to process the whole data.

Documentation

An overview of all steps required to implement an instance of osm-analytics can be found here (work in progress).

A schematic diagram of the different components of the cruncher are found in the documentation directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].