[postgis-tickets] [PostGIS] #3838: topology.toTopoGeom fails with ERROR: XX000: SQL/MM Spatial exception - geometry crosses, when using tolerance 10 meter

PostGIS trac at osgeo.org
Wed Oct 18 00:23:27 PDT 2017


#3838: topology.toTopoGeom fails with ERROR:  XX000: SQL/MM Spatial exception -
geometry crosses,  when using tolerance 10 meter
-------------------------+-------------------------------------------------
  Reporter:  laopsahl    |      Owner:  strk
      Type:  defect      |     Status:  assigned
  Priority:  medium      |  Milestone:  PostGIS 2.3.4
 Component:  topology    |    Version:  2.3.x
Resolution:              |   Keywords:  totopogeom, ERROR:  XX000: SQL/MM
                         |  Spatial exception - geometry crosses
-------------------------+-------------------------------------------------

Comment (by laopsahl):

 Hi

 I have tested something like this (see attachments just added).

 The logic I tested , was that before I start i reduce the tolerance I I
 try to add simple pieces of lines like this.

 1) If I get a exception I try to adde each single piece of the line. This
 means that if the line has 5 points, I try add 4 line pieces in a separate
 operations using the original tolerance.

 2) If I still get a exception on a line piece with only 2 points, the I
 try to reduce the tolerance in steps 1 meter down to zero meter.

 With this approach I also fails to add all lines, here is description of
 the attachments above.

 I start with this break_up_reduce_1 (light yellow existing data, red new
 lines add)

 The I get this result  break_up_reduce_2.png (The green lines are valid
 edges, the light red dotted lines are line pieces that I failed to add)

 After using the approach above I end with non closed polygons because I
 fails to add the red red dotted part of the new data, so I end with a non
 closed polygons.

 So for me it seems fail even if I add a single line with two points and
 tolerance 0. It does not happen often but it happens.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3838#comment:9>
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-tickets mailing list