lat2cart: generate cartesian coordinates

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

Description

convert a series of lat and longs to a cartesian coordinate frame centered on an origin

Usage

1
lat2cart(lat, long, latOrg, longOrg)

Arguments

lat

Latitude(s) to be converted to meters

long

Longitude(s) to be converted to meters

latOrg

Latitude of origin

longOrg

Longitude of origin

Details

returns the x and y location of the set of points in refernce to the origin. Distances are calculated assuming the earth is a sphere.

Value

the output is in x and y coordinates from the origin. If a vector or lats and longs are supplied than a list of x and y coordinates are returned

Author(s)

Connor F. White

See Also

distGeo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#converting one location
lats<-runif(1,-90,90)
longs<-runif(1,-180,180)
latitude_origin<-0
longitude_origin<-0
lat2cart(lats,longs,latitude_origin,longitude_origin)

#Converting many locaitons at once
lats<-runif(10,-90,90)
longs<-runif(10,-180,180)
latitude_origin<-0
longitude_origin<-0
lat2cart(lats,longs,latitude_origin,longitude_origin)

ConnorFWhite/AssFunc documentation built on May 20, 2019, 4:07 p.m.