ices_centroids {csquares} | R Documentation |
Functions to convert ICES rectangles
ices_centroids(ices_rect)
ices_rectangles(ices_rect)
ices_to_csquares(ices_rect)
ices_from_csquares(csquares)
ices_rect |
A |
csquares |
A |
In case of ices_centroids
a sf::st_sf()
object is returned, with
POINT
geometries representing the centroids of the ICES rectangles.
In case of ices_rectangles
a sf::st_sf()
object is returned, with
POLYGON
geometries representing the outline of the ICES rectangles.
In case of ices_to_csquares
a csquares
object inheriting from sf::st_sf()
is returned, the csquares code should represent the ICES rectangles.
In case of ices_from_csquares
a character
vector is returned with
ICES rectangle codes that correspond with the csquares. The method is
fast yet crude: it only checks in which ICES rectangles the centroids of the
csquares are located. It does not check if the resolution matches. NA
values
are returned when csquares are situated outside the area covered by ICES rectangles.
Pepijn de Vries
ices_rects <-
c("31F21", "31F22", "31F23", "31F24", "31F25", "31F26", "31F27", "31F28", "31F29",
"32F2", "33F2", "34F2", "35F2",
"31F3", "32F3", "33F3", "34F3", "35F3",
"31F4", "32F4", "33F4", "34F4", "35F4")
ices_centroids(ices_rects)
ices_rectangles(ices_rects)
ices_csq <- ices_to_csquares(ices_rects)
ices_from_csquares(ices_csq)