0

),

I am working with the package osmnx and networkx.

Is there any way to introduce a node correspond a building (geocode) into an edge of a graph that I have downloaded from openstreetmap ?

Currently when I download a graph of city, each node correspond to an intersection. I wanted to know if I could donwload a graph of Paris with node correponding to there building ?

By getting information of node, I see that the name of some of theme represent the name of street but no more information :-/

name_place ="Paris, France"
graphe = ox.graph_from_address(name_place, network_type='drive')

for node in graphe.node:
    print(graphe[node])
{25032701: {0: {'osmid': 556453398, 'length': 10.781, 'highway': 'residential', 'name': 'Impasse Chartière', 'oneway': False}}}


{25183601: {0: {'osmid': 19780809, 'length': 136.264, 'highway': 'tertiary', 'name': "Rue de l'Ancienne Comédie", 'oneway': False, 'geometry': <shapely.geometry.linestring.LineString object at 0x7f1798044128>, 'maxspeed': '30'}},

24983651: {0: {'osmid': 4216831, 'length': 20.973, 'highway': 'tertiary', 'name': "Carrefour de l'Odéon", 'oneway': False, 'geometry': <shapely.geometry.linestring.LineString object at 0x7f17980447b8>}},

367505: {0: {'osmid': 204056329, 'length': 120.14500000000001, 'highway': 'primary', 'name': 'Boulevard Saint-Germain', 'oneway': True, 'geometry': <shapely.geometry.linestring.LineString object at 0x7f1798044a58>, 'maxspeed': '50'}}}

etc....

harry
  • 31
  • 6
  • Your question is not clear. A building is usually represented by a *way*. Each *way* consists of multiple *nodes*. Street names and additional information like road type, maxspeed etc. are usually stored in *ways*. Can you rephrase your question or add an example of what you are trying to achieve? – scai Mar 27 '19 at 09:04
  • Sorry :-/ I wanted to know if there is a way to get the drive graph of a city including housenumber ? is it more clear ? :-/ – harry Mar 27 '19 at 10:01
  • According to the [`documentation of graph_from_address()`](https://osmnx.readthedocs.io/en/stable/osmnx.html#osmnx.core.graph_from_address) you can specify other `infrastructure` to download. For [addresses](https://wiki.openstreetmap.org/wiki/Addresses) try adding `addr:housenumber`, `addr:street` and so on. I've never used osmnx so I'm not familiar with further details. – scai Mar 27 '19 at 10:15

0 Answers0