Description Usage Arguments Details Value Author(s) See Also Examples
convert a series of lat and longs to a cartesian coordinate frame centered on an origin
1 | lat2cart(lat, long, latOrg, longOrg)
|
lat |
Latitude(s) to be converted to meters |
long |
Longitude(s) to be converted to meters |
latOrg |
Latitude of origin |
longOrg |
Longitude of origin |
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.
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
Connor F. White
distGeo
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.