[postgis-users] ST_Intersection error side location conflict

Francois Hugues hugues.francois at irstea.fr
Thu Nov 29 08:20:04 PST 2012


Hello,

Did you try
1. St_isclosed ?
2. To add a where clause st_intersects ?
3. St_makevalid ?
4. The buffer trick (st_buffer(geom, 0)?

Hugues. 

Paolo Crosato <paolo.crosato at targaubiest.com> a écrit :

Hi,

I'm trying to get the intersection between a rectangle and a set of 
multipolygons. They are a lot, SRID is 4326 up to 5 decimals of 
precision, the type of the geom column is Geometry.
Whenever I try to call ST_Intersection I get this error:

ERROR: Error performing intersection: TopologyException: side location 
conflict at 12.0326 45.534856226415094
SQL state: XX000

I've tried validation but I got no errors, this:

select count(*) from adminbndy4 where not ST_IsValid(geom);

returns 0.

Could this be related to the geometries being to complex?

This is an example, sorry for the WOT but the polygons are very rich in 
details (Navteq set):

SELECT ST_Intersection(
ST_GeomFromText('POLYGON((12.032661 45.38736,12.032661 45.667805, 
12.588158 45.667805,12.032661 45.667805,
12.032661 45.38736))',4326),
ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((12.04465 45.50281,12.04407 
45.50131,12.04251 45.50159,12.04213 45.50058,12.04193 45.50009,12.04067 
45.50033,12.04068 45.49972,12.03944 45.4999,12.03918 45.49911,12.03927 
45.49896,12.03999 45.49882,12.03944 45.49727,12.0368 45.4978,12.03628 
45.49652,12.03606 45.49608,12.03541 45.49439,12.03433 45.49159,12.03589 
45.49131,12.04132 45.49031,12.04312 45.48999,12.04257 45.48855,12.04222 
45.48769,12.04166 45.48613,12.04124 45.48502,12.04074 45.48376,12.04208 
45.48351,12.04343 45.48329,12.04412 45.48316,12.04452 45.48309,12.0461 
45.48279,12.04949 45.48218,12.04913 45.48114,12.04871 45.48003,12.04837 
45.47911,12.04724 45.476,12.04648 45.47409,12.04483 45.46989,12.04163 
45.47048,12.04151 45.4705,12.04074 45.47065,12.04012 45.47076,12.03932 
45.4709,12.03617 45.47145,12.03395 45.47188,12.03114 45.47238,12.02927 
45.47274,12.02742 45.47312,12.02659 45.47092,12.02586 45.46894,12.02576 
45.46868,12.02513 45.46691,12.02222 45.46747,12.01986 45.46791,12.0087 
45.46996,12.00782 45.47014,12.00763 45.47019,12.00749 45.47026,12.00697 
45.47037,12.0007 45.47152,11.99946 45.47172,11.999 45.47179,11.99892 
45.47181,11.99767 45.47207,11.99295 45.47293,11.99068 45.47339,11.99014 
45.47344,11.9904 45.47412,11.9905 45.47433,11.99061 45.47462,11.99094 
45.47561,11.99121 45.47633,11.99148 45.47697,11.99168 45.47757,11.99189 
45.47815,11.99207 45.47864,11.99222 45.47909,11.99237 45.47944,11.99238 
45.47953,11.99244 45.47952,11.99313 45.48148,11.99358 45.48274,11.99382 
45.48336,11.99394 45.48368,11.99405 45.48397,11.99478 45.48566,11.99566 
45.48886,11.99675 45.49123,11.99703 45.49195,11.9969 45.49195,11.99734 
45.49307,11.99763 45.49389,11.998 45.49492,11.9984 45.49574,11.99904 
45.49719,11.99932 45.49814,11.99967 45.49909,11.99988 45.49957,12.00044 
45.50114,12.0016 45.50422,12.00295 45.50759,12.00395 45.51029,12.00239 
45.51067,12.00182 45.51077,12.00082 45.51095,11.9999 45.51102,11.99973 
45.5111,11.99865 45.51131,11.99844 45.51137,11.99825 45.51136,11.99719 
45.51154,11.99559 45.51176,11.99508 45.51185,11.99517 45.51228,11.9952 
45.51236,11.99535 45.51279,11.99546 45.51311,11.99562 45.51355,11.99652 
45.51588,11.99742 45.51811,11.99899 45.51778,12.00185 45.51727,12.00319 
45.52081,12.00383 45.52236,12.00433 45.52358,12.00397 45.52365,12.00418 
45.52432,12.00437 45.52479,12.00441 45.52493,12.00444 45.52503,12.00444 
45.52513,12.00442 45.52531,12.00447 45.52558,12.00463 45.52613,12.00514 
45.52758,12.00517 45.52775,12.00516 45.5278,12.00512 45.52785,12.00658 
45.52866,12.00718 45.5304,12.00762 45.53156,12.00765 45.53158,12.0077 
45.53163,12.00779 45.53182,12.00784 45.53186,12.00792 45.53193,12.00797 
45.53195,12.00802 45.53195,12.00809 45.53194,12.00816 45.53192,12.00834 
45.53179,12.00842 45.53175,12.00848 45.53173,12.00855 45.53173,12.00859 
45.53173,12.00863 45.53175,12.0089 45.53189,12.00894 45.53189,12.00907 
45.53189,12.00917 45.53185,12.00927 45.53179,12.00933 45.53177,12.00957 
45.53174,12.0096 45.53172,12.00967 45.53164,12.00972 45.5316,12.00977 
45.53157,12.00988 45.53155,12.00999 45.53155,12.01004 45.53155,12.01015 
45.5316,12.01026 45.53169,12.0103 45.53172,12.01034 45.53172,12.01044 
45.53172,12.01052 45.53169,12.01068 45.53159,12.01083 45.53151,12.01091 
45.53149,12.01097 45.53147,12.01103 45.53147,12.01122 45.5315,12.01128 
45.53151,12.01141 45.53147,12.01171 45.53135,12.01192 45.53128,12.01234 
45.53125,12.01253 45.53115,12.01277 45.5309,12.0132 45.53105,12.01337 
45.53094,12.01348 45.53068,12.01425 45.53045,12.01425 45.53032,12.01429 
45.53019,12.01444 45.53018,12.01457 45.53049,12.01471 45.53051,12.0149 
45.53038,12.01509 45.53005,12.0156 45.52996,12.01553 45.52977,12.01568 
45.52955,12.01628 45.52944,12.01604 45.52888,12.01616 45.52879,12.01667 
45.52866,12.01667 45.5284,12.01677 45.52825,12.01736 45.5283,12.01751 
45.52873,12.01762 45.52876,12.01995 45.52822,12.01964 45.52756,12.01904 
45.52591,12.01949 45.52584,12.02012 45.52595,12.02033 45.52585,12.02031 
45.52556,12.02065 45.52543,12.02103 45.52549,12.02123 45.52543,12.02128 
45.52518,12.0215 45.52509,12.02173 45.5252,12.02214 45.52505,12.02278 
45.52484,12.02309 45.52461,12.0232 45.52444,12.02355 45.5244,12.02375 
45.5243,12.0239 45.52448,12.024 45.52483,12.02427 45.52487,12.02444 
45.52484,12.0245 45.52451,12.02446 45.52434,12.02449 45.52408,12.02431 
45.52345,12.02449 45.52334,12.02544 45.52309,12.02511 45.52211,12.02427 
45.51993,12.02615 45.51958,12.02651 45.52061,12.02697 45.52192,12.02779 
45.5241,12.02792 45.52452,12.02842 45.5259,12.0296 45.52896,12.03059 
45.53154,12.0309 45.53237,12.03104 45.53272,12.03108 45.53281,12.03135 
45.53335,12.03152 45.53367,12.03165 45.53379,12.03169 45.53384,12.03181 
45.53391,12.03194 45.53396,12.032 45.53398,12.03206 45.53409,12.03157 
45.53438,12.03195 45.53456,12.03146 45.53509,12.03155 45.5352,12.03185 
45.53509,12.03239 45.53509,12.03292 45.5345,12.0331 45.5344,12.03323 
45.53433,12.03365 45.5342,12.03428 45.53419,12.03451 45.53411,12.03453 
45.53397,12.03461 45.53383,12.03506 45.53384,12.03557 45.53374,12.03589 
45.5338,12.03637 45.53378,12.03667 45.53384,12.03683 45.53372,12.0367 
45.53347,12.03672 45.53325,12.03689 45.53253,12.03708 45.53185,12.03732 
45.53163,12.03747 45.53147,12.03765 45.53127,12.03805 45.53118,12.03822 
45.53101,12.03849 45.53077,12.03888 45.53067,12.0396 45.53076,12.04012 
45.53086,12.04026 45.53081,12.04047 45.53072,12.04066 45.53075,12.04086 
45.53091,12.04098 45.53097,12.04132 45.53095,12.04164 45.53087,12.04181 
45.53066,12.042 45.53049,12.04225 45.53034,12.04261 45.53031,12.04306 
45.53021,12.04347 45.53005,12.04375 45.52996,12.04416 45.5299,12.04448 
45.52963,12.04463 45.52942,12.04511 45.5292,12.04555 45.52917,12.04588 
45.52911,12.04614 45.52911,12.04647 45.52918,12.04694 45.52921,12.04745 
45.52921,12.04769 45.52928,12.04799 45.5295,12.04844 45.52949,12.04858 
45.5294,12.04869 45.52931,12.04925 45.52923,12.04988 45.52925,12.05041 
45.52919,12.05088 45.52923,12.05109 45.5293,12.05117 45.52931,12.05142 
45.52927,12.05178 45.52914,12.0523 45.52915,12.05263 45.52923,12.05375 
45.52917,12.05419 45.52906,12.05492 45.52905,12.05569 45.52905,12.05595 
45.52899,12.0566 45.52879,12.05695 45.52883,12.0573 45.52895,12.05774 
45.52906,12.05838 45.52914,12.05912 45.52918,12.05958 45.52927,12.06022 
45.52936,12.06047 45.52951,12.06076 45.52949,12.06171 45.52909,12.06199 
45.5292,12.06237 45.52948,12.06263 45.52993,12.06283 45.53031,12.06319 
45.53047,12.06402 45.53074,12.0645 45.53109,12.06521 45.53144,12.0654 
45.53146,12.06597 45.53115,12.06671 45.53114,12.0673 45.53141,12.06765 
45.5315,12.0686 45.53166,12.06935 45.53187,12.07051 45.53189,12.07175 
45.5319,12.07302 45.53195,12.07355 45.53205,12.07413 45.53223,12.07441 
45.53222,12.07488 45.53204,12.0758 45.53161,12.0763 45.53131,12.07668 
45.53118,12.07716 45.53109,12.07701 45.5306,12.07627 45.52864,12.07567 
45.52711,12.07529 45.52616,12.07453 45.52409,12.07396 45.52254,12.07293 
45.51979,12.07267 45.51932,12.06901 45.52018,12.06782 45.52048,12.06601 
45.52087,12.06544 45.51948,12.06532 45.51903,12.06502 45.51909,12.06467 
45.51811,12.06397 45.5159,12.06351 45.51453,12.06368 45.51447,12.06308 
45.51279,12.06224 45.51294,12.06108 45.50964,12.06065 45.50976,12.06015 
45.50818,12.06045 45.50815,12.06003 45.50686,12.05968 45.50566,12.05919 
45.50582,12.05863 45.50583,12.05831 45.50587,12.05816 45.50588,12.0575 
45.50614,12.05708 45.50635,12.05628 45.50663,12.05606 45.50667,12.05561 
45.50667,12.05486 45.50686,12.05425 45.50719,12.05397 45.50731,12.05348 
45.5075,12.05292 45.50781,12.0525 45.50795,12.05166 45.50805,12.0512 
45.50812,12.0509 45.5082,12.05073 45.50836,12.05053 45.50859,12.05051 
45.50885,12.05029 45.50923,12.05027 45.50925,12.04918 45.51037,12.04885 
45.50947,12.04854 45.50884,12.04677 45.50917,12.04649 45.50826,12.04795 
45.50803,12.04766 45.50712,12.0468 45.50727,12.04648 45.50641,12.04629 
45.50591,12.04699 45.5057,12.04658 45.50443,12.04627 45.50366,12.04587 
45.50258,12.04465 45.50281)))')
);

Output of SELECT PostGIS_Full_Version():

"POSTGIS="2.0.1 r9979" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 
2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" TOPOLOGY RASTER"

Thank you in advance for any answer.

Regards,

Paolo Crosato

-- 
Paolo Crosato
Software engineer/Custom Solutions
e-mail: paolo.crosato at targaubiest.com
Office phone: +3904221722825

UBIEST S.p.A.
........................................................................................
www.ubiest.com
Via E. Reginato, 85/H - 31100 Treviso- ITALY Tel [+39] 0422 210 194 - Fax [+39] 0422 210 270 ........................................................................................
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.


_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list