[postgis-users] Calculate area of raster/polygon intersections in PostGIS

Roberto Lazarte Kaqui roberto.kaqui at ipea.gov.br
Thu Apr 16 11:24:06 PDT 2015


I have a raster with one band that represents the deforested area in the Amazon. This raster has 13 categories representing the deforested area in each year from 2001 to 2013.
Beyond this raster data, i have a database with 800 polygons that represents 800 cities of the Amazon region.

My interest is calculate the total deforested area in each city of the region for each year. In other words, i need to calculate the intersection area between the raster and the polygons database for each category of the raster.
In this scenario, i have two main questions:

1 - What's the best way to do raster/polygon intersections? I read about two different approaches, one using ST_Intersection and the other one using ST_Clip. The second one apparently is faster and more efficient, but i don't know about its precision.

2 - Assuming that i used ST_Clip to do the intersections, the result it's gonna be another raster. How can i calculate the area of each category of this raster?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150416/aaca902c/attachment.html>


More information about the postgis-users mailing list