[geos-devel] SnapPointToLine : GEOS : where is the code for st_intersects between line and point?

Sandro Santilli strk at keybit.net
Thu Nov 7 08:44:21 PST 2013


On Thu, Nov 07, 2013 at 02:36:26PM +0100, Rémi Cura wrote:
> Hey,
> after some testing it appears that simply evaluating the = with precision
> in mind won't suffice.
> 
> The core of the problem is that the determinant algorithm geos uses seems
> to be designed to robustly say left or right of a line, but not robustly on
> the line.
> 
> So an idea may be to offset the line to the left and the right with the
> precision limit distance, and use the robust determinant to test if the
> point is right of the left and left of the right (between).
> 
> Can I have some answers on this please? Is it doable, ?

Sorry Remi, I think everything is possible, but it needs careful
thinking about consequence of changes. If the design it to be robust,
ading a toleranc would defeat the design, which isn't a sane thing
to do. Rather you might want another class to do things the way
you want them to be done.

It's still not clear to me what the goal is, nor if the provision
of "Fixed Precision Model" helps already at reaching that goal.

Are you trying to find a point that's guaranteed to be found on a
line by robust intersection finder ? My take is that it is
impossible unless the point you pick is a pre-existing vertex of
that line, and so the only way to do it is by also modifying the
line you want to snap to (ie: snap line to closest-point-on-line).

--strk;


More information about the geos-devel mailing list