kopia lustrzana https://github.com/openmaptiles/openmaptiles
Merge branch 'master' into quickstart_v2
commit
972107ea8b
|
@ -83,8 +83,8 @@ tileset:
|
|||
|
||||
To work on OpenMapTiles you need Docker and Python.
|
||||
|
||||
- Install [Docker](https://docs.docker.com/engine/installation/)
|
||||
- Install [Docker Compose](https://docs.docker.com/compose/install/)
|
||||
- Install [Docker](https://docs.docker.com/engine/installation/). Minimum version is 1.10.0+.
|
||||
- Install [Docker Compose](https://docs.docker.com/compose/install/). Minimum version is 1.6.0+.
|
||||
- Install [OpenMapTiles tools](https://github.com/openmaptiles/openmaptiles-tools) with `pip install openmaptiles-tools`
|
||||
|
||||
### Build
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
version: "2"
|
||||
volumes:
|
||||
pgdata:
|
||||
services:
|
||||
postgres:
|
||||
image: "openmaptiles/postgis:2.2"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
- ./pgdata:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432"
|
||||
env_file: .env
|
||||
|
|
|
@ -5,17 +5,18 @@
|
|||
-- etldoc: label="layer_building | <z13> z13 | <z14_> z14_ " ] ;
|
||||
|
||||
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,
|
||||
least(greatest(3, COALESCE(height, levels*3.66,5)),400)^.7::int AS render_height
|
||||
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 (
|
||||
|
||||
-- etldoc: osm_building_polygon_gen1 -> layer_building:z13
|
||||
SELECT osm_id, geometry, height, levels FROM osm_building_polygon_gen1
|
||||
SELECT osm_id, geometry, height, levels, min_height, min_level FROM osm_building_polygon_gen1
|
||||
WHERE zoom_level = 13 AND geometry && bbox AND area > 1400
|
||||
UNION ALL
|
||||
-- etldoc: osm_building_polygon -> layer_building:z14_
|
||||
SELECT osm_id, geometry, height, levels FROM osm_building_polygon
|
||||
SELECT osm_id, geometry, height, levels, min_height, min_level FROM osm_building_polygon
|
||||
WHERE zoom_level >= 14 AND geometry && bbox
|
||||
) AS zoom_levels
|
||||
ORDER BY render_height ASC, ST_YMin(geometry) DESC;
|
||||
|
|
|
@ -5,10 +5,12 @@ layer:
|
|||
this is welcomed.
|
||||
buffer_size: 4
|
||||
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:
|
||||
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:
|
||||
- ./building.sql
|
||||
datasources:
|
||||
|
|
|
@ -20,10 +20,18 @@ tables:
|
|||
- name: height
|
||||
key: height
|
||||
type: integer
|
||||
- name: min_height
|
||||
key: min_height
|
||||
type: integer
|
||||
- name: levels
|
||||
key: levels
|
||||
key: building:levels
|
||||
type: integer
|
||||
- name: min_level
|
||||
key: building:min_level
|
||||
type: integer
|
||||
mapping:
|
||||
building:part:
|
||||
- __any__
|
||||
building:
|
||||
- __any__
|
||||
type: polygon
|
||||
|
|
|
@ -78,7 +78,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, class highway_class, subclass te
|
|||
SELECT osm_id, geometry, highway, FALSE AS is_bridge, FALSE AS is_tunnel, FALSE AS is_ford, FALSE AS is_ramp, FALSE AS is_oneway, z_order
|
||||
FROM osm_highway_polygon
|
||||
-- We do not want underground pedestrian areas for now
|
||||
WHERE zoom_level BETWEEN 13 AND 14 AND is_area AND COALESCE(layer, 0) >= 0
|
||||
WHERE zoom_level >= 13 AND is_area AND COALESCE(layer, 0) >= 0
|
||||
) AS zoom_levels
|
||||
WHERE geometry && bbox
|
||||
ORDER BY z_order ASC;
|
||||
|
|
|
@ -22,23 +22,23 @@ $$ LANGUAGE SQL IMMUTABLE;
|
|||
|
||||
-- etldoc: ne_110m_glaciated_areas -> landcover_z0
|
||||
CREATE OR REPLACE VIEW landcover_z0 AS (
|
||||
SELECT NULL::int AS osm_id, geom AS geometry, NULL AS landuse, 'glacier' AS "natural", NULL::text AS wetland FROM ne_110m_glaciated_areas
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier'::text AS "natural", NULL::text AS wetland FROM ne_110m_glaciated_areas
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW landcover_z2 AS (
|
||||
-- etldoc: ne_50m_glaciated_areas -> landcover_z2
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier' AS "natural", NULL::text AS wetland FROM ne_50m_glaciated_areas
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier'::text AS "natural", NULL::text AS wetland FROM ne_50m_glaciated_areas
|
||||
UNION ALL
|
||||
-- etldoc: ne_50m_antarctic_ice_shelves_polys -> landcover_z2
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf' AS "natural", NULL::text AS wetland FROM ne_50m_antarctic_ice_shelves_polys
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf'::text AS "natural", NULL::text AS wetland FROM ne_50m_antarctic_ice_shelves_polys
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW landcover_z5 AS (
|
||||
-- etldoc: ne_10m_glaciated_areas -> landcover_z5
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier' AS "natural", NULL::text AS wetland FROM ne_10m_glaciated_areas
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier'::text AS "natural", NULL::text AS wetland FROM ne_10m_glaciated_areas
|
||||
UNION ALL
|
||||
-- etldoc: ne_10m_antarctic_ice_shelves_polys -> landcover_z5
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf' AS "natural", NULL::text AS wetland FROM ne_10m_antarctic_ice_shelves_polys
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf'::text AS "natural", NULL::text AS wetland FROM ne_10m_antarctic_ice_shelves_polys
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW landcover_z8 AS (
|
||||
|
|
|
@ -10,20 +10,20 @@ $$ LANGUAGE SQL IMMUTABLE;
|
|||
|
||||
-- etldoc: ne_50m_urban_areas -> landuse_z4
|
||||
CREATE OR REPLACE VIEW landuse_z4 AS (
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential' AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
|
||||
FROM ne_50m_urban_areas
|
||||
WHERE scalerank <= 2
|
||||
);
|
||||
|
||||
-- etldoc: ne_50m_urban_areas -> landuse_z5
|
||||
CREATE OR REPLACE VIEW landuse_z5 AS (
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential' AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
|
||||
FROM ne_50m_urban_areas
|
||||
);
|
||||
|
||||
-- etldoc: ne_10m_urban_areas -> landuse_z6
|
||||
CREATE OR REPLACE VIEW landuse_z6 AS (
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential' AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
|
||||
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
|
||||
FROM ne_10m_urban_areas
|
||||
);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
-- etldoc: layer_poi[shape=record fillcolor=lightpink, style="rounded,filled",
|
||||
-- etldoc: layer_poi[shape=record fillcolor=lightpink, style="rounded,filled",
|
||||
-- etldoc: label="layer_poi | <z14_> z14_" ] ;
|
||||
|
||||
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
||||
|
@ -7,12 +7,20 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, class t
|
|||
SELECT osm_id, geometry, name, NULLIF(name_en, ''), poi_class(subclass) AS class, subclass,
|
||||
row_number() OVER (
|
||||
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
||||
ORDER BY poi_class_rank(poi_class(subclass)) ASC, length(name) DESC
|
||||
ORDER BY poi_class_rank(poi_class(subclass)) ASC,
|
||||
length(name) DESC NULLS LAST
|
||||
)::int AS "rank"
|
||||
-- etldoc: osm_poi_point -> layer_poi:z14_
|
||||
FROM osm_poi_point
|
||||
WHERE geometry && bbox
|
||||
AND zoom_level >= 14
|
||||
AND name <> ''
|
||||
ORDER BY "rank";
|
||||
FROM (
|
||||
-- etldoc: osm_poi_point -> layer_poi:z14
|
||||
SELECT * FROM osm_poi_point
|
||||
WHERE geometry && bbox
|
||||
AND zoom_level >= 14
|
||||
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;
|
||||
|
|
|
@ -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:
|
||||
# etldoc: imposm3 -> osm_poi_point
|
||||
poi_point:
|
||||
|
@ -16,269 +309,44 @@ tables:
|
|||
- name: subclass
|
||||
type: mapping_value
|
||||
mapping:
|
||||
amenity:
|
||||
- arts_centre
|
||||
- police
|
||||
- fire_station
|
||||
- post_box
|
||||
- post_office
|
||||
- telephone
|
||||
- library
|
||||
- townhall
|
||||
- courthouse
|
||||
- prison
|
||||
- place_of_worship
|
||||
- embassy
|
||||
- community_centre
|
||||
- nursing_home
|
||||
- university
|
||||
- school
|
||||
- kindergarten
|
||||
- college
|
||||
- public_building
|
||||
- pharmacy
|
||||
- hospital
|
||||
- doctors
|
||||
- dentist
|
||||
- veterinary
|
||||
- theatre
|
||||
- nightclub
|
||||
- cinema
|
||||
- restaurant
|
||||
- recycling
|
||||
- fast_food
|
||||
- cafe
|
||||
- pub
|
||||
- bar
|
||||
- food_court
|
||||
- biergarten
|
||||
- swimming_pool
|
||||
- shelter
|
||||
- grave_yard
|
||||
- bank
|
||||
- ferry_terminal
|
||||
- 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
|
||||
aerialway: *poi_mapping_aerialway
|
||||
amenity: *poi_mapping_amenity
|
||||
barrier: *poi_mapping_barrier
|
||||
highway: *poi_mapping_highway
|
||||
historic: *poi_mapping_historic
|
||||
landuse: *poi_mapping_landuse
|
||||
leisure: *poi_mapping_leisure
|
||||
shop: *poi_mapping_shop
|
||||
sport: *poi_mapping_sport
|
||||
tourism: *poi_mapping_tourism
|
||||
waterway: *poi_mapping_waterway
|
||||
|
||||
|
||||
# etldoc: imposm3 -> osm_poi_polygon
|
||||
poi_polygon:
|
||||
type: polygon
|
||||
fields:
|
||||
- name: osm_id
|
||||
type: id
|
||||
- name: geometry
|
||||
type: geometry
|
||||
- name: name
|
||||
key: name
|
||||
type: string
|
||||
- name: name_en
|
||||
key: name:en
|
||||
type: string
|
||||
- name: subclass
|
||||
type: mapping_value
|
||||
mapping:
|
||||
aerialway: *poi_mapping_aerialway
|
||||
amenity: *poi_mapping_amenity
|
||||
barrier: *poi_mapping_barrier
|
||||
highway: *poi_mapping_highway
|
||||
historic: *poi_mapping_historic
|
||||
landuse: *poi_mapping_landuse
|
||||
leisure: *poi_mapping_leisure
|
||||
shop: *poi_mapping_shop
|
||||
sport: *poi_mapping_sport
|
||||
tourism: *poi_mapping_tourism
|
||||
waterway: *poi_mapping_waterway
|
|
@ -32,6 +32,7 @@ layer:
|
|||
srid: 900913
|
||||
query: (SELECT geometry, name, name_en, class, subclass, rank FROM layer_poi(!bbox!, z(!scale_denominator!), !pixel_width!)) AS t
|
||||
schema:
|
||||
- ./poi_polygon_update.sql
|
||||
- ./class.sql
|
||||
- ./layer.sql
|
||||
datasources:
|
||||
|
|
|
@ -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;
|
|
@ -6,55 +6,55 @@ $$ LANGUAGE SQL IMMUTABLE;
|
|||
|
||||
CREATE OR REPLACE VIEW water_z0 AS (
|
||||
-- etldoc: ne_110m_ocean -> water_z0
|
||||
SELECT geom, 'ocean' AS class FROM ne_110m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_110m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: ne_110m_lakes -> water_z0
|
||||
SELECT geom, 'lake' AS class FROM ne_110m_lakes
|
||||
SELECT geom, 'lake'::text AS class FROM ne_110m_lakes
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z1 AS (
|
||||
-- etldoc: ne_110m_ocean -> water_z1
|
||||
SELECT geom, 'ocean' AS class FROM ne_110m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_110m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: ne_110m_lakes -> water_z1
|
||||
SELECT geom, 'lake' AS class FROM ne_110m_lakes
|
||||
SELECT geom, 'lake'::text AS class FROM ne_110m_lakes
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z2 AS (
|
||||
-- etldoc: ne_50m_ocean -> water_z2
|
||||
SELECT geom, 'ocean' AS class FROM ne_50m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_50m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: ne_110m_lakes -> water_z2
|
||||
SELECT geom, 'lake' AS class FROM ne_110m_lakes
|
||||
-- etldoc: ne_50m_lakes -> water_z2
|
||||
SELECT geom, 'lake'::text AS class FROM ne_50m_lakes
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z4 AS (
|
||||
-- etldoc: ne_50m_ocean -> water_z4
|
||||
SELECT geom, 'ocean' AS class FROM ne_50m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_50m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: ne_50m_lakes -> water_z4
|
||||
SELECT geom, 'lake' AS class FROM ne_50m_lakes
|
||||
SELECT geom, 'lake'::text AS class FROM ne_50m_lakes
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z5 AS (
|
||||
-- etldoc: ne_10m_ocean -> water_z5
|
||||
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: ne_10m_lakes -> water_z5
|
||||
SELECT geom, 'lake' AS class FROM ne_10m_lakes
|
||||
SELECT geom, 'lake'::text AS class FROM ne_10m_lakes
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z6 AS (
|
||||
-- etldoc: ne_10m_ocean -> water_z6
|
||||
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: ne_10m_lakes -> water_z6
|
||||
SELECT geom, 'lake' AS class FROM ne_10m_lakes
|
||||
SELECT geom, 'lake'::text AS class FROM ne_10m_lakes
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z7 AS (
|
||||
-- etldoc: ne_10m_ocean -> water_z7
|
||||
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon_gen3 -> water_z7
|
||||
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen3
|
||||
|
@ -62,7 +62,7 @@ CREATE OR REPLACE VIEW water_z7 AS (
|
|||
|
||||
CREATE OR REPLACE VIEW water_z8 AS (
|
||||
-- etldoc: ne_10m_ocean -> water_z8
|
||||
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
|
||||
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon_gen2 -> water_z8
|
||||
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen2
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
|
||||
-- etldoc: ne_110m_rivers_lake_centerlines -> waterway_z3
|
||||
CREATE OR REPLACE VIEW waterway_z3 AS (
|
||||
SELECT geom AS geometry, 'river' AS class FROM ne_110m_rivers_lake_centerlines
|
||||
SELECT geom AS geometry, 'river'::text AS class FROM ne_110m_rivers_lake_centerlines
|
||||
WHERE featurecla = 'River'
|
||||
);
|
||||
|
||||
-- etldoc: ne_50m_rivers_lake_centerlines -> waterway_z4
|
||||
CREATE OR REPLACE VIEW waterway_z4 AS (
|
||||
SELECT geom AS geometry, 'river' AS class FROM ne_50m_rivers_lake_centerlines
|
||||
SELECT geom AS geometry, 'river'::text AS class FROM ne_50m_rivers_lake_centerlines
|
||||
WHERE featurecla = 'River'
|
||||
);
|
||||
|
||||
-- etldoc: ne_10m_rivers_lake_centerlines -> waterway_z6
|
||||
CREATE OR REPLACE VIEW waterway_z6 AS (
|
||||
SELECT geom AS geometry, 'river' AS class FROM ne_10m_rivers_lake_centerlines
|
||||
SELECT geom AS geometry, 'river'::text AS class FROM ne_10m_rivers_lake_centerlines
|
||||
WHERE featurecla = 'River'
|
||||
);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue