[postgis-devel] [PostGIS] #1946: 'Spatial exception - geometry intersects edge 5' exception at adding 3 polygons

PostGIS trac at osgeo.org
Fri Aug 3 09:36:13 PDT 2012


#1946: 'Spatial exception - geometry intersects edge 5' exception at adding 3
polygons
----------------------+-----------------------------------------------------
 Reporter:  wimned    |       Owner:  strk         
     Type:  defect    |      Status:  new          
 Priority:  medium    |   Milestone:  PostGIS 2.1.0
Component:  topology  |     Version:  trunk        
 Keywords:            |  
----------------------+-----------------------------------------------------
 The code:

 {{{
 CREATE OR REPLACE FUNCTION testerror1()
  returns void as
 $$
     declare geom0 geometry;
     declare geom1 geometry;
     declare geom2 geometry;
 begin
     raise notice 'version: %', postgis_full_version();

     --perform CreateTopology('wimpy', 4326);
     perform CreateTopology('wimpy', 4326, 0.00001);

     geom0 = ST_GeometryFromText(
      'POLYGON((76.68554 30.74,76.68726 30.74248,
              76.69223 30.74157,76.68554 30.74))',4326);

     geom1 = ST_GeometryFromText(
      'POLYGON((76.68554 30.74,76.67933 30.75,
           76.68727 30.74249,76.68727 30.74248,
           76.68726 30.74248,76.68554 30.74))',4326);

     geom2 = ST_GeometryFromText(
      'POLYGON((76.68728 30.74248,76.68727 30.74248,
           76.68727 30.74249,76.67933 30.75,
           76.69223 30.74157,76.68728 30.74248))',4326);

     perform topogeo_AddPolygon('wimpy', geom0);
     perform topogeo_AddPolygon('wimpy', geom1);
     perform topogeo_AddPolygon('wimpy', geom2);
 END
 $$
 LANGUAGE plpgsql;
 }}}
 Raises the exception mentioned in the title.

 Version printed is:

 POSTGIS="2.1.0SVN r10156" GEOS="3.3.4-CAPI-1.7.3" PROJ="Rel. 4.7.1, 23
 September 2009" LIBXML="2.7.8" TOPOLOGY

 I want to use the software to cleanse some external area data.

 That is why I use nonzero tolerance.

 Code works well, when no tolerance is given.

 Geometry of 'edge number 5' is

 {{{
 LINESTRING(76.67933 30.75,76.68727 30.74249,
              76.68727 30.74248,76.68726 30.74248)
 }}}

 Geometry of curve to be added:

 {{{
 LINESTRING(76.6872793512476 30.7424764568138,
                76.68727 30.74249,76.67933 30.75)
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1946>
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