<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">John,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>From your description it seems that the hotspot points represent individual fires rather than locations around the periphery of hotspots. Just in case the latter is true it seems like a potential route would be to dissolve/union all points that relate to a single fire, then calculate the convex hull of these points, then calculate the area of that hull.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here's the SQL:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">SELECT</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> ST_Area(St_ConvexHull(ST_Union(</SPAN></FONT><FONT class="Apple-style-span" color="#777700" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">the_geom</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">))) </SPAN></FONT><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">FROM</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> hpt_test </SPAN></FONT><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">GROUP</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> </SPAN></FONT><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">BY</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> <FONT class="Apple-style-span" color="#0000CC">fire_group</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV>If my sense of the former is what you are after, your SQL would look more like:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">SELECT</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> ST_Area(ST_Transform(ST_Union(ST_buffer(</SPAN></FONT><FONT class="Apple-style-span" color="#777700" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">the_geom</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">, 20000)),102001)) </SPAN></FONT><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">FROM</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> hpt_test </SPAN></FONT><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">GROUP</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> </SPAN></FONT><FONT class="Apple-style-span" color="#0000CC" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">BY</SPAN></FONT><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> <FONT class="Apple-style-span" color="#0000CC">some_unique_hotspot_id</FONT></SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Where 102001 is the ESRI epsg code for Canadian Albers, although this projection is not in the spatial_ref_sys table of Postgis by default. You'll have to add it in. You can get the SQL insertion text from here: <A href="http://spatialreference.org/ref/epsg/102001/">http://spatialreference.org/ref/epsg/102001/</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>That will give you a table listing of the areas of all the buffered polygons that overlap.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Dane</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Nov 14, 2007, at 3:11 PM, Little, John wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P><FONT size="2" face="Arial">Hi there,</FONT> </P><P><FONT size="2" face="Arial">I am new to this list (and to postgis). I'd really appreciate some help with this problem (in my attempt to transfer this existing process from ESRI to PostGIS).</FONT></P><P><FONT size="2" face="Arial">I have a table containing points (hpt_test) representing wildfire hotspot locations, and I would like to create fire perimeter estimates (polygons) using these point locations -- here are the steps I intend to follow: </FONT></P><P><FONT size="2" face="Arial">1) Buffer all points in table hpt_test (out 2000m) to produce polygons (circles) -- to be inserted into table hpt_buf_test, </FONT></P><P><FONT size="2" face="Arial">2) Dissolve where these circles overlap to create single buffer polygons.</FONT> </P><P><FONT size="2" face="Arial">3) Perform an inside buffer (in -1300m) on the result polygon produced in step 2 -- this will help correct polygon shape.</FONT></P><P><FONT size="2" face="Arial">4) Reproject (transform) to equal area projection (Albers-Canada) to calculate area</FONT> </P><P><FONT size="2" face="Arial">The desired result will be a table containing rough fire perimeter estimates (fairly accurate on large size wildfires).</FONT> </P><P><FONT size="2" face="Arial">Here is what I've done to prepare the buffer polygon table :</FONT> </P> <BR><P><FONT size="2" face="Courier">CREATE TABLE cwfis_datamart.hpt_buf_test ( ID int4, NAME varchar(20) );</FONT> </P><P><FONT size="2" face="Courier">SELECT AddGeometryColumn('cwfis_datamart','hpt_buf_test','the_geom',42304,'MULTIPOLYGON',2);</FONT> </P> <BR><P><FONT size="2" face="Arial">Now that I've got the table set up, I attempt to add buffer polygons to the table (step 1 above):</FONT> </P> <BR><P><FONT size="2" face="Courier">INSERT INTO cwfis_datamart.hpt_buf_test (ID, NAME, the_geom)</FONT> <BR><FONT size="2" face="Courier">VALUES (1,'First Geometry',(SELECT buffer(the_geom,2000)</FONT> <BR><FONT size="2" face="Courier">FROM cwfis_datamart.hpt_test));</FONT> </P><P><FONT size="2" face="Arial">But this (of course) does not work... and I have scoured the archives for clues but without success:( Please help me get started on this.</FONT></P><P><FONT size="2" face="Arial">I am aware that buffer is "a very expensive" process, but I can't think of an alternative. My test point table is very small, but in reality this would be a fairly large table, so I will likely need to break this up by region… If anyone can help me out with the sql, point me to helpful resources, or suggest a better alternative, please advise :)</FONT></P><P><FONT size="2" face="Arial">Thanks!</FONT> </P><P><FONT size="2" face="Arial">John Little</FONT> <BR><A href="http://cwfis.cfs.nrcan.gc.ca/"><U><FONT color="#0000FF" size="2" face="Arial">http://cwfis.cfs.nrcan.gc.ca/</FONT></U></A> </P> <BR> <BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">postgis-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>