Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to check distance from point to polygon (area)? #14

Open
FetFrumos opened this issue Sep 18, 2021 · 0 comments
Open

How to check distance from point to polygon (area)? #14

FetFrumos opened this issue Sep 18, 2021 · 0 comments

Comments

@FetFrumos
Copy link

I have a polygon that consists of an array of points. I have a point that is outside this polygon. how can I find the closest distance between a point and a polygon?

I have one option so far:
1.Calculate the distance between each polygon point and the outer point
2. find the nearest point, find an adjacent one for it (line).
3. Calculate the distance between the line and the outside point(using distanceToLine).

but it seems complicated to me. maybe there is an easier solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant