50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

MODISTools (version 0.95.1)

EndCoordinates: Calculate end location of a transect

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

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".

Value

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

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.

See Also

MODISTransects ConvertToDD

Examples

Run this code
data(EndCoordinatesExample)

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

Run the code above in your browser using DataLab