Merge branch 'master' into feature/transportation
Conflicts: Makefile layers/transportation/README.md layers/transportation/mapping.png layers/transportation_name/README.md
42
Makefile
@@ -1,8 +1,5 @@
|
|||||||
all: build/openmaptiles.tm2source/data.yml build/mapping.yaml build/tileset.sql
|
all: build/openmaptiles.tm2source/data.yml build/mapping.yaml build/tileset.sql
|
||||||
|
|
||||||
.PHONY: docs
|
|
||||||
docs: layers/railway/README.md layers/boundary/README.md layers/water/README.md layers/building/README.md layers/transportation/README.md layers/transportation_name/README.md layers/poi/README.md layers/place/README.md layers/waterway/README.md layers/water_name/README.md layers/landcover/README.md layers/landuse/README.md layers/housenumber/README.md
|
|
||||||
|
|
||||||
build/openmaptiles.tm2source/data.yml:
|
build/openmaptiles.tm2source/data.yml:
|
||||||
mkdir -p build/openmaptiles.tm2source && generate-tm2source openmaptiles.yaml --host="postgres" --port=5432 --database="openmaptiles" --user="openmaptiles" --password="openmaptiles" > build/openmaptiles.tm2source/data.yml
|
mkdir -p build/openmaptiles.tm2source && generate-tm2source openmaptiles.yaml --host="postgres" --port=5432 --database="openmaptiles" --user="openmaptiles" --password="openmaptiles" > build/openmaptiles.tm2source/data.yml
|
||||||
|
|
||||||
@@ -12,44 +9,5 @@ build/mapping.yaml:
|
|||||||
build/tileset.sql:
|
build/tileset.sql:
|
||||||
mkdir -p build && generate-sql openmaptiles.yaml > build/tileset.sql
|
mkdir -p build && generate-sql openmaptiles.yaml > build/tileset.sql
|
||||||
|
|
||||||
layers/poi/README.md:
|
|
||||||
generate-doc layers/poi/poi.yaml --diagram layers/poi/mapping > layers/poi/README.md
|
|
||||||
|
|
||||||
layers/transportation/README.md:
|
|
||||||
generate-doc layers/transportation/transportation.yaml --diagram layers/transportation/mapping > layers/transportation/README.md
|
|
||||||
|
|
||||||
layers/transportation_name/README.md:
|
|
||||||
generate-doc layers/transportation_name/transportation_name.yaml > layers/transportation_name/README.md
|
|
||||||
|
|
||||||
layers/railway/README.md:
|
|
||||||
generate-doc layers/railway/railway.yaml --diagram layers/railway/mapping > layers/railway/README.md
|
|
||||||
|
|
||||||
layers/boundary/README.md:
|
|
||||||
generate-doc layers/boundary/boundary.yaml --diagram layers/boundary/mapping > layers/boundary/README.md
|
|
||||||
|
|
||||||
layers/water_name/README.md:
|
|
||||||
generate-doc layers/water_name/water_name.yaml > layers/water_name/README.md
|
|
||||||
|
|
||||||
layers/water/README.md:
|
|
||||||
generate-doc layers/water/water.yaml --diagram layers/water/mapping > layers/water/README.md
|
|
||||||
|
|
||||||
layers/waterway/README.md:
|
|
||||||
generate-doc layers/waterway/waterway.yaml --diagram layers/waterway/mapping > layers/waterway/README.md
|
|
||||||
|
|
||||||
layers/building/README.md:
|
|
||||||
generate-doc layers/building/building.yaml > layers/building/README.md
|
|
||||||
|
|
||||||
layers/place/README.md:
|
|
||||||
generate-doc layers/place/place.yaml --diagram layers/place/mapping > layers/place/README.md
|
|
||||||
|
|
||||||
layers/landuse/README.md:
|
|
||||||
generate-doc layers/landuse/landuse.yaml --diagram layers/landuse/mapping > layers/landuse/README.md
|
|
||||||
|
|
||||||
layers/landcover/README.md:
|
|
||||||
generate-doc layers/landcover/landcover.yaml --diagram layers/landcover/mapping > layers/landcover/README.md
|
|
||||||
|
|
||||||
layers/housenumber/README.md:
|
|
||||||
generate-doc layers/housenumber/housenumber.yaml > layers/housenumber/README.md
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f build/openmaptiles.tm2source/data.yml && rm -f build/mapping.yaml && rm -f build/tileset.sql
|
rm -f build/openmaptiles.tm2source/data.yml && rm -f build/mapping.yaml && rm -f build/tileset.sql
|
||||||
|
|||||||
26
README.md
@@ -17,19 +17,19 @@ We welcome new standard layers from other data sources or import tools (like osm
|
|||||||
Each layer is documented and self contained. Click on the link for each layer to get more information.
|
Each layer is documented and self contained. Click on the link for each layer to get more information.
|
||||||
Layers can be chosen to create a **Tileset** like the `openmaptiles.yaml` tileset.
|
Layers can be chosen to create a **Tileset** like the `openmaptiles.yaml` tileset.
|
||||||
|
|
||||||
- [boundary](layers/boundary/README.md)
|
- [boundary](https://github.com/openmaptiles/openmaptiles/wiki/boundary)
|
||||||
- [building](layers/building/README.md)
|
- [building](https://github.com/openmaptiles/openmaptiles/wiki/building)
|
||||||
- [highway](layers/highway/README.md)
|
- [highway](https://github.com/openmaptiles/openmaptiles/wiki/highway)
|
||||||
- [highway_name](layers/highway_name/README.md)
|
- [highway_name](https://github.com/openmaptiles/openmaptiles/wiki/highway_name)
|
||||||
- [housenumber](layers/housenumber/README.md)
|
- [housenumber](https://github.com/openmaptiles/openmaptiles/wiki/housenumber)
|
||||||
- [landcover](layers/landcover/README.md)
|
- [landcover](https://github.com/openmaptiles/openmaptiles/wiki/landcover)
|
||||||
- [landuse](layers/landuse/README.md)
|
- [landuse](https://github.com/openmaptiles/openmaptiles/wiki/landuse)
|
||||||
- [place](layers/place/README.md)
|
- [place](https://github.com/openmaptiles/openmaptiles/wiki/place)
|
||||||
- [poi](layers/poi/README.md)
|
- [poi](https://github.com/openmaptiles/openmaptiles/wiki/poi)
|
||||||
- [railway](layers/railway/README.md)
|
- [railway](https://github.com/openmaptiles/openmaptiles/wiki/railway)
|
||||||
- [water](layers/water/README.md)
|
- [water](https://github.com/openmaptiles/openmaptiles/wiki/water)
|
||||||
- [water_name](layers/water_name/README.md)
|
- [water_name](https://github.com/openmaptiles/openmaptiles/wiki/water_name)
|
||||||
- [waterway](layers/waterway/README.md)
|
- [waterway](https://github.com/openmaptiles/openmaptiles/wiki/waterway)
|
||||||
|
|
||||||
### Define your own Layer
|
### Define your own Layer
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
image: "openmaptiles/postgis:2.2"
|
image: "openmaptiles/postgis:2.2"
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- "5432"
|
- "5432"
|
||||||
env_file: .env
|
env_file: .env
|
||||||
import-natural-earth:
|
import-natural-earth:
|
||||||
image: "openmaptiles/import-natural-earth"
|
image: "openmaptiles/import-natural-earth:1.0"
|
||||||
env_file: .env
|
env_file: .env
|
||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
@@ -20,7 +20,7 @@ services:
|
|||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
import-lakelines:
|
import-lakelines:
|
||||||
image: "openmaptiles/import-lakelines"
|
image: "openmaptiles/import-lakelines:0.9"
|
||||||
env_file: .env
|
env_file: .env
|
||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# boundary
|
|
||||||
|
|
||||||
Contains administrative boundaries as linestrings (no maritime boundaries yet) as linestrings.
|
|
||||||
Until z7 [Natural Earth data](http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-0-countries/)
|
|
||||||
is used after which OSM boundaries ([`boundary=administrative`](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative)) are present from z8 to z14.
|
|
||||||
OSM data contains all [`admin_level`](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level)
|
|
||||||
but for most styles it makes sense to just style `admin_level=2` and `admin_level=4`.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **admin_level**: OSM [admin_level](http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#admin_level)
|
|
||||||
indicating the level of importance of this boundary.
|
|
||||||
At low zoom levels the Natural Earth boundaries are mapped to the equivalent admin levels.
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
@@ -56,6 +56,18 @@ CREATE OR REPLACE VIEW boundary_z5 AS (
|
|||||||
WHERE scalerank <= 7 AND featurecla = 'Adm-1 boundary'
|
WHERE scalerank <= 7 AND featurecla = 'Adm-1 boundary'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
-- etldoc: ne_10m_admin_0_boundary_lines_land -> boundary_z6
|
||||||
|
-- etldoc: ne_10m_admin_1_states_provinces_lines_shp -> boundary_z6
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW boundary_z6 AS (
|
||||||
|
SELECT geom, 2 AS admin_level
|
||||||
|
FROM ne_10m_admin_0_boundary_lines_land
|
||||||
|
UNION ALL
|
||||||
|
SELECT geom, 4 AS admin_level
|
||||||
|
FROM ne_10m_admin_1_states_provinces_lines_shp
|
||||||
|
WHERE scalerank <= 9 AND featurecla = 'Adm-1 boundary'
|
||||||
|
);
|
||||||
|
|
||||||
-- etldoc: ne_10m_admin_0_boundary_lines_land -> boundary_z7
|
-- etldoc: ne_10m_admin_0_boundary_lines_land -> boundary_z7
|
||||||
-- etldoc: ne_10m_admin_1_states_provinces_lines_shp -> boundary_z7
|
-- etldoc: ne_10m_admin_1_states_provinces_lines_shp -> boundary_z7
|
||||||
CREATE OR REPLACE VIEW boundary_z7 AS (
|
CREATE OR REPLACE VIEW boundary_z7 AS (
|
||||||
@@ -103,7 +115,7 @@ CREATE OR REPLACE VIEW boundary_z12 AS (
|
|||||||
);
|
);
|
||||||
|
|
||||||
-- etldoc: layer_boundary[shape=record fillcolor=lightpink, style="rounded,filled",
|
-- etldoc: layer_boundary[shape=record fillcolor=lightpink, style="rounded,filled",
|
||||||
-- etldoc: label="<sql> layer_boundary |<z0> z0 |<z1_2> z1_2 | <z3> z3 | <z4> z4 |<z5_6> z5_6 | <z7> z7 | <z8> z8 | <z9> z9 |<z10> z10 |<z11> z11 |<z12> z12|<z13_> z13_ " ]
|
-- etldoc: label="<sql> layer_boundary |<z0> z0 |<z1_2> z1_2 | <z3> z3 | <z4> z4 | <z5> z5 || <z6> z6 || <z7> z7 | <z8> z8 | <z9> z9 |<z10> z10 |<z11> z11 |<z12> z12|<z13> z13+"]
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION layer_boundary (bbox geometry, zoom_level int)
|
CREATE OR REPLACE FUNCTION layer_boundary (bbox geometry, zoom_level int)
|
||||||
RETURNS TABLE(geometry geometry, admin_level int) AS $$
|
RETURNS TABLE(geometry geometry, admin_level int) AS $$
|
||||||
@@ -120,8 +132,11 @@ RETURNS TABLE(geometry geometry, admin_level int) AS $$
|
|||||||
-- etldoc: boundary_z4 -> layer_boundary:z4
|
-- etldoc: boundary_z4 -> layer_boundary:z4
|
||||||
SELECT * FROM boundary_z4 WHERE geom && bbox AND zoom_level = 4
|
SELECT * FROM boundary_z4 WHERE geom && bbox AND zoom_level = 4
|
||||||
UNION ALL
|
UNION ALL
|
||||||
-- etldoc: boundary_z5 -> layer_boundary:z5_6
|
-- etldoc: boundary_z5 -> layer_boundary:z5
|
||||||
SELECT * FROM boundary_z5 WHERE geom && bbox AND zoom_level BETWEEN 5 AND 6
|
SELECT * FROM boundary_z5 WHERE geom && bbox AND zoom_level = 5
|
||||||
|
UNION ALL
|
||||||
|
-- etldoc: boundary_z6 -> layer_boundary:z6
|
||||||
|
SELECT * FROM boundary_z6 WHERE geom && bbox AND zoom_level = 6
|
||||||
UNION ALL
|
UNION ALL
|
||||||
-- etldoc: boundary_z7 -> layer_boundary:z7
|
-- etldoc: boundary_z7 -> layer_boundary:z7
|
||||||
SELECT * FROM boundary_z7 WHERE geom && bbox AND zoom_level = 7
|
SELECT * FROM boundary_z7 WHERE geom && bbox AND zoom_level = 7
|
||||||
@@ -141,7 +156,7 @@ RETURNS TABLE(geometry geometry, admin_level int) AS $$
|
|||||||
-- etldoc: boundary_z12 -> layer_boundary:z12
|
-- etldoc: boundary_z12 -> layer_boundary:z12
|
||||||
SELECT * FROM boundary_z12 WHERE geom && bbox AND zoom_level = 12
|
SELECT * FROM boundary_z12 WHERE geom && bbox AND zoom_level = 12
|
||||||
UNION ALL
|
UNION ALL
|
||||||
-- etldoc: boundary_z12 -> layer_boundary:z13_
|
-- etldoc: boundary_z12 -> layer_boundary:z13
|
||||||
SELECT * FROM boundary_z12 WHERE geom && bbox AND zoom_level >= 13
|
SELECT * FROM boundary_z12 WHERE geom && bbox AND zoom_level >= 13
|
||||||
) AS zoom_levels;
|
) AS zoom_levels;
|
||||||
$$ LANGUAGE SQL IMMUTABLE;
|
$$ LANGUAGE SQL IMMUTABLE;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.8 KiB |
@@ -3,27 +3,27 @@ generalized_tables:
|
|||||||
# etldoc: imposm3 -> osm_boundary_linestring_gen5
|
# etldoc: imposm3 -> osm_boundary_linestring_gen5
|
||||||
boundary_linestring_gen5:
|
boundary_linestring_gen5:
|
||||||
source: boundary_linestring
|
source: boundary_linestring
|
||||||
tolerance: 420.0
|
tolerance: 480.0
|
||||||
|
|
||||||
# etldoc: imposm3 -> osm_boundary_linestring_gen4
|
# etldoc: imposm3 -> osm_boundary_linestring_gen4
|
||||||
boundary_linestring_gen4:
|
boundary_linestring_gen4:
|
||||||
source: boundary_linestring
|
source: boundary_linestring
|
||||||
tolerance: 320.0
|
tolerance: 240.0
|
||||||
|
|
||||||
# etldoc: imposm3 -> osm_boundary_linestring_gen3
|
# etldoc: imposm3 -> osm_boundary_linestring_gen3
|
||||||
boundary_linestring_gen3:
|
boundary_linestring_gen3:
|
||||||
source: boundary_linestring
|
source: boundary_linestring
|
||||||
tolerance: 150.0
|
tolerance: 120.0
|
||||||
|
|
||||||
# etldoc: imposm3 -> osm_boundary_linestring_gen2
|
# etldoc: imposm3 -> osm_boundary_linestring_gen2
|
||||||
boundary_linestring_gen2:
|
boundary_linestring_gen2:
|
||||||
source: boundary_linestring
|
source: boundary_linestring
|
||||||
tolerance: 100.0
|
tolerance: 60.0
|
||||||
|
|
||||||
# etldoc: imposm3 -> osm_boundary_linestring_gen1
|
# etldoc: imposm3 -> osm_boundary_linestring_gen1
|
||||||
boundary_linestring_gen1:
|
boundary_linestring_gen1:
|
||||||
source: boundary_linestring
|
source: boundary_linestring
|
||||||
tolerance: 50.0
|
tolerance: 30.0
|
||||||
|
|
||||||
tables:
|
tables:
|
||||||
# etldoc: imposm3 -> osm_boundary_linestring
|
# etldoc: imposm3 -> osm_boundary_linestring
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# building
|
|
||||||
|
|
||||||
All [OSM Buildings](http://wiki.openstreetmap.org/wiki/Buildings). All building tags are imported ([`building=*`](http://wiki.openstreetmap.org/wiki/Key:building)). The buildings are not yet ready for 3D rendering support and any help to improve
|
|
||||||
this is welcomed.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **render_height**: An approximated height from levels and height of building after the method of Paul Norman in [OSM Clear](https://github.com/ClearTables/osm-clear). For future 3D rendering of buildings.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,21 +1,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- etldoc: layer_building[shape=record fillcolor=lightpink, style="rounded,filled",
|
-- etldoc: layer_building[shape=record fillcolor=lightpink, style="rounded,filled",
|
||||||
-- etldoc: label="layer_building | <z13> z13 | <z14_> z14_ " ] ;
|
-- etldoc: label="layer_building | <z13> z13 | <z14_> z14_ " ] ;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION layer_building(bbox geometry, zoom_level int)
|
CREATE OR REPLACE FUNCTION layer_building(bbox geometry, zoom_level int)
|
||||||
RETURNS TABLE(geom geometry, osm_id bigint, render_height numeric) AS $$
|
RETURNS TABLE(geom geometry, osm_id bigint, render_height int, render_min_height int) AS $$
|
||||||
SELECT geometry, osm_id,
|
SELECT geometry, osm_id, render_height, render_min_height
|
||||||
least(greatest(3, COALESCE(height, levels*3.66,5)),400)^.7::int AS render_height
|
|
||||||
FROM (
|
FROM (
|
||||||
|
|
||||||
-- etldoc: osm_building_polygon_gen1 -> layer_building:z13
|
-- etldoc: osm_building_polygon_gen1 -> layer_building:z13
|
||||||
SELECT osm_id, geometry, height, levels FROM osm_building_polygon_gen1
|
SELECT
|
||||||
|
osm_id, geometry,
|
||||||
|
NULL::int AS render_height, NULL::int AS render_min_height
|
||||||
|
FROM osm_building_polygon_gen1
|
||||||
WHERE zoom_level = 13 AND geometry && bbox AND area > 1400
|
WHERE zoom_level = 13 AND geometry && bbox AND area > 1400
|
||||||
UNION ALL
|
UNION ALL
|
||||||
-- etldoc: osm_building_polygon -> layer_building:z14_
|
-- etldoc: osm_building_polygon -> layer_building:z14_
|
||||||
SELECT osm_id, geometry, height, levels FROM osm_building_polygon
|
SELECT
|
||||||
|
osm_id, geometry,
|
||||||
|
greatest(5, COALESCE(height, levels*3.66,5))::int AS render_height,
|
||||||
|
greatest(0, COALESCE(min_height, min_level*3.66,0))::int AS render_min_height
|
||||||
|
FROM osm_building_polygon
|
||||||
WHERE zoom_level >= 14 AND geometry && bbox
|
WHERE zoom_level >= 14 AND geometry && bbox
|
||||||
) AS zoom_levels
|
) AS zoom_levels
|
||||||
ORDER BY render_height ASC, ST_YMin(geometry) DESC;
|
ORDER BY render_height ASC, ST_YMin(geometry) DESC;
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ layer:
|
|||||||
this is welcomed.
|
this is welcomed.
|
||||||
buffer_size: 4
|
buffer_size: 4
|
||||||
datasource:
|
datasource:
|
||||||
query: (SELECT geom FROM layer_building(!bbox!, z(!scale_denominator!))) AS t
|
query: (SELECT geom, render_height, render_min_height FROM layer_building(!bbox!, z(!scale_denominator!))) AS t
|
||||||
fields:
|
fields:
|
||||||
render_height: |
|
render_height: |
|
||||||
An approximated height from levels and height of building after the method of Paul Norman in [OSM Clear](https://github.com/ClearTables/osm-clear). For future 3D rendering of buildings.
|
An approximated height from levels and height of the building or building:part after the method of Paul Norman in [OSM Clear](https://github.com/ClearTables/osm-clear). For future 3D rendering of buildings.
|
||||||
|
render_min_height: |
|
||||||
|
An approximated height from levels and height of the bottom of the building or building:part after the method of Paul Norman in [OSM Clear](https://github.com/ClearTables/osm-clear). For future 3D rendering of buildings.
|
||||||
schema:
|
schema:
|
||||||
- ./building.sql
|
- ./building.sql
|
||||||
datasources:
|
datasources:
|
||||||
|
|||||||
@@ -17,13 +17,29 @@ tables:
|
|||||||
type: validated_geometry
|
type: validated_geometry
|
||||||
- name: area
|
- name: area
|
||||||
type: pseudoarea
|
type: pseudoarea
|
||||||
|
- name: building
|
||||||
|
key: building
|
||||||
|
type: string
|
||||||
- name: height
|
- name: height
|
||||||
key: height
|
key: height
|
||||||
type: integer
|
type: integer
|
||||||
|
- name: min_height
|
||||||
|
key: min_height
|
||||||
|
type: integer
|
||||||
- name: levels
|
- name: levels
|
||||||
key: levels
|
key: building:levels
|
||||||
|
type: integer
|
||||||
|
- name: min_level
|
||||||
|
key: building:min_level
|
||||||
type: integer
|
type: integer
|
||||||
mapping:
|
mapping:
|
||||||
|
building:part:
|
||||||
|
- __any__
|
||||||
building:
|
building:
|
||||||
- __any__
|
- __any__
|
||||||
|
filters:
|
||||||
|
exclude_tags:
|
||||||
|
- [ "building", "no" ]
|
||||||
|
- [ "building", "none" ]
|
||||||
|
- [ "building", "No" ]
|
||||||
type: polygon
|
type: polygon
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
# housenumber
|
|
||||||
|
|
||||||
Everything in OpenStreetMap which contains a `addr:housenumber` tag useful for labelling housenumbers on a map.
|
|
||||||
This adds significant size to *z14*. For buildings the centroid of the building is used as housenumber.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **housenumber**: Value of the [`addr:housenumber`](http://wiki.openstreetmap.org/wiki/Key:addr) tag.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# landcover
|
|
||||||
|
|
||||||
Landcover is used to describe the physical material at the surface of the earth. At lower zoom levels this is
|
|
||||||
from Natural Earth data for glaciers and ice shelves and at higher zoom levels the landcover is implied
|
|
||||||
by OSM tags (like `landuse` or `natural`).
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **class**: More generalized groups of either `farmland`, `ice`, `wood`, `grass` or `wetland`.
|
|
||||||
Use this to assign general colors to the landcover.
|
|
||||||
- **subclass**: Original value of either the `landuse`, `natural` or `wetland` tag.
|
|
||||||
Use this to do more precise styling.
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 56 KiB |
@@ -1,17 +0,0 @@
|
|||||||
# landuse
|
|
||||||
|
|
||||||
Landuse is used to describe use of land by humans.At lower zoom levels this is
|
|
||||||
from Natural Earth data for residential (urban) areas and at higher zoom levels mostly OSM `landuse` tags.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **class**: More generalized groups of either `park`, `school`, `hospital`, `railway`,
|
|
||||||
`cemetery`, `military`, `residential`. Use this to assign general for landuse.
|
|
||||||
- **subclass**: Original value of either the `amenity`, `landuse`, `leisure` or `boundary` tag.
|
|
||||||
Use this to do more precise styling.
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 37 KiB |
@@ -1,29 +0,0 @@
|
|||||||
# place
|
|
||||||
|
|
||||||
The place layer consists out of [countries](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry),
|
|
||||||
[states](http://wiki.openstreetmap.org/wiki/Tag:place%3Dstate) and [cities](http://wiki.openstreetmap.org/wiki/Key:place).
|
|
||||||
Apart from the roads this is also one of the more important layers to create a beautiful map.
|
|
||||||
We suggest you use different font styles and sizes to create a text hierarchy.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **name_en**: The english `name:en` value if available.
|
|
||||||
- **name**: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the POI.
|
|
||||||
- **rank**: Countries, states and the most important cities all have a `rank` to boost their importance on the map.
|
|
||||||
The `rank` field for counries and states ranges from `1` to `6` while the `rank` field for
|
|
||||||
cities ranges from `1` to `10` for the most important cities and continues from `10` serially based
|
|
||||||
on the local importance of the city (derived from population and city class).
|
|
||||||
Use the `rank` field to build a text hierarchy.
|
|
||||||
The rank value is a combination of the Natural Earth `scalerank`, `labelrank` and `datarank` values for countries
|
|
||||||
and states and for cities consists out of a shifted Natural Earth `scalerank` combined with a local rank
|
|
||||||
within a grid for cities that do not have a Natural Earth `scalerank`.
|
|
||||||
- **class**: Distinguish between `country`, `state` and other city classes like
|
|
||||||
`city`, `town`, `village`, `hamlet`, `suburb`, `neighbourhood` or `isolated_dwelling`.
|
|
||||||
Use this to separately style the different places according to their importance (usually country and state different
|
|
||||||
than cities).
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, class c
|
|||||||
FROM osm_city_point
|
FROM osm_city_point
|
||||||
WHERE geometry && bbox
|
WHERE geometry && bbox
|
||||||
AND ((zoom_level = 2 AND "rank" = 1)
|
AND ((zoom_level = 2 AND "rank" = 1)
|
||||||
OR (zoom_level BETWEEN 3 AND 7 AND "rank" <= zoom_level)
|
OR (zoom_level BETWEEN 3 AND 7 AND "rank" <= zoom_level + 1)
|
||||||
)
|
)
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT osm_id, geometry, name,
|
SELECT osm_id, geometry, name,
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 27 KiB |
@@ -1,31 +0,0 @@
|
|||||||
# poi
|
|
||||||
|
|
||||||
[Points of interests](http://wiki.openstreetmap.org/wiki/Points_of_interest) containing
|
|
||||||
a of a variety of OpenStreetMap tags. Mostly contains amenities, sport, shop and tourist POIs.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **class**: More general classes of POIs. If there is no more general `class` for the `subclass`
|
|
||||||
this field will contain the same value as `subclass`.
|
|
||||||
But for example for schools you only need to style the class `school` to filter the subclasses `school`
|
|
||||||
and `kindergarten`. Or use the class `shop` to style all shops.
|
|
||||||
- **name_en**: The english `name:en` value if available.
|
|
||||||
- **name**: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the POI.
|
|
||||||
- **rank**: The POIs are ranked ascending according to their importance within a grid. The `rank` value shows the
|
|
||||||
local relative importance of a POI within it's cell in the grid. This can be used to reduce label density at z14.
|
|
||||||
Since all POIs already need to be contained at `z14` you can use `less than rank=10` epxression to limit
|
|
||||||
POIs. At some point like z17 you can show all POIs.
|
|
||||||
- **subclass**: Original value of either the
|
|
||||||
[`amenity`](http://wiki.openstreetmap.org/wiki/Key:amenity),
|
|
||||||
[`leisure`](http://wiki.openstreetmap.org/wiki/Key:leisure),
|
|
||||||
[`landuse`](http://wiki.openstreetmap.org/wiki/Key:landuse),
|
|
||||||
[`sport`](http://wiki.openstreetmap.org/wiki/Key:sport),
|
|
||||||
[`tourism`](http://wiki.openstreetmap.org/wiki/Key:tourism)
|
|
||||||
or [`shop`](http://wiki.openstreetmap.org/wiki/Key:shop)
|
|
||||||
tag. Use this to do more precise styling.
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
@@ -4,15 +4,22 @@
|
|||||||
|
|
||||||
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
||||||
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, class text, subclass text, "rank" int) AS $$
|
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, class text, subclass text, "rank" int) AS $$
|
||||||
SELECT osm_id, geometry, name, NULLIF(name_en, ''), poi_class(subclass) AS class, subclass,
|
SELECT osm_id, geometry, NULLIF(name, '') AS name, NULLIF(name_en, '') AS name_en, poi_class(subclass) AS class, subclass,
|
||||||
row_number() OVER (
|
row_number() OVER (
|
||||||
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
||||||
ORDER BY poi_class_rank(poi_class(subclass)) ASC, length(name) DESC
|
ORDER BY CASE WHEN name = '' THEN 2000 ELSE poi_class_rank(poi_class(subclass)) END ASC
|
||||||
)::int AS "rank"
|
)::int AS "rank"
|
||||||
-- etldoc: osm_poi_point -> layer_poi:z14_
|
FROM (
|
||||||
FROM osm_poi_point
|
-- etldoc: osm_poi_point -> layer_poi:z14
|
||||||
WHERE geometry && bbox
|
SELECT * FROM osm_poi_point
|
||||||
AND zoom_level >= 14
|
WHERE geometry && bbox
|
||||||
AND name <> ''
|
AND zoom_level >= 14
|
||||||
ORDER BY "rank";
|
UNION ALL
|
||||||
|
-- etldoc: osm_poi_polygon -> layer_poi:z14
|
||||||
|
SELECT * FROM osm_poi_polygon
|
||||||
|
WHERE geometry && bbox
|
||||||
|
AND zoom_level >= 14
|
||||||
|
) as poi_union
|
||||||
|
ORDER BY "rank"
|
||||||
|
;
|
||||||
$$ LANGUAGE SQL IMMUTABLE;
|
$$ LANGUAGE SQL IMMUTABLE;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 521 KiB |
@@ -1,3 +1,296 @@
|
|||||||
|
|
||||||
|
# imposm3 mapping file for https://github.com/osm2vectortiles/imposm3
|
||||||
|
# Warning: this is not the official imposm3
|
||||||
|
|
||||||
|
# aerialway values , see http://taginfo.openstreetmap.org/keys/aerialway#values
|
||||||
|
def_poi_mapping_aerialway: &poi_mapping_aerialway
|
||||||
|
- station
|
||||||
|
|
||||||
|
# amenity values , see http://taginfo.openstreetmap.org/keys/amenity#values
|
||||||
|
def_poi_mapping_amenity: &poi_mapping_amenity
|
||||||
|
- arts_centre
|
||||||
|
- bank
|
||||||
|
- bar
|
||||||
|
- bbq
|
||||||
|
- bicycle_rental
|
||||||
|
- biergarten
|
||||||
|
- bus_station
|
||||||
|
- cafe
|
||||||
|
- cinema
|
||||||
|
- college
|
||||||
|
- community_centre
|
||||||
|
- courthouse
|
||||||
|
- dentist
|
||||||
|
- doctors
|
||||||
|
- embassy
|
||||||
|
- fast_food
|
||||||
|
- ferry_terminal
|
||||||
|
- fire_station
|
||||||
|
- food_court
|
||||||
|
- fuel
|
||||||
|
- grave_yard
|
||||||
|
- hospital
|
||||||
|
- ice_cream
|
||||||
|
- kindergarten
|
||||||
|
- library
|
||||||
|
- marketplace
|
||||||
|
- nightclub
|
||||||
|
- nursing_home
|
||||||
|
- pharmacy
|
||||||
|
- place_of_worship
|
||||||
|
- police
|
||||||
|
- post_box
|
||||||
|
- post_office
|
||||||
|
- prison
|
||||||
|
- pub
|
||||||
|
- public_building
|
||||||
|
- recycling
|
||||||
|
- restaurant
|
||||||
|
- school
|
||||||
|
- shelter
|
||||||
|
- swimming_pool
|
||||||
|
- taxi
|
||||||
|
- telephone
|
||||||
|
- theatre
|
||||||
|
- toilets
|
||||||
|
- townhall
|
||||||
|
- university
|
||||||
|
- veterinary
|
||||||
|
- waste_basket
|
||||||
|
|
||||||
|
# barrier values , see http://taginfo.openstreetmap.org/keys/barrier#values
|
||||||
|
def_poi_mapping_barrier: &poi_mapping_barrier
|
||||||
|
- bollard
|
||||||
|
- border_control
|
||||||
|
- cycle_barrier
|
||||||
|
- gate
|
||||||
|
- lift_gate
|
||||||
|
- sally_port
|
||||||
|
- stile
|
||||||
|
- toll_booth
|
||||||
|
|
||||||
|
# highway values , see http://taginfo.openstreetmap.org/keys/highway#values
|
||||||
|
def_poi_mapping_highway: &poi_mapping_highway
|
||||||
|
- bus_stop
|
||||||
|
|
||||||
|
# historic values , see http://taginfo.openstreetmap.org/keys/historic#values
|
||||||
|
def_poi_mapping_historic: &poi_mapping_historic
|
||||||
|
- monument
|
||||||
|
|
||||||
|
# landuse values , see http://taginfo.openstreetmap.org/keys/landuse#values
|
||||||
|
def_poi_mapping_landuse: &poi_mapping_landuse
|
||||||
|
- basin
|
||||||
|
- brownfield
|
||||||
|
- cemetery
|
||||||
|
- reservoir
|
||||||
|
|
||||||
|
# leisure values , see http://taginfo.openstreetmap.org/keys/leisure#values
|
||||||
|
def_poi_mapping_leisure: &poi_mapping_leisure
|
||||||
|
- dog_park
|
||||||
|
- garden
|
||||||
|
- golf_course
|
||||||
|
- ice_rink
|
||||||
|
- marina
|
||||||
|
- miniature_golf
|
||||||
|
- park
|
||||||
|
- pitch
|
||||||
|
- playground
|
||||||
|
- sports_centre
|
||||||
|
- stadium
|
||||||
|
- swimming_area
|
||||||
|
- swimming_pool
|
||||||
|
- water_park
|
||||||
|
|
||||||
|
# shop values , see http://taginfo.openstreetmap.org/keys/shop#values
|
||||||
|
def_poi_mapping_shop: &poi_mapping_shop
|
||||||
|
- accessories
|
||||||
|
- alcohol
|
||||||
|
- antiques
|
||||||
|
- art
|
||||||
|
- bag
|
||||||
|
- bakery
|
||||||
|
- beauty
|
||||||
|
- bed
|
||||||
|
- beverages
|
||||||
|
- bicycle
|
||||||
|
- books
|
||||||
|
- boutique
|
||||||
|
- butcher
|
||||||
|
- camera
|
||||||
|
- car
|
||||||
|
- car_repair
|
||||||
|
- carpet
|
||||||
|
- charity
|
||||||
|
- chemist
|
||||||
|
- chocolate
|
||||||
|
- clothes
|
||||||
|
- coffee
|
||||||
|
- computer
|
||||||
|
- confectionery
|
||||||
|
- convenience
|
||||||
|
- copyshop
|
||||||
|
- cosmetics
|
||||||
|
- deli
|
||||||
|
- delicatessen
|
||||||
|
- department_store
|
||||||
|
- doityourself
|
||||||
|
- dry_cleaning
|
||||||
|
- electronics
|
||||||
|
- erotic
|
||||||
|
- fabric
|
||||||
|
- florist
|
||||||
|
- furniture
|
||||||
|
- garden_centre
|
||||||
|
- general
|
||||||
|
- gift
|
||||||
|
- greengrocer
|
||||||
|
- hairdresser
|
||||||
|
- hardware
|
||||||
|
- hearing_aids
|
||||||
|
- hifi
|
||||||
|
- ice_cream
|
||||||
|
- interior_decoration
|
||||||
|
- jewelry
|
||||||
|
- kiosk
|
||||||
|
- lamps
|
||||||
|
- laundry
|
||||||
|
- mall
|
||||||
|
- massage
|
||||||
|
- mobile_phone
|
||||||
|
- motorcycle
|
||||||
|
- music
|
||||||
|
- musical_instrument
|
||||||
|
- newsagent
|
||||||
|
- optician
|
||||||
|
- outdoor
|
||||||
|
- perfume
|
||||||
|
- perfumery
|
||||||
|
- pet
|
||||||
|
- photo
|
||||||
|
- second_hand
|
||||||
|
- shoes
|
||||||
|
- sports
|
||||||
|
- stationery
|
||||||
|
- supermarket
|
||||||
|
- tailor
|
||||||
|
- tattoo
|
||||||
|
- ticket
|
||||||
|
- tobacco
|
||||||
|
- toys
|
||||||
|
- travel_agency
|
||||||
|
- video
|
||||||
|
- video_games
|
||||||
|
- watches
|
||||||
|
- weapons
|
||||||
|
- wholesale
|
||||||
|
- wine
|
||||||
|
|
||||||
|
# sport values , see http://taginfo.openstreetmap.org/keys/sport#values
|
||||||
|
def_poi_mapping_sport: &poi_mapping_sport
|
||||||
|
- american_football
|
||||||
|
- archery
|
||||||
|
- athletics
|
||||||
|
- australian_football
|
||||||
|
- badminton
|
||||||
|
- baseball
|
||||||
|
- basketball
|
||||||
|
- beachvolleyball
|
||||||
|
- billiards
|
||||||
|
- bmx
|
||||||
|
- boules
|
||||||
|
- bowls
|
||||||
|
- boxing
|
||||||
|
- canadian_football
|
||||||
|
- canoe
|
||||||
|
- chess
|
||||||
|
- climbing
|
||||||
|
- climbing_adventure
|
||||||
|
- cricket
|
||||||
|
- cricket_nets
|
||||||
|
- croquet
|
||||||
|
- curling
|
||||||
|
- cycling
|
||||||
|
- disc_golf
|
||||||
|
- diving
|
||||||
|
- dog_racing
|
||||||
|
- equestrian
|
||||||
|
- fatsal
|
||||||
|
- field_hockey
|
||||||
|
- free_flying
|
||||||
|
- gaelic_games
|
||||||
|
- golf
|
||||||
|
- gymnastics
|
||||||
|
- handball
|
||||||
|
- hockey
|
||||||
|
- horse_racing
|
||||||
|
- horseshoes
|
||||||
|
- ice_hockey
|
||||||
|
- ice_stock
|
||||||
|
- judo
|
||||||
|
- karting
|
||||||
|
- korfball
|
||||||
|
- long_jump
|
||||||
|
- model_aerodrome
|
||||||
|
- motocross
|
||||||
|
- motor
|
||||||
|
- multi
|
||||||
|
- netball
|
||||||
|
- orienteering
|
||||||
|
- paddle_tennis
|
||||||
|
- paintball
|
||||||
|
- paragliding
|
||||||
|
- pelota
|
||||||
|
- racquet
|
||||||
|
- rc_car
|
||||||
|
- rowing
|
||||||
|
- rugby
|
||||||
|
- rugby_league
|
||||||
|
- rugby_union
|
||||||
|
- running
|
||||||
|
- sailing
|
||||||
|
- scuba_diving
|
||||||
|
- shooting
|
||||||
|
- shooting_range
|
||||||
|
- skateboard
|
||||||
|
- skating
|
||||||
|
- skiing
|
||||||
|
- soccer
|
||||||
|
- surfing
|
||||||
|
- swimming
|
||||||
|
- table_soccer
|
||||||
|
- table_tennis
|
||||||
|
- team_handball
|
||||||
|
- tennis
|
||||||
|
- toboggan
|
||||||
|
- volleyball
|
||||||
|
- water_ski
|
||||||
|
- yoga
|
||||||
|
|
||||||
|
# tourism values , see http://taginfo.openstreetmap.org/keys/tourism#values
|
||||||
|
def_poi_mapping_tourism: &poi_mapping_tourism
|
||||||
|
- alpine_hut
|
||||||
|
- artwork
|
||||||
|
- attraction
|
||||||
|
- bed_and_breakfast
|
||||||
|
- camp_site
|
||||||
|
- caravan_site
|
||||||
|
- chalet
|
||||||
|
- gallery
|
||||||
|
- guest_house
|
||||||
|
- hostel
|
||||||
|
- hotel
|
||||||
|
- information
|
||||||
|
- motel
|
||||||
|
- museum
|
||||||
|
- picnic_site
|
||||||
|
- theme_park
|
||||||
|
- viewpoint
|
||||||
|
- zoo
|
||||||
|
|
||||||
|
# waterway values , see http://taginfo.openstreetmap.org/keys/waterway#values
|
||||||
|
def_poi_mapping_waterway: &poi_mapping_waterway
|
||||||
|
- dock
|
||||||
|
|
||||||
tables:
|
tables:
|
||||||
# etldoc: imposm3 -> osm_poi_point
|
# etldoc: imposm3 -> osm_poi_point
|
||||||
poi_point:
|
poi_point:
|
||||||
@@ -16,269 +309,44 @@ tables:
|
|||||||
- name: subclass
|
- name: subclass
|
||||||
type: mapping_value
|
type: mapping_value
|
||||||
mapping:
|
mapping:
|
||||||
amenity:
|
aerialway: *poi_mapping_aerialway
|
||||||
- arts_centre
|
amenity: *poi_mapping_amenity
|
||||||
- police
|
barrier: *poi_mapping_barrier
|
||||||
- fire_station
|
highway: *poi_mapping_highway
|
||||||
- post_box
|
historic: *poi_mapping_historic
|
||||||
- post_office
|
landuse: *poi_mapping_landuse
|
||||||
- telephone
|
leisure: *poi_mapping_leisure
|
||||||
- library
|
shop: *poi_mapping_shop
|
||||||
- townhall
|
sport: *poi_mapping_sport
|
||||||
- courthouse
|
tourism: *poi_mapping_tourism
|
||||||
- prison
|
waterway: *poi_mapping_waterway
|
||||||
- place_of_worship
|
|
||||||
- embassy
|
|
||||||
- community_centre
|
# etldoc: imposm3 -> osm_poi_polygon
|
||||||
- nursing_home
|
poi_polygon:
|
||||||
- university
|
type: polygon
|
||||||
- school
|
fields:
|
||||||
- kindergarten
|
- name: osm_id
|
||||||
- college
|
type: id
|
||||||
- public_building
|
- name: geometry
|
||||||
- pharmacy
|
type: geometry
|
||||||
- hospital
|
- name: name
|
||||||
- doctors
|
key: name
|
||||||
- dentist
|
type: string
|
||||||
- veterinary
|
- name: name_en
|
||||||
- theatre
|
key: name:en
|
||||||
- nightclub
|
type: string
|
||||||
- cinema
|
- name: subclass
|
||||||
- restaurant
|
type: mapping_value
|
||||||
- recycling
|
mapping:
|
||||||
- fast_food
|
aerialway: *poi_mapping_aerialway
|
||||||
- cafe
|
amenity: *poi_mapping_amenity
|
||||||
- pub
|
barrier: *poi_mapping_barrier
|
||||||
- bar
|
highway: *poi_mapping_highway
|
||||||
- food_court
|
historic: *poi_mapping_historic
|
||||||
- biergarten
|
landuse: *poi_mapping_landuse
|
||||||
- swimming_pool
|
leisure: *poi_mapping_leisure
|
||||||
- shelter
|
shop: *poi_mapping_shop
|
||||||
- grave_yard
|
sport: *poi_mapping_sport
|
||||||
- bank
|
tourism: *poi_mapping_tourism
|
||||||
- ferry_terminal
|
waterway: *poi_mapping_waterway
|
||||||
- fuel
|
|
||||||
- waste_basket
|
|
||||||
- bicycle_rental
|
|
||||||
- bbq
|
|
||||||
- taxi
|
|
||||||
- bus_station
|
|
||||||
- marketplace
|
|
||||||
- toilets
|
|
||||||
leisure:
|
|
||||||
- park
|
|
||||||
- playground
|
|
||||||
- dog_park
|
|
||||||
- sports_centre
|
|
||||||
- pitch
|
|
||||||
- swimming_pool
|
|
||||||
- swimming_area
|
|
||||||
- water_park
|
|
||||||
- golf_course
|
|
||||||
- miniature_golf
|
|
||||||
- marina
|
|
||||||
- stadium
|
|
||||||
- ice_rink
|
|
||||||
- garden
|
|
||||||
landuse:
|
|
||||||
- cemetery
|
|
||||||
- basin
|
|
||||||
- reservoir
|
|
||||||
- brownfield
|
|
||||||
sport:
|
|
||||||
- swimming
|
|
||||||
- tennis
|
|
||||||
- soccer
|
|
||||||
- baseball
|
|
||||||
- basketball
|
|
||||||
- multi
|
|
||||||
- golf
|
|
||||||
- equestrian
|
|
||||||
- athletics
|
|
||||||
- volleyball
|
|
||||||
- climbing
|
|
||||||
- bowls
|
|
||||||
- american_football
|
|
||||||
- skateboard
|
|
||||||
- shooting
|
|
||||||
- skiing
|
|
||||||
- boules
|
|
||||||
- beachvolleyball
|
|
||||||
- cricket
|
|
||||||
- table_tennis
|
|
||||||
- hockey
|
|
||||||
- gymnastics
|
|
||||||
- running
|
|
||||||
- canoe
|
|
||||||
- rugby_union
|
|
||||||
- skating
|
|
||||||
- scuba_diving
|
|
||||||
- motor
|
|
||||||
- horse_racing
|
|
||||||
- handball
|
|
||||||
- team_handball
|
|
||||||
- karting
|
|
||||||
- cycling
|
|
||||||
- archery
|
|
||||||
- motocross
|
|
||||||
- pelota
|
|
||||||
- rugby
|
|
||||||
- gaelic_games
|
|
||||||
- model_aerodrome
|
|
||||||
- netball
|
|
||||||
- rugby_league
|
|
||||||
- free_flying
|
|
||||||
- rowing
|
|
||||||
- chess
|
|
||||||
- australian_football
|
|
||||||
- cricket_nets
|
|
||||||
- racquet
|
|
||||||
- bmx
|
|
||||||
- sailing
|
|
||||||
- ice_stock
|
|
||||||
- badminton
|
|
||||||
- paddle_tennis
|
|
||||||
- dog_racing
|
|
||||||
- fatsal
|
|
||||||
- billiards
|
|
||||||
- ice_hockey
|
|
||||||
- yoga
|
|
||||||
- disc_golf
|
|
||||||
- orienteering
|
|
||||||
- toboggan
|
|
||||||
- horseshoes
|
|
||||||
- paragliding
|
|
||||||
- korfball
|
|
||||||
- diving
|
|
||||||
- rc_car
|
|
||||||
- canadian_football
|
|
||||||
- field_hockey
|
|
||||||
- shooting_range
|
|
||||||
- boxing
|
|
||||||
- curling
|
|
||||||
- surfing
|
|
||||||
- water_ski
|
|
||||||
- judo
|
|
||||||
- croquet
|
|
||||||
- paintball
|
|
||||||
- climbing_adventure
|
|
||||||
- long_jump
|
|
||||||
- table_soccer
|
|
||||||
tourism:
|
|
||||||
- attraction
|
|
||||||
- artwork
|
|
||||||
- gallery
|
|
||||||
- hotel
|
|
||||||
- motel
|
|
||||||
- bed_and_breakfast
|
|
||||||
- guest_house
|
|
||||||
- hostel
|
|
||||||
- chalet
|
|
||||||
- camp_site
|
|
||||||
- alpine_hut
|
|
||||||
- caravan_site
|
|
||||||
- museum
|
|
||||||
- viewpoint
|
|
||||||
- zoo
|
|
||||||
- theme_park
|
|
||||||
- information
|
|
||||||
- picnic_site
|
|
||||||
shop:
|
|
||||||
- accessories
|
|
||||||
- alcohol
|
|
||||||
- antiques
|
|
||||||
- art
|
|
||||||
- bag
|
|
||||||
- bakery
|
|
||||||
- beauty
|
|
||||||
- bed
|
|
||||||
- beverages
|
|
||||||
- bicycle
|
|
||||||
- books
|
|
||||||
- boutique
|
|
||||||
- butcher
|
|
||||||
- camera
|
|
||||||
- car
|
|
||||||
- car_repair
|
|
||||||
- carpet
|
|
||||||
- charity
|
|
||||||
- chemist
|
|
||||||
- chocolate
|
|
||||||
- clothes
|
|
||||||
- coffee
|
|
||||||
- computer
|
|
||||||
- confectionery
|
|
||||||
- convenience
|
|
||||||
- copyshop
|
|
||||||
- cosmetics
|
|
||||||
- garden_centre
|
|
||||||
- deli
|
|
||||||
- delicatessen
|
|
||||||
- department_store
|
|
||||||
- doityourself
|
|
||||||
- dry_cleaning
|
|
||||||
- video
|
|
||||||
- electronics
|
|
||||||
- erotic
|
|
||||||
- fabric
|
|
||||||
- florist
|
|
||||||
- furniture
|
|
||||||
- video_games
|
|
||||||
- general
|
|
||||||
- gift
|
|
||||||
- greengrocer
|
|
||||||
- hairdresser
|
|
||||||
- hardware
|
|
||||||
- hearing_aids
|
|
||||||
- hifi
|
|
||||||
- ice_cream
|
|
||||||
- interior_decoration
|
|
||||||
- jewelry
|
|
||||||
- kiosk
|
|
||||||
- lamps
|
|
||||||
- laundry
|
|
||||||
- mall
|
|
||||||
- massage
|
|
||||||
- mobile_phone
|
|
||||||
- motorcycle
|
|
||||||
- music
|
|
||||||
- musical_instrument
|
|
||||||
- newsagent
|
|
||||||
- optician
|
|
||||||
- outdoor
|
|
||||||
- perfumery
|
|
||||||
- perfume
|
|
||||||
- pet
|
|
||||||
- photo
|
|
||||||
- second_hand
|
|
||||||
- shoes
|
|
||||||
- sports
|
|
||||||
- stationery
|
|
||||||
- supermarket
|
|
||||||
- tailor
|
|
||||||
- tattoo
|
|
||||||
- ticket
|
|
||||||
- tobacco
|
|
||||||
- toys
|
|
||||||
- travel_agency
|
|
||||||
- watches
|
|
||||||
- weapons
|
|
||||||
- wholesale
|
|
||||||
- wine
|
|
||||||
highway:
|
|
||||||
- bus_stop
|
|
||||||
barrier:
|
|
||||||
- sally_port
|
|
||||||
- lift_gate
|
|
||||||
- gate
|
|
||||||
- bollard
|
|
||||||
- stile
|
|
||||||
- cycle_barrier
|
|
||||||
- toll_booth
|
|
||||||
- border_control
|
|
||||||
historic:
|
|
||||||
- monument
|
|
||||||
waterway:
|
|
||||||
- dock
|
|
||||||
aerialway:
|
|
||||||
- station
|
|
||||||
@@ -32,6 +32,7 @@ layer:
|
|||||||
srid: 900913
|
srid: 900913
|
||||||
query: (SELECT geometry, name, name_en, class, subclass, rank FROM layer_poi(!bbox!, z(!scale_denominator!), !pixel_width!)) AS t
|
query: (SELECT geometry, name, name_en, class, subclass, rank FROM layer_poi(!bbox!, z(!scale_denominator!), !pixel_width!)) AS t
|
||||||
schema:
|
schema:
|
||||||
|
- ./poi_polygon_update.sql
|
||||||
- ./class.sql
|
- ./class.sql
|
||||||
- ./layer.sql
|
- ./layer.sql
|
||||||
datasources:
|
datasources:
|
||||||
|
|||||||
5
layers/poi/poi_polygon_update.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- etldoc: osm_poi_polygon -> osm_poi_polygon
|
||||||
|
UPDATE osm_poi_polygon SET geometry=topoint(geometry)
|
||||||
|
WHERE ST_GeometryType(geometry) <> 'ST_Point';
|
||||||
|
|
||||||
|
ANALYZE osm_poi_polygon;
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# highway
|
|
||||||
|
|
||||||
Roads or [`highway`](http://wiki.openstreetmap.org/wiki/Key:highway) in OpenStreetMap lingo.
|
|
||||||
This layer is directly derived from the OSM road hierarchy which is why it is called `highway`. Only
|
|
||||||
at zoom level 4 to 7 some major highways from Natural Earth are used otherwise it is only OSM data.
|
|
||||||
It contains all roads from motorways to primary, secondary and tertiary roads to residential roads and
|
|
||||||
foot paths. Styling the roads is the most essential part of the map. If you can put enough effort into it
|
|
||||||
makes sense to carefully style each `subclass`. For more comfortable styling you can also just style the roads
|
|
||||||
by `class`. Roads can have different properties, a road can have `oneway=yes` and `bridge=yes` at the same time.
|
|
||||||
These properties are reflected in the field `properties`.
|
|
||||||
This layer is not meant for labelling the roads (the purpose of the layer `highway_name`).
|
|
||||||
|
|
||||||
The `highway` layer also contains polygons for things like plazas.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **class**: Either `motorway`, `major_road` (containing `trunk`, `primary`, `secondary` and `tertiary` roads) and `minor_road` (less important roads in the hierarchy like `residential` or `service`) or `path` for
|
|
||||||
non vehicle paths (such as `cycleway` or `footpath`).
|
|
||||||
- **subclass**: Original value of the [`highway`](http://wiki.openstreetmap.org/wiki/Key:highway) tag. Use this to do more
|
|
||||||
precise styling.
|
|
||||||
- **properties**: Additional properties describing the nature of road.
|
|
||||||
The properties `bridge` and `tunnel` can be combined with `oneway` as well. So to style all bridges the same you
|
|
||||||
should style both the properties `bridge` and `bridge:oneway`.
|
|
||||||
Properties can be one of `bridge:oneway`, `tunnel:oneway`, `ramp`, `ford`, `bridge`, `tunnel` or`oneway`.
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
digraph "Imposm Mapping" {
|
|
||||||
graph [rankdir=LR ranksep=3]
|
|
||||||
subgraph highway_polygon {
|
|
||||||
node [fixed_size=shape "width:"=20]
|
|
||||||
highway_polygon [shape=box]
|
|
||||||
key_highway [label=highway shape=box]
|
|
||||||
key_highway -> highway_polygon [label=pedestrian]
|
|
||||||
}
|
|
||||||
subgraph highway_linestring {
|
|
||||||
node [fixed_size=shape "width:"=20]
|
|
||||||
highway_linestring [shape=box]
|
|
||||||
key_highway [label=highway shape=box]
|
|
||||||
key_highway -> highway_linestring [label="motorway
|
|
||||||
motorway_link
|
|
||||||
trunk
|
|
||||||
trunk_link
|
|
||||||
primary
|
|
||||||
primary_link
|
|
||||||
secondary
|
|
||||||
secondary_link
|
|
||||||
tertiary
|
|
||||||
tertiary_link
|
|
||||||
unclassified
|
|
||||||
residential
|
|
||||||
road
|
|
||||||
living_street
|
|
||||||
raceway
|
|
||||||
construction
|
|
||||||
track
|
|
||||||
service
|
|
||||||
path
|
|
||||||
cycleway
|
|
||||||
bridleway
|
|
||||||
footway
|
|
||||||
corridor
|
|
||||||
crossing
|
|
||||||
pedestrian"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 61 KiB |
@@ -1,19 +0,0 @@
|
|||||||
# highway_name
|
|
||||||
|
|
||||||
This is the layer for labelling the highways. Only highways that are named `name=*` and are long enough
|
|
||||||
to place text upon appear. The OSM roads are stitched together if they contain the same name
|
|
||||||
to have better label placement than having many small linestrings.
|
|
||||||
For motorways you should use the `ref` field to label them while for other roads you should use `name`.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **ref**: The OSM [`ref`](http://wiki.openstreetmap.org/wiki/Key:ref) tag of the motorway or road.
|
|
||||||
- **ref_length**: Length of the `ref` field. Useful for having a shield icon as background for labeling motorways.
|
|
||||||
- **name**: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Highways#Names_and_references) value of the highway.
|
|
||||||
- **subclass**: Original value of the [`highway`](http://wiki.openstreetmap.org/wiki/Key:highway) tag. Use this to do more
|
|
||||||
precise styling.
|
|
||||||
- **class**: Either `motorway`, `major_road` (containing `trunk`, `primary`, `secondary` and `tertiary` roads) and `minor_road` (less important roads in the hierarchy like `residential` or `service`) or `path` for
|
|
||||||
non vehicle paths (such as `cycleway` or `footpath`).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# water
|
|
||||||
|
|
||||||
Water polygons representing oceans and lakes. Covered watered areas are excluded (`covered=yes`).
|
|
||||||
Until z6 all water originates from Natural Earth. To get a more correct display of the south pole you should also
|
|
||||||
style the covering ice shelves over the water.
|
|
||||||
Water from OpenStreetMap after z7 is split into many smaller polygons to improve rendering performance.
|
|
||||||
This however can lead to less rendering options in clients since these boundaries show up. So you might not be
|
|
||||||
able to use border styling for ocean water features.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **class**: Either `ocean`, `lake` or `river`.
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 22 KiB |
@@ -1,14 +0,0 @@
|
|||||||
# water_name
|
|
||||||
|
|
||||||
Lake center lines for labelling lake bodies.
|
|
||||||
This is based of the [osm-lakelines](https://github.com/lukasmartinelli/osm-lakelines) project
|
|
||||||
which derives nice centerlines from OSM water bodies. Only the most important lakes contain labels.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **name_en**: The english `name:en` value if available.
|
|
||||||
- **name**: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the water body.
|
|
||||||
- **class**: At the moment only `lake` since no ocean parts are labelled. *Reserved for future use*.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# waterway
|
|
||||||
|
|
||||||
Rivers based of OpenStreetMap [waterways](http://wiki.openstreetmap.org/wiki/Waterways) for *z8* to *z14*
|
|
||||||
and Natural Earth rivers and lake centerlines from *z3* to *z7*.
|
|
||||||
Too short linestrings are filtered out for some zoom levels. Waterways do no not have a `subclass`.
|
|
||||||
|
|
||||||
## Fields
|
|
||||||
|
|
||||||
- **class**: The original value of the [`waterway`](http://wiki.openstreetmap.org/wiki/Key:waterway) tag.
|
|
||||||
Can be one of [`stream`](http://wiki.openstreetmap.org/wiki/Tag:waterway%3Dstream),
|
|
||||||
[`river`](http://wiki.openstreetmap.org/wiki/Tag:waterway%3Driver),
|
|
||||||
[`canal`](http://wiki.openstreetmap.org/wiki/Tag:waterway%3Dcanal),
|
|
||||||
[`drain`](http://wiki.openstreetmap.org/wiki/Tag:waterway%3Ddrain),
|
|
||||||
[`ditch`](http://wiki.openstreetmap.org/wiki/Tag:waterway%3Dditch)`.
|
|
||||||
|
|
||||||
## Mapping
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 10 KiB |