EndCoordinates: Calculate end location of a transect

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/EndCoordinates.R

Description

Function that uses a set of locations in decimal degrees to calculate new locations, at a specified distance and angle away, that can form the start and end coordinates for transects.

Usage

1
2
EndCoordinates(LoadDat, FileSep = NULL, Distance = 1000, Angle = 90, 
    AngleUnits = 'radians'|'degrees', Dir = ".", FileName = "Transect Coordinates")

Arguments

LoadDat

Input data; the name of an object or a character string that specifies a file path for an external file to be read in, containing a set of locations to be used for calculating new end coordinates.

FileSep

If a file path is entered to LoadDat, specify the file delimiter character.

Distance

Numeric; distance, in metres, that the end coordinates should be from the focal coordinates.

Angle

Numeric; angle, in either degrees or radians, that the end coordinates should be from the focal coordinates.

AngleUnits

Character String; the unit the angle is given in, either 'radians' or 'degrees'.

Dir

Character string; an optional argument to specify the subdirectory where the output file should be saved. Default Dir='.' writes file to the working directory.

FileName

Character string; an optional argument to specify the name given to the output file. Default is "Transect Coordinates".

Details

Input dataset, LoadDat, should contain separate columns for latitudes and longitudes, named 'start.lat' and 'start.long' respectively. Coordinates should be in decimal degrees.

Value

A new csv file containing the new end coordinate data appended to the original data.

Author(s)

Helen Phillips

See Also

MODISTransects ConvertToDD

Examples

1
2
3
4
data(EndCoordinatesExample)

EndCoordinates(LoadDat=EndCoordinatesExample, 
  Distance = 2000, Angle = 90, AngleUnits = 'degrees')

seantuck12/MODISTools documentation built on May 29, 2019, 4:55 p.m.