Open chamikabm opened 7 months ago
As points are Float64
, I would buffer the line a bit
LibGEOS.intersects(nearest_point, buffer(geos_line_string,1e-12)) # true
@jaakkor2 , Checking with a buffer would work, but what I wanna know, is what would be the most accurate way to create such a snapped point?
I have a line string as follows, consisting of a few points (longitude/latitude) coordinates in Paris. I tried to find the closest snapped point on the given line and from a give-point
I’m using the LibGEOS library to do this as follows, but here’s the thing: visually, it looks like the point is snapping to the closest spot, but when I check with the intersect method using the same library, it turns out it’s not lining up with the provided line:
But when I check the nearest point: