spatial4j icon indicating copy to clipboard operation
spatial4j copied to clipboard

Shortest distance between Shape (LineString) and a Point

Open mst94 opened this issue 2 years ago • 2 comments

Is it possible to get the distance to the closest segment of a LineString to a Point?

In JTS, it is possible, but in Spatial4J I don't figure it out how to do it exactely. 2023-08-23 14_49_41-Window

mst94 avatar Aug 23 '23 12:08 mst94

I don't think so. Spatial4j is more focused on predicates like intersection, contains, within. There is point-to-point distance via DistanceCalculator but not point to line.

dsmiley avatar Aug 24 '23 05:08 dsmiley

Okay, thanks for the answer!

Am Do., 24. Aug. 2023 um 07:11 Uhr schrieb David Smiley < @.***>:

I don't think so. Spatial4j is more focused on predicates like intersection, contains, within. There is point-to-point distance via DistanceCalculator but not point to line.

— Reply to this email directly, view it on GitHub https://github.com/locationtech/spatial4j/issues/230#issuecomment-1691012408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXZWPMLFI6BJCV5XFOWNH3XW3PADANCNFSM6AAAAAA33NT6L4 . You are receiving this because you authored the thread.Message ID: @.***>

mst94 avatar Aug 24 '23 05:08 mst94