#1946 closed defect (fixed)
'Spatial exception - geometry intersects edge 5' exception at adding 3 polygons
Reported by: | wimned | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.5.0 |
Component: | topology | Version: | master |
Keywords: | Cc: |
Description
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)
Change History (16)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Milestone: | PostGIS 2.1.0 → PostGIS 2.0.2 |
---|
Another case of snapping that breaks the code...
comment:3 by , 12 years ago
Milestone: | PostGIS 2.0.2 → PostGIS 2.0.3 |
---|
comment:4 by , 11 years ago
Milestone: | PostGIS 2.0.4 → PostGIS 2.0.5 |
---|
comment:5 by , 11 years ago
Milestone: | PostGIS 2.0.5 → PostGIS 2.0.6 |
---|
comment:6 by , 9 years ago
This seems to work with current trunk version (to become 2.2.0 as of r14155) but now with the tip of the 2.1 branch (to become 2.1.9 as of r14154). Can you confirm ?
I hadn't tried to figure out what changed between the two versions.
The summary of the topology built with 2.2.0dev is:
Topology wimpy (id 2626, SRID 4326, precision 1e-05)+ 6 nodes, 9 edges, 4 faces, 0 topogeoms in 0 layers +
comment:8 by , 9 years ago
Alright, I spotted the difference between 2.2 and 2.1. In 2.1, the "working tolerance" of topology is honoured: '1e-05', while in 2.2, the "working tolerance" is re-calculated as 2.76092028808593e-13
comment:9 by , 9 years ago
Ok, after fixing the regression in trunk, this case also fails with 2.2.0dev ... (see #3304). Handling of big tolerances is still an issue.
comment:11 by , 9 years ago
Milestone: | PostGIS 2.0.7 → PostGIS 2.0.8 |
---|
comment:12 by , 7 years ago
Milestone: | PostGIS 2.0.8 → PostGIS 2.2.6 |
---|
comment:13 by , 7 years ago
Milestone: | PostGIS 2.2.6 → PostGIS 2.2.7 |
---|
comment:14 by , 7 years ago
This issue is also solved by merging 0911624e7570fb026cea56772ac746e64bf3a457 from the pull-request associated with bug #3838
comment:16 by , 7 years ago
Milestone: | PostGIS 2.2.7 → PostGIS 2.5.0 |
---|
Did a workaround: