ices.rect {mapplots} | R Documentation |
Convert ICES rectangles from or to geographical coordinates
Description
ices.rect
converts the names of ICES statistical rectangles into geographical coordinates (midpoints).
ices.rect2
converts geographical coordinates into ICES statistical rectangles.
ices.rect.lutx
helper function to create a lookup table for rectangle codes along the x-axis
ices.rect.luty
helper function to create a lookup table for rectangle codes along the y-axis
Usage
ices.rect(rectangle)
ices.rect2(lon, lat)
ices.rect.lutx()
ices.rect.luty()
Arguments
rectangle |
a character vector with the names of ices rectangles. Note that the code can cope with rectangle names that have been converted into numbers by helpful microsoft office software, e.g. "36E2" tends to be converted to 3600. |
lon , lat |
a vector with longitude and latitude (not neccessarily the mid-points of rectangles). |
Value
ices.rect
will return a data frame with the midpoints of the ICES rectangles.
ices.rect2
will return a vector with the names of the ICES rectangles.
Author(s)
Hans Gerritsen
References
ICES statistical rectangles https://www.ices.dk are rectangles of 1 degree longitude x 0.5 degrees latitude. They are used for reporting of fishing effort and landings.
Examples
# rectangle names to coordinates:
ices.rect(c("36E2","3600","40D8"))
# coordinates to rectangle names:
lon <- rnorm(10,-10,2)
lat <- rnorm(10,53,1)
rect <- ices.rect2(lon,lat)
basemap(xlim=range(lon), ylim=range(lat) )
draw.rect()
points(lon,lat)
text(lon,lat,rect,cex=0.7,pos=3)