IsraelHikingMap / Site

Israel Hiking Map has maps, route planning, and travel information for Israel. This repository holds the files needed for running the Israel Hiking Map site and apps.
https://israelhiking.osm.org.il/
Other
81 stars 33 forks source link

Adding a gate inside a polygon fails to find the closest highway #1485

Closed HarelM closed 3 years ago

HarelM commented 3 years ago

Bug

What I expect to happen

When adding a gate it should find the closest highway

What really happened

The gate was added on a polygon who contains the point but is not the closest highway

What I did that caused the issue - step by step

  1. Add a gate inside highway that is a polygon (can be caused by bad mapping)

My environment

Things I think the developers should know, images, links etc.

image in the following change set a barrier was added to the wrong highway - later the highway tags were removed to correct bad mapping. https://www.openstreetmap.org/changeset/103052683

This issue is related to this question where distance returns 0: https://github.com/NetTopologySuite/NetTopologySuite/issues/517

zstadler commented 3 years ago

In this example, the highway tag of the polygon is a mapping error, as it does not exist in the real world. However, a barrier can be put on a closed (circular) road.

HarelM commented 3 years ago

True, this is a great catch by you, thanks!! :-) I had no idea the Distance function could behave like that, and I would probably never have found this bug without your help!