[postgis-devel] [PostGIS] #2038: Exception of topogeo_AddLineString() of a line string with a part colinear with an existing one.

PostGIS trac at osgeo.org
Thu Oct 11 13:07:28 PDT 2012


#2038: Exception of topogeo_AddLineString() of a line string with a part colinear
with an existing one.
----------------------+-----------------------------------------------------
 Reporter:  wimned    |       Owner:  strk         
     Type:  defect    |      Status:  assigned     
 Priority:  medium    |   Milestone:  PostGIS 2.0.2
Component:  topology  |     Version:  trunk        
 Keywords:            |  
----------------------+-----------------------------------------------------

Comment(by strk):

 The two lines are DISJOINT, according to ST_Relate.
 When it comes to adding the first point of the new line, the code computes
 its own tolerance based on what's the minimum drift representable with
 floating points at point ordinate distance from origin. In this case the
 number comes out as ~ 2e-13:

 {{{
 DEBUG:  Tolerance for snapping to point POINT(72.9123215921439
 20.9563372813038) = 2.62484357731718e-13
 }}}

 This will basically split the first edge.
 You can obtain the same result by running:
 {{{
 SELECT TopoGeo_addPoint('t2038',
 ST_StartPoint('LINESTRING(72.9123215921439
 20.9563372813038,72.9122229474764 20.9564195766326, 72.9130010661966
 20.9562352183313,72.9123215921439 20.9563372813038)'));
 }}}

 BUT if you do, then adding the linestring _will_work_ !
 So I guess this is about a missing re-snap after the splitting

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2038#comment:6>
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