Skip to content

Commit

Permalink
Update osm2graph and handle new API
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Jan 12, 2025
1 parent 40bb502 commit 1b33bfd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ serde = "1.0.209"
serde_json = "1.0.127"
simple_logger = "5.0.0"
tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }
utils = { git = "https://github.com/a-b-street/utils" }
5 changes: 3 additions & 2 deletions graph/src/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ impl Graph {
osm_reader,
)?;
post_process_graph(&mut graph)?;
graph.compact_ids();

timer.step("calculate road attributes");
// Copy all the fields
let intersections: Vec<Intersection> = graph
.intersections
.into_iter()
.into_values()
.map(|i| Intersection {
id: IntersectionID(i.id.0),
point: i.point,
Expand All @@ -66,7 +67,7 @@ impl Graph {
// Add in a bit
let mut roads: Vec<Road> = graph
.edges
.into_iter()
.into_values()
.map(|e| Road {
id: RoadID(e.id.0),
src_i: IntersectionID(e.src.0),
Expand Down

0 comments on commit 1b33bfd

Please sign in to comment.