villares, to python Portuguese
@villares@ciberlandia.pt avatar

A geodataframe "hello world" ?

villares, to python Portuguese
@villares@pynews.com.br avatar
villares, (edited ) to python Portuguese
@villares@ciberlandia.pt avatar

Playing with #openStreetMaps on #Python but I'm struggling to get nodes from a single street using #osmnx, any tips?

I managed to get a "walk" network of São Paulo and tried this nice #isochrone tutorial: https://github.com/gboeing/osmnx-examples/blob/main/notebooks/13-isolines-isochrones.ipynb

But getting nodes from a single street eludes me...

(next challenge will be to get Z/elevation ... ooff)

cc @natera

Update: Some progress — I converted the network to a geodataframe and filtered it by the "name" column, it feels very awkward yet and I'm not sure what I'm doing.

villares, (edited )
@villares@ciberlandia.pt avatar

@natera cheers Luis...

I've learned to get things just inside a bounding box...https://github.com/villares/sketch-a-day/blob/main/2023/sketch_2023_08_25/sketch_2023_08_25.py but I'm struggling with the documentation :(
I don't have a very definite goal but I'm exploring some ideas. I'd like to highlight a a chosen street and calculate it's length in meters.

I can convert a graph to a , just edges, and select named edges. But then I can't convert them back to a network (because I don't have nodes? Because I'm using the wrong methods?)
Can I plot the gdf together with the graph? Maybe I should learn to extract the nodes?

I can see some shapely geometry inside the dataframes, I wish I could convert/project it's coordinates to meters and then to some "screen coordinates" so I can draw them myself with instead of matplotlib (I never use matplotlib so I'm perpetually confused by it).

And don't worry if you can't help me much with this...

Update: I learned how to get the gdf (edged, nodes) tuple and I can highlight the selected street :)

villares,
@villares@ciberlandia.pt avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • ethstaker
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • tester
  • khanakhh
  • everett
  • thenastyranch
  • Youngstown
  • slotface
  • tacticalgear
  • kavyap
  • osvaldo12
  • JUstTest
  • mdbf
  • GTA5RPClips
  • ngwrru68w68
  • provamag3
  • Durango
  • rosin
  • cisconetworking
  • normalnudes
  • modclub
  • megavids
  • cubers
  • Leos
  • lostlight
  • All magazines