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
@@ -20,6 +20,7 @@ CREATE OR REPLACE FUNCTION layer_transportation(bbox geometry, zoom_level int)
|
||||
oneway int,
|
||||
brunnel text,
|
||||
service text,
|
||||
access text,
|
||||
layer int,
|
||||
level int,
|
||||
indoor int,
|
||||
@@ -57,6 +58,7 @@ SELECT osm_id,
|
||||
is_oneway::int AS oneway,
|
||||
brunnel(is_bridge, is_tunnel, is_ford) AS brunnel,
|
||||
NULLIF(service, '') AS service,
|
||||
access,
|
||||
NULLIF(layer, 0) AS layer,
|
||||
"level",
|
||||
CASE WHEN indoor = TRUE THEN 1 END AS indoor,
|
||||
@@ -77,6 +79,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
NULL AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -107,6 +110,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
NULL AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -137,6 +141,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
NULL AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -167,6 +172,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
NULL AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -197,6 +203,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
NULL AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -227,6 +234,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -257,6 +265,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -287,6 +296,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
NULL AS service,
|
||||
access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -319,6 +329,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
public_transport,
|
||||
service_value(service) AS service,
|
||||
CASE WHEN access IN ('private', 'no') THEN 'no' END AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -368,6 +379,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
NULL::boolean AS is_bridge,
|
||||
NULL::boolean AS is_tunnel,
|
||||
NULL::boolean AS is_ford,
|
||||
@@ -401,6 +413,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
NULL::boolean AS is_bridge,
|
||||
NULL::boolean AS is_tunnel,
|
||||
NULL::boolean AS is_ford,
|
||||
@@ -434,6 +447,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -466,6 +480,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -498,6 +513,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -531,6 +547,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -564,6 +581,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -595,6 +613,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -625,6 +644,7 @@ FROM (
|
||||
shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -655,6 +675,7 @@ FROM (
|
||||
shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -686,6 +707,7 @@ FROM (
|
||||
shipway,
|
||||
NULL AS public_transport,
|
||||
service_value(service) AS service,
|
||||
NULL::text AS access,
|
||||
is_bridge,
|
||||
is_tunnel,
|
||||
is_ford,
|
||||
@@ -721,6 +743,7 @@ FROM (
|
||||
NULL AS shipway,
|
||||
public_transport,
|
||||
NULL AS service,
|
||||
NULL::text AS access,
|
||||
CASE
|
||||
WHEN man_made IN ('bridge') THEN TRUE
|
||||
ELSE FALSE
|
||||
|
||||
Reference in New Issue
Block a user