[R-sig-Geo] extracting oceanographic data

LOUZAO louzao at cebc.cnrs.fr
Tue Jun 24 13:34:02 CEST 2008


Dear list,

I'm trying to extract different oceanographic data (chlorophyll, sea 
surface temperature, etc.) for doing habitat modelling. The input data 
are locations (lat, lon) of tracking data of marine top predators and I 
would like to extract oceanographic data from a given area around each 
specific location, from which compute  the median, maximum and minimum 
values of the corresponding data (sst, chl, etc.). For doing this,

1. I need to import the oceanographic data into R. Which format (ascii, 
hdf, netcdf,etc.) would you recommend? I have been working with ascii, 
importing files with import.asc().
2. For defining the area around each location, I could define a circle 
(radius of 1° in decimal degree) or a square (a total heigth of 1° in 
decimal degree) centered in each location.
In the grid package, the circleGrob() or the viewport() fucntions 
provide this approach. However, I have applied the circleGrob but I do 
not reach to obtain a circle around each location (when I plot it I only 
obtain the same configuration than when plotting the locations). I think 
that I'm missing something related with the units. In this case, x and y 
are longitud and latitud in decimal degress.

circle<-circleGrob(x=locs$Long, y=locs$Lat, r=2, default.units="native", 
name=NULL,
            gp=gpar(), vp=NULL)

I have found other two functions that I do not know if someone has used 
for doing the same.

- symbolsInPolys() in maptools

- spsample() in sp

3. The last step would be to overlay the oceanographic layer and the 
object of circles (or squares) to extract the median, maximum and 
minimum values of the corresponding data (sst, chl, etc.)

Has anybody worked on this problem? Could you please point to any useful 
documents? 

Thanks in advance,

Maite Louzao

-- 
**************************
Maite Louzao Arsuaga
Postdoctoral Researcher

Centre d'Etudes Biologiques de Chizé - CNRS UPR1934 
79360 Villiers-en-Bois, France 
Tel: +33 (0)5.49.09.35.57
Fax: +33 (0)5.49.09.65.26 
http://www.cebc.cnrs.fr/
**************************




 ________




More information about the R-sig-Geo mailing list