Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain unique attribute values when consolidating nodes #1144

Merged
merged 7 commits into from
Mar 13, 2024
Merged

Retain unique attribute values when consolidating nodes #1144

merged 7 commits into from
Mar 13, 2024

Conversation

gboeing
Copy link
Owner

@gboeing gboeing commented Mar 12, 2024

This PR resolves #1127 and includes the following enhancements:

  • updates the simplification.consolidate_intersections function to retain unique node attribute values when consolidating multiple nodes into one (like how the simplify_graph function does so for unique edge attribute values).
  • adds the OSM "junction" and "railway" tags to the default settings.useful_tags_node value to properly capture whether or not a node is a junction (see also https://wiki.openstreetmap.org/wiki/Junctions)
  • no longer creates useless "lat" and "lon" node attributes when projecting a graph, because geometry data is consistently stored in the "x" and "y" attributes (or "geometry" attribute as a Shapely Point).

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (ea397d3) to head (9de6b89).

❗ Current head 9de6b89 differs from pull request most recent head 06c4ff0. Consider uploading reports for the commit 06c4ff0 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##               v2    #1144   +/-   ##
=======================================
  Coverage   98.02%   98.03%           
=======================================
  Files          25       25           
  Lines        2433     2438    +5     
=======================================
+ Hits         2385     2390    +5     
  Misses         48       48           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gboeing gboeing merged commit 1f5604a into v2 Mar 13, 2024
5 checks passed
@gboeing gboeing deleted the nodes branch March 13, 2024 19:37
@gboeing gboeing mentioned this pull request Mar 13, 2024
13 tasks
@gboeing
Copy link
Owner Author

gboeing commented May 3, 2024

The first pre-release OSMnx v2 beta has been released. Testers needed! See #1123 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant