Comments (6)
OSMnx provides comprehensive tools for street network retrieval and analysis but lacks explicit functionality to identify and classify junction types directly from OpenStreetMap (OSM) data.
Note that the settings
module has a useful_tags_node
setting you can use to specify what node attributes you want to retrieve/retain from OSM (similarly there's a useful_tags_way
setting for edge attributes). See the docs. For example, to add in "junction" attributes you can use:
import osmnx as ox
ox.settings.useful_tags_node += ["junction"]
G = ox.graph.graph_from_place("Piedmont, CA, USA", network_type="drive")
We could also consider updating the default value of this setting if there are certain attributes that are universally valuable but currently missing by default.
from osmnx.
Although the user can configure their graph's node attributes with the settings.useful_tags_node
setting, I think @EwoutH has a good suggestion about the usefulness of including junction data by default.
I propose we update the settings.useful_tags_node
from its current ["highway", "ref"]
value to ["highway", "junction", "railway", "ref"]
instead. This would capture common "junction" information as node attributes, and OSMnx aims to model junctions as nodes after all. If the user needs other custom information added as node attributes, the useful_tags_node
setting is always available for them to configure however desired.
It also may make sense to retain the merged nodes' attributes (as a list of unique values, just like the simplify_graph
function does) in the simplification.consolidate_intersections
function (namely, in "step 5" of its source code). Currently it only retains their original osmid values as a list, plus the new node's x and y coordinates.
Finally, we may want to build on #1117 (see also #625) to flexibly relax graph simplification strictness on a list of node attributes. That would allow users to specify node attribute keys (like "highway") that, if present, denotes a node as an endpoint no matter what. Perhaps the simplify_graph
function should accept a node_attrs
list argument to this end. And perhaps if we do go this route, that function maybe should have its new endpoint_attrs
argument renamed to edge_attrs
for clarity.
from osmnx.
This would also be useful for capturing the presence of stop signs, traffic signals, and pedestrian crossings. If we do change the simplify_graph
function as I mentioned, that would allow you to keep those kinds of nodes in a simplified graph.
from osmnx.
Thanks for thinking about this! I will get back in more detail Monday, but I like the general approach.
from osmnx.
Resolution in #1144 with the simplification enhancement I mentioned in #1145.
from osmnx.
Thanks!
from osmnx.
Related Issues (20)
- Node Identification within Buffer Zone (if buffer was to be implemented) HOT 1
- PermissionError [ErrNo 13] when connecting to localhost using the latest docker image HOT 2
- Contributing guidelines link nowhere HOT 2
- Document usage limitations HOT 10
- UnicodeDecodeError in graph_from_xml on Windows Installations HOT 4
- Calling graph_from_place("Alaska", network_type="drive") throws GEOSException: TopologyException HOT 4
- Vasu HOT 1
- Unable to plot superimposed image HOT 1
- street networks graphs not working HOT 3
- AttributeError: module 'osmnx' has no attribute 'clean_intersections' HOT 2
- Removal of inner_polygons from outer_polygons (creation of holes), creates maximum one hole. HOT 5
- Include parking space data in nodes HOT 7
- Fill missing values with most common value on similar roads HOT 4
- OSMnx 2.0 Migration Guide HOT 3
- Support directed bearing/orientation distributions and plots HOT 5
- Support loading and/or merging multiple networks HOT 5
- [Meta] Enable Discussions tab on this GitHub repo HOT 1
- Further API streamlining for v2 HOT 2
- _bearings_distribution: apply weight during histogram HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osmnx.