Update imposm article

pull/344/head
Lukas Martinelli 2015-12-17 10:51:54 +01:00
rodzic dc1e61a363
commit 792eafc298
2 zmienionych plików z 81 dodań i 5 usunięć

Wyświetl plik

@ -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
```

Wyświetl plik

@ -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)