[postgis-users] Create polygon from buffered points

Little, John JLittle at NRCan.gc.ca
Wed Nov 14 15:11:52 PST 2007


Hi there,

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).

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: 

1) Buffer all points in table hpt_test (out 2000m) to produce polygons
(circles) -- to be inserted into table hpt_buf_test, 

2) Dissolve where these circles overlap to create single buffer
polygons.

3) Perform an inside buffer (in -1300m) on the result polygon produced
in step 2 -- this will help correct polygon shape.

4) Reproject (transform) to equal area projection (Albers-Canada) to
calculate area

The desired result will be a table containing rough fire perimeter
estimates (fairly accurate on large size wildfires).

Here is what I've done to prepare the buffer polygon table :


CREATE TABLE cwfis_datamart.hpt_buf_test ( ID int4, NAME varchar(20) );

SELECT
AddGeometryColumn('cwfis_datamart','hpt_buf_test','the_geom',42304,'MULT
IPOLYGON',2);


Now that I've got the table set up, I attempt to add buffer polygons to
the table (step 1 above):


INSERT INTO cwfis_datamart.hpt_buf_test (ID, NAME, the_geom)
VALUES (1,'First Geometry',(SELECT buffer(the_geom,2000)
FROM cwfis_datamart.hpt_test));

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.

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 :)

Thanks!

John Little
http://cwfis.cfs.nrcan.gc.ca/



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071114/6e2cef2d/attachment.html>


More information about the postgis-users mailing list