cood.conv {RoMEBS}R Documentation

Coordinates conversion tool

Description

The function performs conversion between the coordinates' formats: decimal degrees and MEDITS formats

Usage

cood.conv(x,y,q=NA,type=1)

Arguments

x

vector of longitude coordinates in either decimal degrees format or in MEDITS' projects format

y

vector of latitude coordinates in either decimal degrees format or in MEDITS' projects format

q

vector of quadrant information. Default value is NA. It is used, and ence it is mandatory, in case of MEDITS' format coordinates.

type

type code defining the type of coordinates' conversion to be applied. Allowed values are 1 and 2: 1 should be used to convert digital degrees to MEDITS format. 2 should be used to convert MEDITS coordinates in decimal degrees

Details

The cood.conv function performs conversion between the coordinates' formats: decimal degrees and MEDITS formats. Use type=1 to perform decimal degrees to MEDITS format conversion, otherwise use type=2. The q field has NA default value, even if it should be used in case of type=2 conversion. x, y and q should have the same length.

Value

The function cood.conv returns a data.frame that is made of 3 columns (x,y,q) in case of type=1 conversion, and 2 columns in case of type=2 conversions.

Author(s)

Walter Zupa <zupa@coispa.it>

Examples

    ta <- RoMEBS::TA
coord1 <- cood.conv(x=ta$SHOOTING_LONGITUDE, y=ta$SHOOTING_LATITUDE, q=ta$SHOOTING_QUADRANT,type=2)
coord2 <- cood.conv(coord1$x,coord1$y,NA,1)

[Package RoMEBS version 0.2.02 Index]