Ever needed to simplify street networks? I did. And it is a pain. So we joined forces with @anavybor and @JamesGaboardi and wrote an algorithm that does that for us. And can do for you, as it is available as a Python package called `neatnet`.

Here's a short blog about it - https://martinfleischmann.net/simplification-of-street-networks/

And here's, not so short preprint - https://arxiv.org/abs/2504.16198

But you probably want the package. That is here - https://uscuni.org/neatnet.

Happy coding!

#python #networks #geopython

Simplification of street networks

I have been working with street networks for a long time. My first analysis will date probably back to 2017 or so. Most of those focused on the same aspect - understanding the morphology. Yet, practically none of the networks I was able to obtain reflected morphology directly. Rather, they captured transportation networks, with all the detailed intersections, every tiny roundabout, slipway, double carriageway, and so on. Which is pretty annoying when you are interested in a representation of space, not of traffic lines.

@martinfleis @anavybor @JamesGaboardi this looks excellent. I'll have a go when I get a chance. I'd be interested to see what @robinlovelace thinks about this, and will ask him next time I see bim

(On a personal note, thanks for acknowledging #parenx https://pypi.org/project/parenx/. It was the best we could do at the time, warts and all).

Client Challenge

AGILE-GISS - What are intersections for pedestrian users?

@jm_favreau @anavybor @JamesGaboardi @JauneBaguette Nice! I completely missed this one before, thanks for sharing!
@martinfleis Do you know if this package can also be used for power systems? Because when using OSM data of electricity grids, the problem is rather similar.
@floko Possibly? We may need to tweak artifact detection which is tuned for streets but the geometry replacement should work.

@martinfleis Great. I was recently facing this problem here: https://github.com/pypsa-meets-earth/earth-osm/issues/60#issuecomment-2801617312

Maybe I'll look a bit deeper into your code and see if it can be used (as soon as I find the time).

Export grids to CIM format · Issue #60 · pypsa-meets-earth/earth-osm

Is your feature request related to a problem? Please describe. The Common Information Model is a data model used within the energy domain, mainly TSOs, to save data of their grid components and top...

GitHub
@floko Looks like a slightly different problem but maybe some components (node consolidation?) may be useful.
@martinfleis @anavybor @JamesGaboardi cool! Do you think it would work on more "organic" paths e.g. gps tracks of hikes / bike rides or a river network?
@arongergely @anavybor @JamesGaboardi Maybe partially? I'd have to try but as long as those for the “artifacts”, it could.