Turfjs / turf

A modular geospatial engine written in JavaScript and TypeScript
https://turfjs.org/
MIT License
9.32k stars 942 forks source link

Requesting for finding nearest point in two polygons #1462

Open dhivehi opened 6 years ago

dhivehi commented 6 years ago

It would be nice if turf.nearestPoint can also accept multiple points as 1st parameter. So that it can be used to find two closest points in two polygons.

rowanwins commented 6 years ago

Hi @dhivehi

That's quite a different use case than what nearestPoint currently supports.

If I understand correctly you want to pass in multiple points and multiple polygons, and somehow find out which polygon is closest to each point - is that correct?

dhivehi commented 6 years ago

Its about finding closest points between two polygons default

rowanwins commented 6 years ago

ah I see, that's clearer thanks @dhivehi