Implement private road tagging (#1174)
Fixes #1066 This PR adds a new field `access` in the transportation layer, which will be set to `no` if the `access` tag is either `no` or `private`. While `private` is the more popular value by a 17:1 ratio, I went with `no` because it's smaller in the tiles. In addition, the text `no` opens up the future possibility of other text-based access values such as `destination`, `customers`, or `permit`. The screenshot below shows an example of access tagging for a road on a military base: 
This commit is contained in:
committed by
GitHub
parent
fdb9ae58cd
commit
45d825e212
@@ -29,10 +29,14 @@ SELECT (ST_Dump(ST_LineMerge(ST_Collect(geometry)))).geom AS geometry,
|
||||
foot,
|
||||
horse,
|
||||
mtb_scale,
|
||||
CASE
|
||||
WHEN access IN ('private', 'no')
|
||||
THEN 'no'
|
||||
ELSE NULL::text END AS access,
|
||||
layer
|
||||
FROM osm_highway_linestring_gen_z11
|
||||
-- mapping.yaml pre-filter: motorway/trunk/primary/secondary/tertiary, with _link variants, construction, ST_IsValid()
|
||||
GROUP BY highway, network, construction, is_bridge, is_tunnel, is_ford, bicycle, foot, horse, mtb_scale, layer
|
||||
GROUP BY highway, network, construction, is_bridge, is_tunnel, is_ford, bicycle, foot, horse, mtb_scale, access, layer
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */;
|
||||
CREATE INDEX IF NOT EXISTS osm_transportation_merge_linestring_gen_z11_geometry_idx
|
||||
ON osm_transportation_merge_linestring_gen_z11 USING gist (geometry);
|
||||
@@ -53,6 +57,7 @@ SELECT ST_Simplify(geometry, ZRes(12)) AS geometry,
|
||||
foot,
|
||||
horse,
|
||||
mtb_scale,
|
||||
access,
|
||||
layer
|
||||
FROM osm_transportation_merge_linestring_gen_z11
|
||||
WHERE highway NOT IN ('tertiary', 'tertiary_link')
|
||||
@@ -77,6 +82,7 @@ SELECT ST_Simplify(geometry, ZRes(11)) AS geometry,
|
||||
foot,
|
||||
horse,
|
||||
mtb_scale,
|
||||
access,
|
||||
layer
|
||||
FROM osm_transportation_merge_linestring_gen_z10
|
||||
-- Current view: motorway/primary/secondary, with _link variants and construction
|
||||
@@ -100,6 +106,7 @@ FROM osm_transportation_merge_linestring_gen_z9
|
||||
WHERE (highway IN ('motorway', 'trunk', 'primary') OR
|
||||
construction IN ('motorway', 'trunk', 'primary'))
|
||||
AND ST_IsValid(geometry)
|
||||
AND access IS NULL
|
||||
GROUP BY highway, network, construction, is_bridge, is_tunnel, is_ford
|
||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */;
|
||||
CREATE INDEX IF NOT EXISTS osm_transportation_merge_linestring_gen_z8_geometry_idx
|
||||
|
||||
Reference in New Issue
Block a user