include route relation ref in existence check (#1139)

Fixes #1138
Unblocks #1131
Unblocks #1128 

Below is an example of a way that is part of a route relation (in this case, RI-3), but does not have a ref set on the way itself:
![image](https://user-images.githubusercontent.com/3254090/124366616-1509e900-dc1f-11eb-87ab-aadd4f21287d.png)

This screenshot demonstrates that the `transportation_name` object now contains the ref from the route relation:
![image](https://user-images.githubusercontent.com/3254090/124366563-b5abd900-dc1e-11eb-9fd9-96315ddf7682.png)
This commit is contained in:
Brian Sperlongano 2021-07-05 05:21:35 -04:00 committed by GitHub
parent 1b0b1fd121
commit c8377d38ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ FROM (
hl.z_order hl.z_order
FROM osm_highway_linestring hl FROM osm_highway_linestring hl
LEFT OUTER JOIN osm_route_member rm ON rm.member = hl.osm_id AND rm.concurrency_index=1 LEFT OUTER JOIN osm_route_member rm ON rm.member = hl.osm_id AND rm.concurrency_index=1
WHERE (hl.name <> '' OR hl.ref <> '') WHERE (hl.name <> '' OR hl.ref <> '' OR rm.ref <> '')
AND NULLIF(hl.highway, '') IS NOT NULL AND NULLIF(hl.highway, '') IS NOT NULL
) AS t; ) AS t;
CREATE INDEX IF NOT EXISTS osm_transportation_name_network_osm_id_idx ON osm_transportation_name_network (osm_id); CREATE INDEX IF NOT EXISTS osm_transportation_name_network_osm_id_idx ON osm_transportation_name_network (osm_id);