Skip to contents

latlong_as_xy converts co-ordinates expressed as decimal degrees into x,y

Usage

latlong_as_xy(trial, latvar = "lat", longvar = "long")

Arguments

trial

A trial dataframe or list of class "CRTsp" containing latitudes and longitudes in decimal degrees

latvar

name of column containing latitudes in decimal degrees

longvar

name of column containing longitudes in decimal degrees

Value

A list of class "CRTsp" containing the following components:

geom_fulllist:summary statistics describing the site
trialdata frame:rows correspond to geolocated points, as follows:
xnumeric vector: x-coordinates of locations
ynumeric vector: y-coordinates of locations
...other objects included in the input "CRTsp" object or data frame

Details

The output object contains the input locations replaced with Cartesian coordinates in units of km, centred on (0,0), corresponding to using the equirectangular projection (valid for small areas). Other data are unchanged.

Examples

examplexy <- latlong_as_xy(readdata("example_latlong.csv"))