<span class="HcCDpe">I&#39;m trying to find a way to generate &quot;dissolved&quot; geometries without exporting shapefiles from PostGIS and performing the operating in ArcGIS.&nbsp; I found some instructions online at <a href="http://www.paolocorti.net/public/wordpress/index.php/2007/03/30/union-of-two-geometries-in-postgis/">http://www.paolocorti.net/public/wordpress/index.php/2007/03/30/union-of-two-geometries-in-postgis/</a>.&nbsp; These work fine on their example, but the opeartion when applied to my data set never completes.&nbsp; I realize my data set is pretty large (), but the same dissolve operation when done via ArcGIS on a shapefile exported by pgsql2shp takes around 5 minutes to complete.&nbsp; This leads me to believe I&#39;m doing something completely wrong, and I would love to get some feedback from those of you with experience doing this.&nbsp; Below are the steps I&#39;ve done.<br>
<br>Step 1 - create a &quot;crop_3&quot; table that contains only crop3 values, and<br>a class.&nbsp; This completes within 30 secs:<br><br>begin;<br>create table &quot;test_suit_h_crop3_class&quot; (<br>&quot;alloc_id&quot; char(8) PRIMARY KEY,<br>
&quot;crop3&quot; numeric,<br>&quot;class&quot; char(8)<br>);<br>select AddGeometryColumn(&#39;&#39;,&#39;test_suit_h_crop3_class&#39;,&#39;the_geom&#39;,&#39;-1&#39;,&#39;MULTIPOLYGON&#39;,2);<br>insert into &quot;test_suit_h_crop3_class&quot; (&quot;alloc_id&quot;, &quot;crop3&quot;, &quot;class&quot;,<br>
&quot;the_geom&quot;)<br>select vw_suit_area_h.alloc_id, vw_suit_area_h.crop3,<br>case<br>when crop3 &lt; 1 then &#39;class_0&#39;<br>when crop3 &gt;= 1 and crop3 &lt; 860 then &#39;class_1&#39;<br>when crop3 &gt;= 860 and crop3 &lt; 1720 then &#39;class_2&#39;<br>
when crop3 &gt;= 1720 and crop3 &lt; 3440 then &#39;class_3&#39;<br>when crop3 &gt;= 3440 and crop3 &lt; 5160 then &#39;class_4&#39;<br>when crop3 &gt;= 5160 and crop3 &lt; 6880 then &#39;class_5&#39;<br>when crop3 &gt;= 6880 and crop3 &lt; 7740 then &#39;class_6&#39;<br>
when crop3 &gt;= 7740 then &#39;class_7&#39;<br>ELSE &#39;other&#39;<br>end AS class,<br>vw_suit_area_h.the_geom<br>FROM vw_suit_area_h;<br>end;<br><br>Step 2 - create a temp &quot;dissolve&quot; table to store the results of a<br>
geometric union run of the above table, grouped by &quot;class&quot;.&nbsp; I run out of patience before this ever completes (I&#39;ve let it run for hours.)<br><br>begin;<br>CREATE TABLE &quot;test_suit_area_h_crop3_diss&quot; (<br>
gid serial PRIMARY KEY,<br>&quot;class&quot; char(8)<br>);<br>select AddGeometryColumn(&#39;&#39;,&#39;test_suit_area_h_crop3_diss&#39;,&#39;the_geom&#39;,&#39;-1&#39;,&#39;MULTIPOLYGON&#39;,2);<br>INSERT INTO &quot;test_suit_area_h_crop3_diss&quot; (the_geom,class)<br>
SELECT astext(multi(geomunion(the_geom))) AS the_geom, class FROM<br>&quot;test_suit_h_crop3_class&quot; GROUP BY class;<br>end;<br><br>Thanks,<br><br>Roger<br></span>