From 792eafc298026d6dcb550a45b2d0cbeb4b0d1e0e Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Thu, 17 Dec 2015 10:51:54 +0100 Subject: [PATCH] Update imposm article --- docs/imposm-schema.md | 84 ++++++++++++++++++++++++++++++++++++++++--- docs/index.md | 2 +- 2 files changed, 81 insertions(+), 5 deletions(-) diff --git a/docs/imposm-schema.md b/docs/imposm-schema.md index 4efc714..c732f69 100644 --- a/docs/imposm-schema.md +++ b/docs/imposm-schema.md @@ -10,15 +10,91 @@ Imposm3 allows to do alot of work up front. We decided to use an explicit mapping instead of an implicit one with the advantage that we always know exactly which values are in the database. -The tables are modelled pretty close to the layer who are using it. This is for performance -purposes. +The tables are modelled pretty close to the layer reference for performance reasons. -## Schema +## Mapping File -![Imposm Mapping Schema](/media/table_to_layer_mapping.png) +We started of with the default imposm mapping schema and modified it extensively to fit our needs. +We welcome you to +[explore the mapping file](https://github.com/osm2vectortiles/osm2vectortiles/blob/master/src/import-osm/mapping.yml) +and take the mappings that you need for your project, +as alot of knowledge is contained in the mapping file. ## Used Keys Most OSM key value pairs are used in the `poi_points` and `poi_polygons` tables. ![Imposm Mapping Schema](/media/mapping_graph.png) + +## Mapping Example + +Example mapping for the landusages table. + +```yaml +tables: + landusages: + type: polygon + fields: + - name: osm_id + type: id + - name: geometry + type: geometry + - name: type + type: mapping_value + mapping: + landuse: + - allotments + - farm + - farmland + - farmyard + - orchard + - greenhouse_horticulture + - plant_nursery + - vineyard + - grass + - grassland + - meadow + - industrial + - park + - village_green + - recreation_ground + - forest + - cemetery + - beach + leisure: + - park + - playground + - dog_park + - national_reserve + - nature_reserve + - golf_course + - common + - garden + - recreation_ground + - sports_centre + - pitch + natural: + - glacier + - sand + - wood + - scrub + - wetland + - mud + wetland: + - marsh + - swamp + - tidalflat + - bog + amenity: + - hospital + - school + - college + - university + cemetery: + - __any__ + boundary: + - national_park + tourism: + - zoo + - camp_site +``` diff --git a/docs/index.md b/docs/index.md index 85119fb..2648b27 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,4 +33,4 @@ Targeted at people who want to reuse our process or want to contribute. - Import and Export - [Import and Export Process](/docs/import-export-process) - [Database Schema](/docs/database-schema) - - [Imposm Mapping Schema](/docs/imposm-schema) + - [Imposm Mapping](/docs/imposm-schema)