Learn R Programming

hzar (version 0.2-5)

hzar.map.latLongSites: Generate a table of site locations.

Description

Methods for processing tables of site location: Generate a table of latitude and longitude of site locations from either precalculated values or GPS coordinates. Generate a table of distances from an included site, using a table of latitude and longitude of site locations.

Usage

hzar.map.latLongSites(siteIDs, site.lat, site.long, degrees = TRUE) hzar.map.latLongSites.dms(siteIDs, coordinates) hzar.map.distanceFromSite(latLongSites, site0, units = "Km")

Arguments

siteIDs
A character vector used to identify each site.
site.lat
A numeric vector of site longitudes.
site.long
A numeric vector of site longitudes.
degrees
Are site.lat and site.long in degrees? If FALSE, site.lat and site.long should be in radians.
coordinates
A character vector the same length as siteIDs. Each value must contain the latitude and longitude in DMS format, such as: 9-22 N 82-34-50 W
latLongSites
The result of either the hzar.map.latLongSites or hzar.map.latLongSites.dms method.
site0
The ID string for the site place at 0.
units
The units of distances returned. Only the case sensitive values "Km" for kilometers, "miles" for miles, and "nautical" for nautical miles are valid.

Value

A data.frame: For all methods:
site
A character vector used to identify each site.
For hzar.map.latLongSites and hzar.map.latLongSites.dms:
lat.rad
The site latitude in radians.
long.rad
The site longitude in radians.
lat.deg
The site latitude in degrees.
long.deg
The site longitude in degrees.
For hzar.map.distanceFromSite:
distance
The distance to each site from a common origin.

See Also

hzar.map.greatCircleDistance

Examples

Run this code

a=hzar.map.latLongSites(c("Norway"),60.4,11)
b=hzar.map.latLongSites.dms(c("Norway","Sweden"),c("60-24 N 11 E","58 N 15 E"))
hzar.map.distanceFromSite(b,"Norway")

Run the code above in your browser using DataLab