Skip to content

Commit

Permalink
Update osm tags (#948)
Browse files Browse the repository at this point in the history
- Updated the crossing=island tag to crossing:island=* per OSM guidelines.
- Added crossing_ref tag for ped signalized crossings per OSM guidelines.
- Updated the flashing_lights='yes' tag to include 'button',  'always',
  and 'sensor' per OSM guidelines.
- Updated the footway key to include 'traffic_island' crossings per OSM guidelines.
  • Loading branch information
lalver1 authored Aug 22, 2023
1 parent 620a5f4 commit cbe3c83
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/analysis/features/functional_class.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SET functional_class = 'path',
FROM neighborhood_osm_full_line osm
WHERE neighborhood_ways.osm_id = osm.osm_id
AND osm.highway = 'footway'
AND osm.footway = 'crossing';
AND osm.footway IN ('crossing','traffic_island');

UPDATE neighborhood_ways
SET functional_class = 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/features/island.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ AND EXISTS (
SELECT 1
FROM neighborhood_osm_full_point osm
WHERE osm.highway = 'crossing'
AND osm.crossing = 'island'
AND osm."crossing:island" = 'yes'
AND ST_DWithin(neighborhood_ways_intersections.geom, osm.way, :sigctl_search_dist)
);
2 changes: 1 addition & 1 deletion src/analysis/features/rrfb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ AND EXISTS (
SELECT 1
FROM neighborhood_osm_full_point osm
WHERE osm.highway = 'crossing'
AND osm.flashing_lights = 'yes'
AND osm.flashing_lights IN ('yes','button','always','sensor')
AND ST_DWithin(neighborhood_ways_intersections.geom, osm.way, :sigctl_search_dist)
);
17 changes: 16 additions & 1 deletion src/analysis/features/signalized.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ AND int_id = neighborhood_ways.intersection_from
AND osm."traffic_signals:direction" = 'backward';


------------------------------------------------
-- Traffic light controlled pedestrian crossings
------------------------------------------------
UPDATE neighborhood_ways_intersections
SET signalized = 't'
WHERE legs > 2
AND EXISTS (
SELECT 1
FROM neighborhood_osm_full_point osm
WHERE osm.highway = 'crossing'
AND osm.crossing = 'traffic_signals'
AND ST_DWithin(neighborhood_ways_intersections.geom, osm.way, :sigctl_search_dist)
);


-----------------------------------
-- HAWKs and other variants
-----------------------------------
Expand All @@ -42,7 +57,7 @@ AND EXISTS (
SELECT 1
FROM neighborhood_osm_full_point osm
WHERE osm.highway = 'crossing'
AND osm.crossing IN ('traffic_signals','pelican','toucan')
AND osm.crossing_ref IN ('hawk','pelican','toucan')
AND ST_DWithin(neighborhood_ways_intersections.geom, osm.way, :sigctl_search_dist)
);

Expand Down
2 changes: 2 additions & 0 deletions src/analysis/import/pfb.style
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ node,way bicycle text linear
node,way bridge text linear
node,way button_operated text linear
node,way crossing text linear
node,way crossing:island text linear
node,way crossing_ref text linear
way cycleway text linear
way cycleway:left text linear
way cycleway:right text linear
Expand Down

0 comments on commit cbe3c83

Please sign in to comment.