Thx I was wondering how we could "fix" existing geometries.  ST_SimplifyPreserveTopology did a nice job on the one I mentioned in the email.<div>Still would like Postgis1.5 not to core dump on this condition though...<br>
<br><div class="gmail_quote">On Thu, Sep 20, 2012 at 11:04 AM, Dave Potts <span dir="ltr"><<a href="mailto:dave.potts@pinan.co.uk" target="_blank">dave.potts@pinan.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have used the jts library and have the same type of issue<br>
<br>
In jts you would<br>
<br>
1.  Try to use a buffer of 0.<br>
2.  Try calling one of the simplify geom operations.<br>
<br>
Dave.<br>
<div><div class="h5">Adam wrote:<br>
> Running this query against Postgis 1.5 causes a core dump:<br>
> SELECT ST_intersects(<br>
>    geomfromtext('POLYGON((31.904296875 67.32421875,14.58984375<br>
> 67.32421875,12.744140625 65.830078125,33.75 66.09375,31.904296875<br>
> 67.236328125,31.81640625 67.32421875,31.904296875 67.32421875))', 4326),<br>
>    geomfromtext('POLYGON((31.904296875 67.32421875,14.58984375<br>
> 67.32421875,12.744140625 65.830078125,33.75 66.09375,31.904296875<br>
> 67.236328125,31.81640625 67.32421875,31.904296875 67.32421875))', 4326)<br>
> );<br>
><br>
> Running against Postgis 2.0 gives the following error (much preferred to<br>
> get an error than a core dump!):<br>
> ERROR:  GEOSIntersects: TopologyException: side location conflict at<br>
> 31.81640625 67.32421875<br>
> CONTEXT:  SQL function "st_intersects" statement 1<br>
><br>
> Both are using geos version: '3.3.5-CAPI-1.7.5'.<br>
><br>
> Unfortunately upgrading to Postgis 2 is not an option for us.<br>
> Our platform is Solaris 10 x86 using 64 bit builds.<br>
><br>
>>From dbx the core file shows:<br>
>   [1] 0x1b408d(0x1, 0x1, 0x474e5543432b2b00, 0xbe0170, 0xfffffd7fffdf8880,<br>
> 0x1b408d), at 0x1b408d<br>
>   [2] _Unwind_RaiseException_Body(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at<br>
> 0xfffffd7ffec416bc<br>
>   [3] _SUNW_Unwind_RaiseException(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at<br>
> 0xfffffd7ffec418a9<br>
>   [4] __cxa_throw(obj = (nil), tinfo = (nil), dest = (nil)), line 75 in<br>
> "eh_throw.cc"<br>
>   [5] geos::geomgraph::EdgeEndStar::propagateSideLabels(this =<br>
> 0xfffffd7ffe6e2a00, geomIndex = 0), line 69 in "new_allocator.h"<br>
>   [6]<br>
> _ZN4geos9geomgraph11EdgeEndStar16computeLabellingEPSt6vectorIPNS0_13GeometryGraphESaIS4_EE(this<br>
> = 0x91bc10, geomGraph = 0xfffffd7fffdf8e18), line 88 in "EdgeEndStar.cpp"<br>
>   [7] geos::operation::relate::RelateComputer::labelNodeEdges(this =<br>
> 0xfffffd7fffdf8e30), line 327 in "RelateComputer.cpp"<br>
>   [8] geos::operation::relate::RelateComputer::computeIM(this =<br>
> 0xfffffd7fffdf8e30), line 131 in "RelateComputer.cpp"<br>
>   [9] geos::operation::relate::RelateOp::relate(a = (nil), b = (nil)),<br>
> line<br>
> 43 in "RelateOp.cpp"<br>
>   [10] geos::geom::Geometry::intersects(this = 0x91b598, g = 0x91b638),<br>
> line 191 in "memory"<br>
>   [11] GEOSIntersects_r(extHandle = 0x91d100, g1 = (nil), g2 = (nil)),<br>
> line<br>
> 351 in "geos_ts_c.cpp"<br>
>   [12] GEOSIntersects(g1 = (nil), g2 = (nil)), line 139 in "geos_c.cpp"<br>
>   [13] intersects(fcinfo = 0xfffffd7fffdf9110), line 2322 in<br>
> "lwgeom_geos.c"<br>
>   [14] ExecMakeFunctionResult(fcache = 0xfffffd7fffdf90d0, econtext =<br>
> 0xbd5740, isNull = 0xbd6c28 "", isDone = (nil)), at 0x5a9d88<br>
>   [15] ExecEvalAnd(andExpr = (nil), econtext = 0xbd5740, isNull = 0xbd6c28<br>
> "", isDone = (nil)), at 0x5aaf23<br>
>   [16] ExecProject(projInfo = 0xbd6c40, isDone = 0xfffffd7fffdf95bc), at<br>
> 0x5ae659<br>
>   [17] ExecResult(node = 0xbd5630), at 0x5ba7d0<br>
>   [18] ExecProcNode(node = 0xbd5630), at 0x5a77ec<br>
>   [19] standard_ExecutorRun(queryDesc = 0xbcd2e8, direction =<br>
> ForwardScanDirection, count = 1), at 0x5a550c<br>
>   [20] fmgr_sql(fcinfo = 0xfffffd7fffdf9880), at 0x5b1529<br>
</div></div>> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</font></span></blockquote></div><br></div>