[Patch] Improve LocationHook

Hi all, in the forum there was a discussion about "tooltip for residential area" https://forum.openstreetmap.org/viewtopic.php?id=64986 I am not sure if it helps, here is a patch that might improve the LocationHook for closed ways where some points are on a boundary or a boundary is crossing the polygon in a small part. With the current code the result is sometimes surprising, esp. if a very small of a polygon is outside of the "wanted" boundary. The patch calculates the "Center of geometry" for closed ways and uses it first when it lies inside the polygon to calculate the adminlevel values. This might slow down processing if there are many complex closed ways. I did not see many differences in my area, I guess it depends on the accuracy of boundaries. Gerd
participants (1)
-
Gerd Petermann