Kevin/group,<br><br>I thanks for pointing that out and I apologise for confusing the message. I am trying to 'clip' 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 'intersects' 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't be.<br><br>When the query is completed using bnd_buf=1000 similar things occur ie polygons created where ther shouldn'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 "evc" and "bnd_buf" 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 "buf_dist" = 1.  So,
<br>you're not interested in cases where a polygon in "env" is contained<br>wholly inside "bnd_buf".  Right?<br><br>Did you mean to filter with "overlaps"? Or did you mean "intersects"?
<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> </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>> I have been attempting to intersect on set of geometries (
bio.evc)<br>> with another geometry (bio.bnd_buf). All the geometries are valid<br>> according to isvalid and the query below successfully returns a table.<br>><br>> create table bio.bnd_evc as<br>> select 
a.buf_dist, b.bio_no, b.bio_code, b.evc, b.constcde,<br>> b.consstat, b.density, intersection(a.the_geom, b.the_geom) as the_geom<br>> from bio.bnd_buf as a, bio.evc as b<br>> where a.the_geom && b.the_geom
<br>> and a.buf_dist = 1<br>> and overlaps(a.the_geom, b.the_geom)<br>><br>> When I view the resulting table (bnd_evc) in QGIS there are several<br>> missing polygons ( image 1a<br>> <<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>>). One of<br>> the polygons lies entirely within bnd_bnf while the other has a small<br>> portion which overlaps the boundary.<br>><br>> When I try intersecting the same geometries but this time selecting
<br>> buf_dist = 1000 (the 1000m buffer), additional evc polygons (which are<br>> wholly within buf_dist=1 and therefore also within buf_dist=1000) are<br>> missing from the output table and the whole thing is a 'mess' nad is
<br>> in no way a representation of what the intersection shoul dlook like (<br>> image 2a <<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>>).<br>><br>> The other thing that occurs in both cases is that some polygon<br>> geometries are created where there are no evc polygons ( image 1b
<br>> <<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>> & 2b
<br>> <<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>> Both tables have a GIST index on the geometry column (the_geom).<br>><br>> Are the issues associated with having multiple polygon geometries in<br>> 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 </blockquote></div><br>