[postgis-users] GEOSSymDifference error in st_changeedgegeom

Paolo Crosato paolo.crosato at targaubiest.com
Tue Jan 15 07:42:24 PST 2013


Hi,

while working on simplifying my topology, I got an error in 
st_changeedgegeom near line 180, at this point:

   range := ST_SymDifference(range, tmp2);

The query that gives the error is this one:

select 
ST_SymDifference(ST_GeomFromEWKB('\x0106000020e61000000400000001030000000100000005000000e42cec69873ff2bf9e98f56228e34740e92b4833164df2bf3b1e335019e34740768e01d9eb5df2bfd0d556ec2fe3474050c5feb27b72f2bfb94e232d95e34740e42cec69873ff2bf9e98f56228e34740010300000001000000040000000db0f50ea8b7f2bf17c856dd28e447407ff6234564d8f2bff1ba7ec16ee447409dd7d825aab7f2bfe4fc4d2844e447400db0f50ea8b7f2bf17c856dd28e4474001030000000100000004000000f9c5feb27b72f2bfbb4e232d95e347406ec5feb27b72f2bfba4e232d95e3474050c5feb27b72f2bfb94e232d95e34740f9c5feb27b72f2bfbb4e232d95e3474001030000000100000005000000f9c5feb27b72f2bfbb4e232d95e34740988bf84ecc7af2bf25eeb1f4a1e347402c137ea99fb7f2bfd656ec2fbbe347400db0f50ea8b7f2bf17c856dd28e44740f9c5feb27b72f2bfbb4e232d95e34740'),
ST_GeomFromEWKB('\x0106000020e6100000050000000103000000010000000c000000e42cec69873ff2bf9e98f56228e347400edb16653648f2bf4985b18520e34740e92b4833164df2bf3a1e335019e34740a94d9cdcef50f2bf33f9669b1be347407daeb6627f59f2bf2cf180b229e34740758e01d9eb5df2bfd0d556ec2fe34740533f6f2a5261f2bfd717096d39e34740f4893c49ba66f2bfc8073d9b55e34740b8239c16bc68f2bf33a7cb6262e34740aa2b9fe57970f2bf4165fcfb8ce3474041c5feb27b72f2bfb94e232d95e34740e42cec69873ff2bf9e98f56228e3474001030000000100000004000000fcc5feb27b72f2bfbb4e232d95e347406dc5feb27b72f2bfba4e232d95e3474041c5feb27b72f2bfb94e232d95e34740fcc5feb27b72f2bfbb4e232d95e34740010300000001000000050000007ab36fcd03d2f2bfdb15192461e447405070b1a206d3f2bff19d98f562e4474062670a9dd7d8f2bf0e4faf9465e447407ff6234564d8f2bff1ba7ec16ee447407ab36fcd03d2f2bfdb15192461e447400103000000010000000c000000fcc5feb27b72f2bfbb4e232d95e34740978bf84ecc7af2bf24eeb1f4a1e34740e527d53e1d8ff2bf8f8d40bcaee3474036cd3b4ed191f2bf649291b3b0e34740841266dafe95f2bf1de6cb0bb0e34740e3361ac05ba0f2bfb2632310afe347405c5a0d897bacf2bf72f90fe9b7e3474031d3f6afacb4f2bf4f232d95b7e347402b137ea99fb7f2bfd656ec2fbbe347402d431cebe2b6f2bf551344dd07e447400ac902499db6f2bf2ce8c3a326e44740fcc5feb27b72f2bfbb4e232d95e34740010300000001000000090000007ab36fcd03d2f2bfdb15192461e447400473f4f8bdcdf2bfea5be67459e44740a31ea2d11dc4f2bfb1f9b83654e447405969520ababdf2bf2384471b47e447409dd7d825aab7f2bfe3fc4d2844e447406519e25817b7f2bf63ee5a423ee4474011e4a08499b6f2bf15e3fc4d28e447400ac902499db6f2bf2ce8c3a326e447407ab36fcd03d2f2bfdb15192461e44740')
);

ERROR: GEOSSymDifference: TopologyException: found non-noded 
intersection between LINESTRING (-1.14793 47.7749, -1.14793 47.7749) and 
LINESTRING (-1.14793 47.7749, -1.14793 47.7749) at -1.1479299999999952 
47.774900000000002

If I dump the geometries in EWKT instead of EWKB, the error won't show:

select 
ST_SymDifference(ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-1.14051 
47.77467,-1.14382 47.77421,-1.14793 47.7749,-1.15294999999999 
47.77799,-1.14051 47.77467)),((-1.16983800738945 
47.7824970887888,-1.17783 47.78463,-1.16984 47.78333,-1.16983800738945 
47.7824970887888)),((-1.15295000000003 47.77799,-1.15295 
47.77799,-1.15294999999999 47.77799,-1.15295000000003 
47.77799)),((-1.15295000000003 47.77799,-1.15498 47.77838,-1.16983 
47.77915,-1.16983800738945 47.7824970887888,-1.15295000000003 47.77799)))'),
ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-1.14051 47.77467,-1.14263 
47.77443,-1.14382 47.77421,-1.14476 47.77428,-1.14685 47.77471,-1.14793 
47.7749,-1.14876 47.77519,-1.15008 47.77605,-1.15057 47.77644,-1.15246 
47.77774,-1.15294999999999 47.77799,-1.14051 
47.77467)),((-1.15295000000003 47.77799,-1.15295 
47.77799,-1.15294999999999 47.77799,-1.15295000000003 
47.77799)),((-1.17627315758293 47.7842145082938,-1.17652 
47.78427,-1.17794 47.78435,-1.17783 47.78463,-1.17627315758293 
47.7842145082938)),((-1.15295000000003 47.77799,-1.15498 
47.77838,-1.15994 47.77877,-1.1606 47.77883,-1.16162 47.77881,-1.16415 
47.77878,-1.16711 47.77905,-1.16911 47.77904,-1.16983 47.77915,-1.16965 
47.78149,-1.1695835926044 47.7824291903092,-1.15295000000003 
47.77799)),((-1.17627315758293 47.7842145082938,-1.17523 
47.78398,-1.17288 47.78382,-1.17132 47.78342,-1.16984 47.78333,-1.1697 
47.78315,-1.16958 47.78248,-1.1695835926044 
47.7824291903092,-1.17627315758293 47.7842145082938)))')
);

Could this be related to some rounding error in floating point 
computations? Is there a way to workaround the issue, or should I just 
skip the edge and log it, instead of stopping the procedure (I'll do 
this anyway for now, since this could happen on just some edges on 
millions).

My version is:
"POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.8.0, 6 
March 2012" GDAL="GDAL 1.8.1, released 2011/07/09" LIBXML="2.7.6" 
LIBJSON="UNKNOWN" TOPOLOGY RASTER"

on postgresql 9.2, installed from the postgres repo for centos6.

Thank you for any feedback.

Regards,

Paolo


-- 
Paolo Crosato





More information about the postgis-users mailing list