# ices.rect: Convert ICES rectangles from or to geographical coordinates In mapplots: Data Visualisation on Maps

## Description

`ices.rect` converts the names of ICES statistical rectangles into geographical coordinates (midpoints). `ices.rect2` converts geographical coordinates into ICES statistical rectangles.

## Usage

 ```1 2``` ```ices.rect(rectangle) ices.rect2(lon, lat) ```

## Arguments

 `rectangle` a characer 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 neccesarily 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.

Hans Gerritsen

## References

ICES statistical rectangles www.ices.dk are rectangles of 1 degree longitude x 0.5 degrees latitude. They are used for reporting of fishinge effort and landings.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```# 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) ```

### Example output

```    lon   lat
1  -7.5 53.75
2  -7.5 53.75
3 -11.5 55.75
```

mapplots documentation built on May 2, 2019, 9:15 a.m.