Hi.

If it is possible to calculate the direction from a point to a polygon?

For example, I need to find the distance from the house to the park. If I use the centroid, then I am faced with the problem that some parks are so large that the distance from the center of the park to its outskirts is greater than the distance from the house to the park border.

1 Like

Please visit

Turg.js

it has solution for that.

Why don’t you just calculate the distances from the house to all points of the park polygon and then take the minimum?