#24 GeometrySnapper snaps to far point

open
nobody
None
5
2011-12-12
2011-12-12
No

Snapping LINESTRING(0 0, 10 0) to LINESTRING(0 0, 9 0, 10 0, 11 0) snaps the (10 0) vertex of the first geometry to the (11 0) vertex of the second one rather than keeping it where it is, since the second geometry has one point in that exact position.

Sounds like a bug, what do you think ?

Origin of the report: http://trac.osgeo.org/geos/ticket/501

Testcase attached.

Discussion

  • Sandro Santilli

    Sandro Santilli - 2011-12-15

    The idea here is that snapping could occur toward the closest point rather than toward the first scanned point falling below the threshold. Does it make sense ? Would you accept a patch in this direction ?

     
  • Sandro Santilli

    Sandro Santilli - 2013-04-15

    Martin, have you ever read this ? It's been some time now ... :)
    I was thinking that avoiding segment snaps where the closest point is an endpoint should also resolve this case, with less performance penalty.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks