[postgis-users] How do you use PostGIS Raster?

Mathieu Basille basille at ase-research.org
Mon Aug 29 06:52:44 PDT 2011


Dear list,

I am resurrecting this thread to honour an old promise to Pierre. This 
might be of interest for those interested in using PostGIS for the study 
of wildlife movements.

First, a summary of our use of PostGIS: We are using PostGIS to analyze 
large datasets combining rasters and vectors. Basically, we are looking 
at movement and habitat selection in a predator-prey system, using 
GPS-collar data over large areas. The major use of PostGIS Raster is for 
the intersection of prey steps (line segments or buffers around these 
segments) with different raster: Landsat (landcover type), slope, road 
density, relative probability of occurrence of the predator, etc. Note 
that we first tried to use ArcGIS for this step, without success, due to 
many bugs and the need to correct them by hand (which was largely too 
time-consuming). We also used PostGIS Raster to intersect predator 
locations with the Landsat map to estimate Resource Selection Functions 
(RSF) in order to build maps of relative probability of occurrence. In 
the end, information of the intersections were used in R to characterize 
movements of the preys on the landscape.

Second, some numbers: we generally work on rasters (LandSat, road 
density, DEM) of approximately 150e6 pixels (25m×25m), i.e. 12600×11900, 
and occasionally on a much larger raster at the scale of Québec 
(LandSat) of approximately 1700e6 (20000×850000) pixels, same 
resolution. We are intersecting these maps with a total of 850 000 GPS 
relocations of four species, i.e. slightly less line segments between 
each relocation (so-called steps). We generally contrast each step with 
10 randomly generated steps, which means that we are working on hundreds 
thousand steps at a time (we generally process them by season/species).

Here are some processing times on a Intel Xeon station (4 cores @2.67 
GHz) running Debian Linux, with 12 GB of RAM:
- Intersection of 1 000 000 steps (mean=200m) takes 7.3 h on the most 
complex rasters (i.e. rasters which vary a lot along the steps, hence 
increasing computation times). Speed seems fairly constant, with 
approximately 130-140 thousand steps per hour.
- On simpler rasters (i.e. less variation along the steps), computation 
time can be up to 10 times higher (1.5e6 steps per hour).
- Intersection of 57 000 buffers (i.e. polygons around points, radius = 
300m) takes almost 1h to get the composition of the buffer.

Hope this is useful!

Best,
Mathieu Basille.


Le 09/06/2011 09:33, Pierre Racine a écrit :
> Thanks Mathieu,
>
> Could you provide us with some numbers? How many geometries do you intersect? What is the total area/length covered by those geometries? With what raster size? How long it takes? Which kind of machine are you using? I would really like to use your numbers in my presentation.
>
> Pierre
>
>> -----Original Message-----
>> From: Mathieu Basille [mailto:basille at ase-research.org]
>> Sent: Wednesday, June 08, 2011 10:09 PM
>> To: PostGIS Users Discussion
>> Cc: Pierre Racine; Marie-Claude Labbé
>> Subject: Re: [postgis-users] How do you use PostGIS Raster?
>>
>> Dear Pierre,
>>
>> Here, we are using PostGIS to analyze large datasets combining rasters and
>> vectors. Basically, we are looking at movement and habitat selection in a
>> predator-prey system, using GPS-collar data over large areas. The major use of
>> PostGIS Raster is for the intersection of prey steps (line segments or buffers
>> around these segments) with different raster:
>> Landsat (landcover type), slope, road density, relative probability of occurrence
>> of the predator, etc. Note that we first tried to use ArcGIS for this step, without
>> success, due to many bugs and the need to correct them by hand (which was
>> largely too time-consuming). We also used PostGIS Raster to intersect predator
>> locations with the Landsat map to estimate Resource Selection Functions (RSF)
>> in order to build maps of relative probability of occurrence. In the end,
>> information of the intersections were used in R to characterize movements of
>> the preys on the landscape.
>>
>> Best,
>> Mathieu Basille.
>>
>>
>> Le 03/06/2011 08:28, Pierre Racine a écrit :
>>> Hi all,
>>>
>>> I'm preparing a presentation and I need some use cases for PostGIS Raster. I
>> would be grateful if people already using the raster side of PostGIS would
>> describe what they already do it. Bborie, Jorge, Regina, others? These uses
>> cases are vital for the project.
>>>
>>> On my side we are using PostGIS raster to do raster/vector analysis over large
>> datasets. Basically determining mean values for temperature (raster), elevation
>> (raster) for fauna observations (point buffers). Converting everything to vector
>> and using desktop solutions proved impracticable for datasets covering the
>> extent of Canada.
>>>
>>> For those who did not try the raster extension yet, don't be shy to express your
>> planned experiments or your expectations.
>>>
>>> Thanks all for your contribution to the project,
>>>
>>> Pierre
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>> --
>>
>> ~$ whoami
>> Mathieu Basille, Post-Doc
>>
>> ~$ locate
>> Laboratoire d'Écologie Comportementale et de Conservation de la Faune
>> + Centre d'Étude de la Forêt
>> Département de Biologie
>> Université Laval, Québec
>>
>> ~$ info
>> http://ase-research.org/basille
>>
>> ~$ fortune
>> ``If you can't win by reason, go for volume.''
>> Calvin, by Bill Watterson.

-- 

~$ whoami
Mathieu Basille, Post-Doc

~$ locate
Laboratoire d'Écologie Comportementale et de Conservation de la Faune
+ Centre d'Étude de la Forêt
Département de Biologie
Université Laval, Québec

~$ info
http://ase-research.org/basille

~$ fortune
``If you can't win by reason, go for volume.''
Calvin, by Bill Watterson.



More information about the postgis-users mailing list