Distance to a segment | Fil | Observable
ojs
ojs
ojs
Author
Fil
@fil
Vocateur.
Comments (3)
Nicolas Lambert
Jun 28, 2023
Hello Fil. Is there a way in js to compute the minimal distance between lines or polygons ?
Fil
Jun 28, 2023
Of course, but the algo you'll use depends on the question: e.g. do you want to compute the distance between two polygons (as a number), find the couple of points that minimizes it, or compute a distance field over a frame?
Nicolas Lambert
Jun 28, 2023
Minimum distance. The distance between 2 adjacent polygons would be zero.
Reply
Add comment
Subscribe to notifications
© 2026 Observable, Inc.
Terms of service
Privacy policy
Product
About
Pricing
Documentation
Release notes
Contact us
Open source
Notebook Kit
Plot
D3
Community
Explore
Forum
Bluesky
YouTube
X
1
Follow
Follow
Distance to a segment | Fil | Observable