remove items overlapping with standard OMT
This commit is contained in:
parent
6524f02cb0
commit
1df3f53dc1
3 changed files with 13 additions and 35 deletions
|
@ -7,16 +7,13 @@ layer:
|
|||
class:
|
||||
subclass:
|
||||
name:
|
||||
description:
|
||||
website:
|
||||
wikidata:
|
||||
wikipedia:
|
||||
inscription:
|
||||
memorial:
|
||||
datasource:
|
||||
key_field: osm_id
|
||||
key_field_as_attribute: no
|
||||
geometry_field: geometry
|
||||
srid: 900913
|
||||
query: (SELECT geometry, class, subclass, name, description, website, wikidata, wikipedia, inscription, memorial FROM layer_exploration(!bbox!, z(!scale_denominator!))) AS t
|
||||
query: (SELECT osm_id, geometry, class, subclass, name, memorial FROM layer_exploration(!bbox!, z(!scale_denominator!))) AS t
|
||||
schema:
|
||||
- ./layer.sql
|
||||
datasources:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
CREATE OR REPLACE FUNCTION layer_exploration(bbox geometry, zoom_level int)
|
||||
RETURNS TABLE(osm_id bigint, geometry geometry, class text, subclass text, name text, description text, website text, wikidata text, wikipedia text, inscription text, memorial text) AS $$
|
||||
SELECT osm_id, geometry, class, subclass, NULLIF(name, '') AS name, NULLIF(description, '') AS description, NULLIF(website, '') AS website, NULLIF(wikidata, '') AS wikidata, NULLIF(wikipedia, '') AS wikipedia, NULLIF(inscription, '') AS inscription, NULLIF(memorial, '') AS memorial
|
||||
RETURNS TABLE(osm_id bigint, geometry geometry, class text, subclass text, name text, memorial text) AS $$
|
||||
SELECT osm_id * 10 + 1, geometry, class, subclass, NULLIF(name, '') AS name, NULLIF(memorial, '') AS memorial
|
||||
FROM osm_exploration_point
|
||||
WHERE zoom_level >= 14 AND geometry && bbox;
|
||||
$$ LANGUAGE SQL IMMUTABLE;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# can't overlap with https://github.com/openmaptiles/openmaptiles/blob/master/layers/poi/mapping.yaml
|
||||
|
||||
tables:
|
||||
# etldoc: imposm3 -> osm_exploration_point
|
||||
exploration_point:
|
||||
|
@ -14,38 +16,17 @@ tables:
|
|||
- key: name
|
||||
name: name
|
||||
type: string
|
||||
- key: description
|
||||
name: description
|
||||
type: string
|
||||
- key: website
|
||||
name: website
|
||||
type: string
|
||||
- key: wikidata
|
||||
name: wikidata
|
||||
type: string
|
||||
- key: wikipedia
|
||||
name: wikipedia
|
||||
type: string
|
||||
- key: inscription
|
||||
name: inscription
|
||||
type: string
|
||||
- key: memorial
|
||||
name: memorial
|
||||
type: string
|
||||
- key: tourism
|
||||
name: tourism
|
||||
type: string
|
||||
mapping:
|
||||
historic:
|
||||
- castle
|
||||
- memorial
|
||||
- monument
|
||||
- ruins
|
||||
military:
|
||||
- bunker
|
||||
tourism:
|
||||
- artwork
|
||||
- attraction
|
||||
- viewpoint
|
||||
information:
|
||||
- board
|
||||
- map
|
||||
- tactile_map
|
||||
- tactile_model
|
||||
filters:
|
||||
reject:
|
||||
tourism: [__any__]
|
||||
|
|
Loading…
Reference in a new issue