Kevin/group,<br><br>I thanks for pointing that out and I apologise for confusing the message. I am trying to &#39;clip&#39; the evc geometries with the relevant bnd_buf geometry. ( I was trying overlaps and pasted the wrong query into my message.)
<br><br>I have updated the images to reflect the &#39;intersects&#39; results. You will notice in the image <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1_over.png" target="_blank">
http://www.bendigo-orienteers.com.au/study/evc1_over.png</a> (where bnd_buf = 1) that there are two internal evc polygons that are not included in the output. In  <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1_under.png" target="_blank">
http://www.bendigo-orienteers.com.au/study/evc1_under.png</a> you notice that there are additional polygons where there shouldn&#39;t be.<br><br>When the query is completed using bnd_buf=1000 similar things occur ie polygons created where ther shouldn&#39;t be  
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1000_over.png" target="_blank">http://www.bendigo-orienteers.com.au/study/evc1000_over.png</a> and evc polygons missing in the output table 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1000_under.png" target="_blank">http://www.bendigo-orienteers.com.au/study/evc1000_under.png</a>.<br><br>So the original questions remain:
<br>Are the issues associated with having multiple polygon geometries in the one table (unlikely in my opinion)?<br>
Is it something to do with the query?<br>
Are these issues associated with PostGIS or GEOS?<br>
Is there a work around to solve the issue?<br><br>Thanks in advance,<br><br>Craig<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1_under.png" target="_blank">
</a><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Hi Craig,<br><br>What is it you are trying to do exactly?<br><br>Reading your query, I see that you are interested in the intersection of
<br>all geometries in &quot;evc&quot; and &quot;bnd_buf&quot; where the geometries overlap (by<br>definition, this means that the interior of one polygon is both inside<br>and outside that of another polygon) and where &quot;buf_dist&quot; = 1. &nbsp;So,
<br>you&#39;re not interested in cases where a polygon in &quot;env&quot; is contained<br>wholly inside &quot;bnd_buf&quot;. &nbsp;Right?<br><br>Did you mean to filter with &quot;overlaps&quot;? Or did you mean &quot;intersects&quot;?
<br><br>-------------<br>Kevin Neufeld<br>Software Developer<br>Refractions Research Inc.<br>300-1207 Douglas St.<br>Victoria, B.C., V8W 2E7<br><br>Phone: (250) 383-3022<br>Email: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:kneufeld@refractions.net">
kneufeld@refractions.net</a></blockquote><div>&nbsp;</div><br><div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Craig Feuerherdt wrote:<br>&gt; I have been attempting to intersect on set of geometries (
bio.evc)<br>&gt; with another geometry (bio.bnd_buf). All the geometries are valid<br>&gt; according to isvalid and the query below successfully returns a table.<br>&gt;<br>&gt; create table bio.bnd_evc as<br>&gt; select 
a.buf_dist, b.bio_no, b.bio_code, b.evc, b.constcde,<br>&gt; b.consstat, b.density, intersection(a.the_geom, b.the_geom) as the_geom<br>&gt; from bio.bnd_buf as a, bio.evc as b<br>&gt; where a.the_geom &amp;&amp; b.the_geom
<br>&gt; and a.buf_dist = 1<br>&gt; and overlaps(a.the_geom, b.the_geom)<br>&gt;<br>&gt; When I view the resulting table (bnd_evc) in QGIS there are several<br>&gt; missing polygons ( image 1a<br>&gt; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1_over.png" target="_blank">
http://www.bendigo-orienteers.com.au/study/evc1_over.png</a>&gt;). One of<br>&gt; the polygons lies entirely within bnd_bnf while the other has a small<br>&gt; portion which overlaps the boundary.<br>&gt;<br>&gt; When I try intersecting the same geometries but this time selecting
<br>&gt; buf_dist = 1000 (the 1000m buffer), additional evc polygons (which are<br>&gt; wholly within buf_dist=1 and therefore also within buf_dist=1000) are<br>&gt; missing from the output table and the whole thing is a &#39;mess&#39; nad is
<br>&gt; in no way a representation of what the intersection shoul dlook like (<br>&gt; image 2a &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1000_over.png" target="_blank">
http://www.bendigo-orienteers.com.au/study/evc1000_over.png</a>&gt;).<br>&gt;<br>&gt; The other thing that occurs in both cases is that some polygon<br>&gt; geometries are created where there are no evc polygons ( image 1b
<br>&gt; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1_under.png" target="_blank">http://www.bendigo-orienteers.com.au/study/evc1_under.png</a>&gt; &amp; 2b
<br>&gt; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.bendigo-orienteers.com.au/study/evc1000_under.png" target="_blank">http://www.bendigo-orienteers.com.au/study/evc1000_under.png</a>&gt;).
<br>&gt;<br>&gt; Both tables have a GIST index on the geometry column (the_geom).<br>&gt;<br>&gt; Are the issues associated with having multiple polygon geometries in<br>&gt; the one table (unlikely in my opinion)?<br>&gt; Is it something to do with the query?
<br>&gt; Are these issues associated with PostGIS or GEOS?<br>&gt; Is there a work around to solve the issue?<br>&gt;<br>&gt; Thanks in advance,<br>&gt;<br>&gt; Craig&nbsp;</blockquote></div><br>