No problem.<br><br>With respect to st_difference(), one of the recommended alternatives is to st_union() all your polygons, then re-attribute them, then delete the ones you don't want. It's my impression that st_union() is pretty fast these days so this might be a good approach for you. I have also seen it suggested that one st_union() all the polygon linework, then re-polygonalize. This gets to a fair bit of SQL especially if the polygons have interior rings.<br>
<br>With respect to your performance issue, your spatial indexes only really help in the case of relatively compact polygons. If your land use polygons include thousand-kilometer-long rights of way or double-line rivers, those will drastically reduce the performance of your indexing because each of them will && with many hundreds or thousands of other polygons and therefore the actual intersection between them must be computed. Offhand I don't know what ArcGIS does to be faster at this. Maybe someone else on this list has some ideas.<br>
<br>If you can tile your big ugly polygons for sure you will dramatically improve your performance.<br><br><div class="gmail_quote">2011/8/25 Sheara Cohen <span dir="ltr"><<a href="mailto:Sheara@calthorpe.com">Sheara@calthorpe.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">Hey Chris – Thanks for your response.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">With regard to ST_Difference, what I was trying to accomplish is a “deletion” or “clipping out” of rivers and lakes from a parcel file. Both are vector files. Based on your description, it sounds like I’m using the wrong query. Do you know which one I should be using?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">And with regard to both the ST_Intersection and ST_Difference… yes, I am using vector files with HUGE, complex polygons that spread over very large areas (hundreds of miles). I can dice these in ArcGIS or something like that before throwing the files over the fence into Postgres. But I’m still confused by the fact that similar operations run so quickly on the exact same files in ArcGIS. I feel like there is something I’m totally missing about how to set up these queries correctly in PostGIS.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">If you or anyone have any last thoughts, I’d be really interested.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks again,<u></u><u></u></p>
<div class="im"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">~ Sheara<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><b><span style="font-size:10.0pt;color:gray;letter-spacing:1.0pt">Sheara Cohen</span></b><span style="font-size:9.0pt"><br>
</span><span style="font-size:7.5pt;font-variant:small-caps;color:gray;letter-spacing:1.4pt">Planner</span><span style="letter-spacing:1.0pt"><u></u><u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;color:#E9935F">C A L T H O R P E</span></b><b><span style="font-size:10.0pt;color:gray"> A S S O C I A T E S</span></b><span style="font-size:10.0pt;color:gray"><br>
</span><span style="font-size:7.5pt;color:gray">2095 ROSE STREET, SUITE 201, BERKELEY, CALIFORNIA, 94709 USA</span><span style="font-size:8.0pt"><br></span><span style="font-size:7.5pt;color:gray"><a href="tel:510%20809-1165" value="+15108091165" target="_blank">510 809-1165</a> (direct) | <a href="tel:510-548-6800%20x35" value="+15105486800" target="_blank">510-548-6800 x35</a> (main) | <a href="tel:510%20548-6848" value="+15105486848" target="_blank">510 548-6848</a> (fax)<br>
<a href="mailto:sheara@calthorpe.com" target="_blank"><span style="color:blue">sheara@calthorpe.com</span></a> | <a href="http://www.calthorpe.com" target="_blank"><span style="color:blue">www.calthorpe.com</span></a><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p></div></div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br><font face="SANS" size="3"><span style="border-collapse:collapse;color:rgb(32, 32, 32);font-family:'Droid Sans', arial, sans-serif;font-size:13px"><font style="font-family:arial,helvetica,sans-serif" face="SANS" size="3">Chris Hermansen</font><br style="font-family:arial,helvetica,sans-serif">
<i style="font-family:arial,helvetica,sans-serif"><font size="2">Vice President</font></i><br style="font-family:arial,helvetica,sans-serif"><img style="font-family:arial,helvetica,sans-serif" src="cid:part1.07020105.06030603@tecogroup.ca" align="bottom" border="0"><br style="font-family:arial,helvetica,sans-serif">
<font style="font-family:arial,helvetica,sans-serif" face="SANS" size="2">TECO Natural Resource Group Limited</font><br style="font-family:arial,helvetica,sans-serif"><font style="font-family:arial,helvetica,sans-serif" face="SANS" size="2">301 · 958 West 8th Avenue</font><br style="font-family:arial,helvetica,sans-serif">
<font style="font-family:arial,helvetica,sans-serif" face="SANS" size="2">Vancouver BC CANADA · V5Z 1E5</font><br style="font-family:arial,helvetica,sans-serif"><font face="SANS" size="2"><span style="font-family:arial,helvetica,sans-serif">Tel +1.604.714.2878 · Cel +1.778.840.46</span>25</font></span></font><br>