PostGIS easy buffers

To create the video Evolution of protected areas in Brazil we created buffers around all protected areas with 20 different buffer sizes. For each of the 3 protected areas types (indigenous terretories, multiple use reserves, stricly protected areas) we used a different layer containing the polygons for each protected area. A display of the 20 buffers in each year within one second creates the impression of a continuous shrinking. The PostGIS code to create a single buffer for one layers is as follows:

create table uso_sustentavel_95 as
 st_buffer(geom,0.95) as geom
from uso_sustentavel_95

We saved the multiple use reserve shapefile on a PostgresSQL server with a PostGIS plugin, named uso_sustentavel. Every territory has an identifier called gid. The creation_dateĀ in our dataset was constructed from each decree that inaugurated the reserve. With each decree the publication day is provided. The geom column refers to the information about the geographic properties of each polygon. The st_buffer() creates automatically areas with a buffer of 0.95 degrees around all polygons. To create the 20 buffer zones automatically I used a loop created in STATA12.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s