[Tile-serving] [openstreetmap/osm2pgsql] Ideas for improved geometry processing (Issue #1663)
Tobias
notifications at github.com
Sat Sep 17 04:45:29 UTC 2022
**Topic: Remove road stubs** – I am processing OSM road data to create a road class network for evaluating bicycle infrastructre. For this, only those roads that are part of a network – as in "they connect to another road" – are interesting. This cleanup becomes more important, the more driveways and footways that lead to houses are mapped.
Eg: <img width="227" alt="image" src="https://user-images.githubusercontent.com/111561/190840612-cfd01c01-7ad8-4abb-9c92-754f6dc58392.png"> https://www.openstreetmap.org/#map=18/52.38108/13.59252 shows a lot of those stubs.
The naive approach I am taking is removing all ways <15m of specific highway types. However, that will remove small segments in the middle of the road and leave larger segments that do not lead anywhere like general highway=service no road network connection.
I started looking into improving the checks with PostGIS: Take the start point, end point > create a buffer > check if roads are part of the buffer (except self) > Only keep those where this is true for both start and end. However, I did not get this query right, yet (code not yet open source).
So ideally, there is a way to specify which stubs I want to remove based on length and road class. Maybe even the class of road that needs to be connected to (consider (or not) a service road a stub if it connects to a footway).
Another thing I noticed is, that this process might need to run multiple times: Once I remove the first stub, there is new one that just as well fits the definition of a stub.
The OSM area at https://www.openstreetmap.org/#map=15/52.3723/13.6252 is a good test ground since it has a lot of stub and smaller road segments.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1663#issuecomment-1249998997
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/issues/1663/1249998997 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220916/d739bc40/attachment.htm>
More information about the Tile-serving
mailing list