[postgis-devel] st_intersect crasher

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Jul 14 02:20:02 PDT 2009


David Fuhry wrote:

> The attached SELECT ST_Intersect(..., ...); query crashes 
> POSTGIS="1.3.5" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 
> 2008" USE_STATS, on Linux.  That GEOS build might be from svn.
> 
> It does not crash POSTGIS="1.3.3" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 
> 4.6.0, 21 Dec 2007" USE_STATS.  (Or POSTGIS="1.3.3" 
> GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS).
> 
> It's between two POLYGONs.  They both pass isvalid().  If the order of 
> the two arguments is reversed (putting small geom before large geom), it 
> succeeds.
> 
> -Dave

Hmmm works for me on 1.3.7SVN and 1.4 with both GEOS 3.0.0 and GEOS 3.1.1:

postgis13=# select 
st_astext(st_intersection('0103000020C90E0000010000004D0000004B807AE8DF4E61C115180E88D06653414B807AE8DF4E61C166126248B16653415C3A9928E04E61C1F3727273A06653416697A848E04E61C115AF846C8C66534194633785E04E61C18D3F05E77F66534154DD8908E04E61C1FFD757F56266534194633785E04E61C165005C5946665341A51D56C5E04E61C1079D102332665341AE75A781E04E61C19FDAA6DC096653411DBE6773E04E61C1F73087A1E36553416EF975CCE04E61C1E58457BCD5655341E794C916E04E61C1E828340F7365534153E2476CE04E61C1DF83A29F45655341FA4BBE57F84E61C1281430CF45655341037648431F4F61C1DB04C96544655341AB0B5ACA704F61C1EF551F55476553414DFA4C3F864F61C1C07BEEA94665534156C0F8F6994F61C1987AA77147655341BBB0672C9A4F61C1E77A81EC46655341D8BE178FE24F61C1DF7EC82446655341FD5AC8E1EB4F61C196C6DD2F48655341C95E5BBBF44F61C1E0CA03B548655341B542F2ABF94F61C108851901496553413FE7318C355061C1C1554CB042655341E63E444D645061C1FD446EA43F6553410BEA2ECB6E5061C16126E6873F655341AAABF0097B5061C167763B364465534166B6CF42915061C12CB75AE5496553419C7D23D0965061C1955CF80C4C6553416
45943D7965061C1FC225BBFC16553415FEDF98B955061C163489DC348665341536FC961A55061C1D74856AD44665341DB3C12AFB95061C19905F1024566534103C5CA72C15061C19905F10245665341B289BC19C15061C11B82AFCA6866534103C5CA72C15061C185DD6C0189665341DE5A09BAC15061C151B5ADA6B06653411FCDBEA7C05061C1C9AFAFFCD3665341353ECCBFCD5061C1C8F4006ED36653417EEC6FC3DC5061C152D77D64D36653411C5663FAEE5061C152D77D64D36653413DAE3DD4FF5061C19774A9E9D36653413DAE3DD4FF5061C10CA71618F56653416218FF8CFF5061C10692E085126753416C705049FF5061C1465A22113167534191D5539EFE5061C192754BC25A675341C192A8AFFD5061C1075E8F43A5675341572C7467FB5061C1C975DDB4A467534128D62789F75061C1E7CB5B65A06753416E2A6920F45061C127EDD6E89E6753419A62BEF3EF5061C18E791E479E67534170823728EE5061C19E75B9B69B6753416D325183DC5061C107F55D1F9C6753417879D4AFC25061C1B26943D39B675341F96AE551A95061C12BC785919C6753410420C379A35061C19B17F98E9967534126FE322C875061C10C716278A06753413C36FFE1715061C1B7374119A0675341A6FE7DF96E5061C1F7D250485C67534148A1CD17305061C1550393935B67534
1FD01643F225061C11C4723C35B6753416CA84637EC4F61C1550393935B6753418648346FA74F61C1A1DE77BA5C67534165E77368654F61C19F5864815C6753411A82E18C494F61C1BF95DA645C6753414044714D434F61C190C51CB05B675341313FAD80374F61C17C09ADDF5B675341FC0EBD5B1E4F61C17C09ADDF5B67534131A4214F1A4F61C17C09ADDF5B6753414CB4FDE6014F61C17C09ADDF5B675341183E2699DD4E61C17C09ADDF5B675341183E2699DD4E61C1936100EF40675341911027E1E64E61C1B6DC31FA42675341117550E2E14E61C1E28739081B675341DE000DF9D54E61C1630E5355FA6653415C3A9928E04E61C1DA16716EDF6653414B807AE8DF4E61C115180E88D0665341'::geometry, 
'0103000020C90E00000100000005000000BA3EBFC9C15061C13B0DA5F73665534143ABD512C45061C156150CF836655341FF580514C45061C1AABB0D094A655341D183E9CAC15061C10768A3084A655341BA3EBFC9C15061C13B0DA5F736655341'::geometry));
         st_astext
--------------------------
  GEOMETRYCOLLECTION EMPTY
(1 row)

You might like to try updating your GEOS SVN snapshot and trying again. 
If it still fails, it would be handy if you could do a bisection on GEOS 
SVN to find out where the failure was introduced.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063



More information about the postgis-devel mailing list