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

OSM import: Edges are not divided when new nodes are introduced #48

Open
jnnr opened this issue Oct 2, 2020 · 1 comment
Open

OSM import: Edges are not divided when new nodes are introduced #48

jnnr opened this issue Oct 2, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jnnr
Copy link
Member

jnnr commented Oct 2, 2020

In dhn_from_osm.connect_points_to_network: New edges are just the old edges combined with the new, connecting edges. One step needs to be added: Cutting the edges in two at the new nodes.

https://github.com/oemof/DHNx/blob/dev/dhnx/dhn_from_osm.py#L82

@jnnr jnnr added the bug Something isn't working label Oct 2, 2020
@jnnr jnnr mentioned this issue Oct 2, 2020
2 tasks
@joroeder joroeder added this to the v0.0.2 milestone Oct 22, 2020
@joroeder joroeder self-assigned this Nov 10, 2020
@joroeder
Copy link
Member

Hey, I checked the two approches in the last days in detail, so the already in DHNx existing OSM importer with the bug described in this issue, and an implementation I were using, which is doing the job (see #65).

Fixing the bug of this issue, involves in my opinion some additional effort, which is not done by a 2-liner. Some of the functions needed are already implemented in #65 . Hence, I would suggest to first finish #65 and build on these functions.
Then, e.g. the OSMNetworkImporter.graph_to_component_dfs() method can be adapted quickly. I am already checking how this could work.

In this context, some other issues/questions came up regarding the OSMNetworkImporter :

  • L332: Why is the crs back converted to an ellipsoidal crs here? Using a geographic CRS for calculating lengths of GeoDataFrame in an ellipsoidal crs is not supported by geopandas and results in wrong lengths.
  • L326 Why is this method needed? Why not directly importing the streetsnetwork as a GeoDataFrame via osmnx import?

Has the OSMNetworkImporter so far be used in any application? ;-)

@joroeder joroeder modified the milestones: v0.0.2, v0.0.3 Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants