[postgis-devel] [PostGIS] #2007: topogeo_addlinestring: behaviour depends on query order (error - geometry intersects edge)

PostGIS trac at osgeo.org
Tue Sep 18 10:42:38 PDT 2012


#2007: topogeo_addlinestring: behaviour depends on query order (error - geometry
intersects edge)
-------------------------------+--------------------------------------------
 Reporter:  amartin            |       Owner:  strk         
     Type:  defect             |      Status:  new          
 Priority:  medium             |   Milestone:  PostGIS 2.0.2
Component:  topology           |     Version:  2.0.x        
 Keywords:  linestring, order  |  
-------------------------------+--------------------------------------------

Comment(by strk):

 I take it back, it's not between the input, but between two vertices in
 the first geometry (the one which gets successfully added).

 The snap tolerance you're passing (0.01) is higher than this distance
 between adjacent vertices of the first geometry, which makes a mess.

 This is another case in which an analysis function telling you what's the
 closest non-zero distance between any two vertices of a geometry could
 help.
 Also, you may want to ST_Simplify your input geometries by the tolerance
 value, prior to pass to addLinestring.

 Not sure if PostGIS should do this automatically.

 Anyway for this case, one of the correctly computed set of edges to add
 from the second geometry becomes invalid once snapped to existing nodes.
 The snapping _moves_ one vertex to collapse onto another. It _may_ or may
 not be improved by disallowing snapping to a vertex of the input geometry.

 It is basically this:
 {{{
 MULTILINESTRING((493339.655027555 4364376.38759966,493340.350449389
 4364380.30185901),(493375.776788431 4364392.72706278,493383.13466486
 4364395.75384862),(493340.350449389 4364380.30185901,493340.351099381
 4364380.30551897,493349.447316675 4364380.22546209,493357.127624414
 4364380.58832002,493363.534047898 4364383.70829175,493369.531348115
 4364387.81043901,493375.776788431 4364392.72706278))
 }}}

 Snapped to this:
 {{{
 MULTIPOINT(493340.350449389 4364380.30185901,493375.776788431
 4364392.72706278)
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2007#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list