Opened 13 years ago

Closed 11 years ago

#1767 closed defect (fixed)

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 (7)

comment:1 by strk, 13 years ago

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.

comment:2 by strk, 13 years ago

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

comment:3 by strk, 12 years ago

Milestone: PostGIS 2.0.1PostGIS GEOS

comment:4 by strk, 12 years ago

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.

comment:5 by robe, 12 years ago

Owner: changed from pramsey to strk

comment:6 by strk, 11 years ago

The result of this with latest changes in GEOS (upcoming 3.3.9) is that the bottom-left of A gets snapped to top-left corner of B and nothing more. The result is simple, valid and non-collapsed. To be closed once GEOS 3.3.9 is released.

REF http://trac.osgeo.org/geos/ticket/501

comment:7 by strk, 11 years ago

Resolution: fixed
Status: newclosed

GEOS-3.3.9 was released 3 months ago: http://trac.osgeo.org/geos/milestone/3.3.9

Note: See TracTickets for help on using tickets.