Skip to content

Commit

Permalink
Do not merge ways when the requested tags differ
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristramg committed Jun 12, 2024
1 parent db9ef40 commit ebd2e65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "osm4routing"
edition = "2021"
version = "0.6.2"
version = "0.6.3"
authors = ["Tristram Gräbener <[email protected]>"]
description = "Convert OpenStreetMap data into routing friendly CSV"
homepage = "https://github.com/Tristramg/osm4routing2"
Expand Down
2 changes: 2 additions & 0 deletions src/osm4routing/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,12 @@ impl Reader {
for (node, edges) in neighbors.drain() {
// We merge two edges at the node if there are only two edges
// The edges must have the same accessibility properties
// If the consummer asked to store the tags, the tags must be the same for both edges
// The edges must be from different ways (no surface)
// The edges must not have been merged this iteration (they might be re-merged through a recurive call)
if edges.len() == 2
&& edges[0].properties == edges[1].properties
&& edges[0].tags == edges[1].tags
&& edges[0].id != edges[1].id
&& !already_merged.contains(&edges[0].id)
&& !already_merged.contains(&edges[1].id)
Expand Down

0 comments on commit ebd2e65

Please sign in to comment.