Skip to content

Commit

Permalink
Improves OSM classifications (#565)
Browse files Browse the repository at this point in the history
* Improves OSM classifications

* Improves OSM classifications

* Fixes minor bug on triggers

---------

Co-authored-by: pveigadecamargo <[email protected]>
  • Loading branch information
pedrocamargo and pveigadecamargo committed Sep 19, 2024
1 parent de9b26c commit 140b293
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 43 deletions.
109 changes: 70 additions & 39 deletions aequilibrae/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ network:
- pedestrian
- bridleway
- elevator
- motor
- trunk
- tertiary
- service
Expand All @@ -149,84 +148,116 @@ network:
- abandoned
- platform
- unclassified
- via_ferrata
- busway
modes:
bicycle:
link_types:
- secondary_link
- trail
- cycleway
- trunk_link
- secondary
- escape
- track
- road
- primary
- residential
- footway
- primary_link
- secondary
- secondary_link
- tertiary
- unclassified
- tertiary_link
- living_street
- residential
- cycleway
- corridor
- pedestrian
- path
- track
- trail
- elevator
- tertiary
- service
- proposed
- construction
- unclassified
mode_filter:
bicycle: 'no'
unknown_tags: true
car:
link_types:
- motor
- motorway
- trunk
- primary
- secondary_link
- trunk_link
- secondary
- tertiary
- unclassified
- residential
- escape
- road
- motorway_link
- trunk_link
- primary
- residential
- motorway
- primary_link
- secondary_link
- unclassified
- tertiary_link
- living_street
- pedestrian
- bridleway
- trunk
- tertiary
- service
- escape
- road
- construction
- unclassified
mode_filter:
motor_vehicle: 'no'
unknown_tags: true
transit:
link_types:
- motor
- motorway
- trunk
- primary
- secondary_link
- trunk_link
- secondary
- tertiary
- unclassified
- residential
- escape
- road
- motorway_link
- trunk_link
- primary
- residential
- motorway
- primary_link
- secondary_link
- unclassified
- tertiary_link
- living_street
- pedestrian
- bridleway
- trunk
- tertiary
- service
- escape
- road
- construction
- unclassified
- bus_guideway
- busway
unknown_tags: true
walk:
link_types:
- cycleway
- footway
- steps
- corridor
- pedestrian
- elevator
- secondary_link
- escalator
- trail
- cycleway
- path
- trunk_link
- secondary
- escape
- track
- trail
- road
- primary
- corridor
- residential
- footway
- primary_link
- unclassified
- tertiary_link
- living_street
- pedestrian
- bridleway
- elevator
- tertiary
- service
- steps
- proposed
- construction
- unclassified
- via_ferrata
mode_filter:
pedestrian: 'no'
unknown_tags: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ create trigger new_link after insert on links
set b_node = (
select node_id
from nodes
where nodes.geometry = EndPoint(links.geometry) and
where nodes.geometry = EndPoint(new.geometry) and
(nodes.rowid in (
select rowid from SpatialIndex where f_table_name = 'nodes' and
search_frame = EndPoint(links.geometry)) or
search_frame = EndPoint(new.geometry)) or
nodes.node_id = new.b_node))
where links.rowid = new.rowid;
update links
Expand Down Expand Up @@ -160,10 +160,10 @@ create trigger updated_link_geometry after update of geometry on links
set b_node = (
select node_id
from nodes
where nodes.geometry = EndPoint(links.geometry) and
where nodes.geometry = EndPoint(new.geometry) and
(nodes.rowid in (
select rowid from SpatialIndex where f_table_name = 'nodes' and
search_frame = EndPoint(links.geometry)) or
search_frame = EndPoint(new.geometry)) or
nodes.node_id = new.b_node))
where links.rowid = new.rowid;
update links
Expand Down

0 comments on commit 140b293

Please sign in to comment.