Learn R Programming

geo (version 1.4-3)

rect2deg: Given rectangle code return its center position.

Description

Functions that convert statistical rectangle codes under: 1) a traditional Icelandic system ('tilkynningaskyldurreitakerfid') (see d2r and d2sr) and 2) set up in systems based on minutes and degrees (see d2mr and d2dr) to decimal representation of rectangles center positions in degreees latitude and longitude.

Usage

r2d(r)
sr2d(sr)
mr2d(mr, dlat = 5, dlon = 10)
dr2d(dr, dlat = 1, dlon = 2, startLat = 50)

Arguments

r
Rectangle code r in the 'tillkynningaskyldu-system', e.g from deg2rect.
sr
Rectangle code sr for subrectangle in 'tilkynningaskyldu-system', e.g. from deg2rect.
mr
Rectangle code mr based on minutes, e.g. from deg2rect.
dlat
Rectangle height in minutes or degrees latitude for mr2d and dr2d respectively.
dlon
As dlat except now width in longitude.
dr
Rectangle code dr based on degrees, e.g. from deg2rect.
startLat
Starting latitude for coding the rectangles.

Value

dataframe of center positions (latitude lat and longitude lon) of rectangles in one of the coding systems

Details

  • r2d with a resolution of 30 min latitue and 1 deg longitude (the Icelandic numbering system, 'tilkynningaskyldureitir').

  • sr2d with a resolution of 15 min latitude by 30 min longitude in the Icelandic numbering system for statistical rectangles which starts counting at 60 deg N latitude, with sub-rectangles of 30 min lat by 1 deg lon coded 1, 2, 3 and 4 for the NW, NA, SW and SA quadrants respectively,

  • mr2d with resolution given in dlat by dlon minutes lat and lon,

  • dr2d for rectangles with resolution given in dlat by dlon degrees lat and lon, code system starting at latitude startLat.

See Also

deg2rect

Examples

Run this code
r2d(d2r(lat = 65 + 1/4, lon = -19 - 1/2))
  d2r(r2d(519))

Run the code above in your browser using DataLab