Ticket #1767 (new defect)

Opened 13 months ago

Last modified 9 months ago

Another bogus result from ST_Snap

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: 2.0.x
Keywords: Cc:

Description

A: LINESTRING(765795.1 2949559.2,765795.2 2949559.2,765794.9 2949559.5,765795.1 2949559.2)
B: LINESTRING(765795.1 2949559.2,765794.9 2949559.2,765795.2 2949558.8,765795.1 2949559.2)
tolerance: 0.25

Bottom-right vertex of line A gets snapped to top-left vertex of line B but the two points are at a distance of 0.3.

See #1714 for the source of this

Change History

Changed 13 months ago by strk

I think I get it: first the bottom-left corner of A (top-right triangle in the picture, with red vertices) gets snapped to top-left corner of B (bottom green triangle in the picture), then the bottom-right corner of A gets snapped to the top-right corner of B. In this case both distances are minor than 0.25.

To be verified.

Changed 13 months ago by strk

Note that always snapping to the closest vertex would have resulted in a collapse of the ring into a line.

Changed 11 months ago by strk

  • milestone changed from PostGIS 2.0.1 to PostGIS GEOS

Changed 9 months ago by strk

I think a collapse would be a sensible result for this case.

What might help, as an analytical and debugging function, would be one reporting the smallest distance between any two vertices in a geometry.

Changed 9 months ago by robe

  • owner changed from pramsey to strk
Note: See TracTickets for help on using tickets.