GraphLimits: Determine Latitude and Longitude limits of a graph

Description Usage Arguments Details Value Author(s) Examples

View source: R/GraphLimits.R

Description

Finds the minimum and maximum of the longitude and latitude and then adds on 2.5% of the latitude and longitude to create boarders in the graph and accounts in a very simple way for projection distortion so long as maps are not to large.

Usage

1
GraphLimits(infile)

Arguments

infile

A file with columns of latitude and longitude labeled as Latitude and Longitude

Details

Internal function used in the Mapper function. It attempts to account for the change in distance covered between longitude as latitude changes by using the cos(latitude) of the center of the latitude of the graph, and adjusting the longitude to cover the same distance. Hence, the boarders on the graph are set first by making the distances in latitude and longitude approximately equal in meters, then 2.5% is added on each end.

Value

Returns a list of 4 scalars defining the boarders of the data

Author(s)

Brian Battaile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#Standardize tag output
betas<-Standardize(1,1,-1,1,1,1,-57.8,68.76,-61.8,64.2,-70.16,58.08,-10.1,9.55,-9.75,9.72,
-9.91,9.43)
#get declination and inclination data for study area
decinc<-c(10.228,65.918)
#data set with 11 associated GPS fixes in the "gpsdata" data set
data(rawdata)
DRoutput<-DeadReckoning(rawdata ,betas, decinc, Hz = 16, RmL = 2, DepthHz = 1, SpdCalc=3,
MaxSpd=3.5)
#prepare GPS data
data(gpsdata02)
gpsformat<-GPStable(gpsdata02)
Georeferenced<-GeoReference(DRoutput,gpsformat[1:2,])
Limits<-GraphLimits(Georeferenced)
Limits

Example output

Loading required package: fields
Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.5-1 (2019-12-12) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction 
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.

Attaching package:spamThe following objects are masked frompackage:base:

    backsolve, forwardsolve

See https://github.com/NCAR/Fields for
 an extensive vignette, other supplements and source code 
Loading required package: RColorBrewer
$miny
[1] 53.93078

$maxy
[1] 53.94499

$minx
[1] -168.0367

$maxx
[1] -168.014

TrackReconstruction documentation built on July 16, 2019, 1:02 a.m.