<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Good to have the problem narrowed down.<br>
    <br>
    There's nothing obviously wrong with the polygon, at least from the
    JTS perspective.&nbsp; Perhaps Sandro can shed some light on the issue...<br>
    <br>
    On 8/19/2011 7:03 AM, Christopher DeMars wrote:
    <blockquote
cite="mid:CAGu-AB0nFL0M+Q4eTCZjKT7U7j9vPpXYhqWL7piKX3tcpEfw8Q@mail.gmail.com"
      type="cite">
      <pre wrap="">Thank you Mr. Davis for your attention,

I tried your suggestion of buffering elements individually then
merging the buffers. I buffered several elements without issue, then
got the same program stopping error message as before. On the plus
side, I did isolate a polygon that was crashing things. Attached is
the wkt and wkb of that polygon.

--Christopher


On Thu, Aug 18, 2011 at 8:53 PM, Martin Davis <a class="moz-txt-link-rfc2396E" href="mailto:mtnclimb@telus.net">&lt;mtnclimb@telus.net&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Incidentally, this is one of those cases where buffering by unioning the
buffers of the components far outperforms the straight buffer (for distance
= 100, 10 s vs 70 s).

This is something you might be able to try, if your data model permits it.
Split the geometry into its components, and process them all separately.
This should give better performance, and may avoid the GEOS issues.

On 8/18/2011 8:43 PM, Martin Davis wrote:

I have tested this in JTS 1.12, and can confirm that both isValid and buffer
work correctly.&nbsp; The buffer operation does take quite a while and requires a
significant amount of memory.

So the geometry is fine.&nbsp; There may be some issues with GEOS.

On 8/18/2011 3:44 PM, Christopher DeMars wrote:

Since the ticket upload function is limited to 256Kb, I thought I
would try to send an example file via this list.

Attached is water1.wkb, a multipolygon that fubars GEOS buffer or
valid functions. I can supply water2 and/or either file as wkt.

Thank you for any help you can offer,
--Christopher


---------- Forwarded message ----------
From: GEOS <a class="moz-txt-link-rfc2396E" href="mailto:geos-trac@osgeo.org">&lt;geos-trac@osgeo.org&gt;</a>
Date: Thu, Aug 18, 2011 at 3:08 PM
Subject: [GEOS] #468: Geometry breaks valid() and buffer(): "Assertion
failed: (0), function query, file AbstractSTRtree.cpp, line 286"
To:


#468: Geometry breaks valid() and buffer(): "Assertion failed: (0), function
query, file AbstractSTRtree.cpp, line 286"
------------------------+---------------------------------------------------
&nbsp;Reporter: &nbsp;chdemars &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; Owner: &nbsp;strk
&nbsp; &nbsp; Type: &nbsp;defect &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp;Status: &nbsp;new
&nbsp;Priority: &nbsp;major &nbsp; &nbsp; &nbsp; | &nbsp; Milestone: &nbsp;3.3.1
Component: &nbsp;Core &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; Version: &nbsp;3.3.0
&nbsp;Severity: &nbsp;Unassigned &nbsp;| &nbsp; &nbsp;Keywords:
------------------------+---------------------------------------------------
&nbsp;GEOS is pretty far down in the software stack I'm using, but it looks like
&nbsp;my program stopping error lies there.

&nbsp;Software being used:
&nbsp;geos-config --version 3.3.0
&nbsp;I'm using GeoDjango and PostGIS on top of GEOS with development taking
&nbsp;place on Mac OSX

&nbsp;Geometry source:
&nbsp;original source is:
&nbsp;<a class="moz-txt-link-freetext" href="http://www.water.ca.gov/landwateruse/docs/landusedata/shapes/04bu.zip">http://www.water.ca.gov/landwateruse/docs/landusedata/shapes/04bu.zip</a>

&nbsp;After loading that (and the other DWR land use files) into my
&nbsp;PostGIS/GeoDjango database I extracted all the water features using:
&nbsp;water = DWRlanduse.objects.filter(class1__contains='NW',
&nbsp;survey_area__contains='BUTTE COUNTY').collect()

&nbsp;I have attached the wkb and wkt output of the above with water1 using
&nbsp;.unionagg() and water2 using .collect() to produce a MultiPolygon and
&nbsp;GeometryCollection respectively. Both produce failure.

&nbsp;If I try to use .buffer() or .valid() functions on either water1 or water2
&nbsp;I get the same failure:
&nbsp;Assertion failed: (0), function query, file AbstractSTRtree.cpp, line 286
&nbsp;which says one of the 'childBoundables' is of an unsupported type.
&nbsp;Functions like area or centroid work fine.

&nbsp;I would like to know if the error is a problem with GEOS and/or a problem
&nbsp;with the geometry. Regardless of the source of error, I would also like to
&nbsp;know how to go about fixing it.

&nbsp;Thank you for your time and efforts,
&nbsp;--Christopher

--
Ticket URL: <a class="moz-txt-link-rfc2396E" href="http://trac.osgeo.org/geos/ticket/468">&lt;http://trac.osgeo.org/geos/ticket/468&gt;</a>
GEOS <a class="moz-txt-link-rfc2396E" href="http://geos.refractions.net/">&lt;http://geos.refractions.net/&gt;</a>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java
Topology Suite (JTS).


_______________________________________________
geos-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</a>

-----
No virus found in this message.
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 10.0.1392 / Virus Database: 1520/3842 - Release Date: 08/18/11


_______________________________________________
geos-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</a>

No virus found in this message.
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 10.0.1392 / Virus Database: 1520/3842 - Release Date: 08/18/11

_______________________________________________
geos-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</a>

</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
geos-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</a></pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">-----
No virus found in this message.
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a>
Version: 10.0.1392 / Virus Database: 1520/3844 - Release Date: 08/19/11
</pre>
      </blockquote>
    </blockquote>
  </body>
</html>