OSM2World icon indicating copy to clipboard operation
OSM2World copied to clipboard

Road junctions problem

Open JacekTomaszewski opened this issue 1 year ago • 1 comments

Hello, I have a problem with rendering some road junctions. There is a issue when program is finding intersections between way segments (NetworkCalculator.calculateJunctionNodeEffects in first for loop). When way segments are almost parallel, alghoritm is finding point far away from junction (which is true), but it causes a problem of not valid junctions. I've attached geojson & photos of problem.

You can find this problem for example at this xml: https://www.openstreetmap.org/api/0.6/map?bbox=135.5006%2C34.70351%2C135.50438%2C34.70613

0 1 2 3 4

Geojson.txt:

geojson.txt

Situation, when junction is not rendered:

junctionNotRendered

Is there any possibility to fix the problem?

Thanks

JacekTomaszewski avatar Apr 17 '23 09:04 JacekTomaszewski

Thank you for the detailed analysis of the problem!

While this is partly a data issue (2 highway=unclassified ways less than 10 cm apart is not what I consider good mapping), this is just one example of a problem that occurs somewhat frequently and OSM2World needs to become more robust about junction calculations.

I've not yet figured out what the best workaround for this kind of situation should be, but it should be possible to detect cases where the intersection between two adjacent streets would be very far from the junction node.

tordanik avatar Apr 28 '23 08:04 tordanik