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
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 270.4.1/1515 - Release Date: 6/23/2008 7:16 PM