Description Usage Arguments Details Value See Also Examples
View source: R/lat_lon_to_osi.R View source: R/evenness_metrics.R
Measure evenness using Simpson's, Shannon, and Camargo evenness
Convert latitude/longitude to eastings and northings on the Irish OSI TM75 grid.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | lat_lon_to_osi(
x,
lat = "Latitude",
lon = "Longitude",
orig_crs = NULL,
precision = 1
)
lat_lon_to_osi(
x,
lat = "Latitude",
lon = "Longitude",
orig_crs = NULL,
precision = 1
)
|
x |
A data frame containing latitude and longitude coordinates. |
lat, lon |
Character string giving the names of the latitude and longitude columns. |
orig_crs |
A character string giving the proj4string specifying the coordinate reference system that the original lat/lon coordinates are in. |
precision |
Integer giving the desired precision (in meters) of results |
This function implements the Simpson's, Shannon, and Camargo evenness metrics.
This function calls spTransform
to convert
latitude/longitude coordinates from WGS84 or some other specified CRS to the
Irish OSI TM75 grid. The proj4string for the CRS of the original
coordinates must be specified in orig_crs
.
(e.g. "+init=epsg:4326" for WGS 84).
Use precision_meters
to find the hectad or 1km block in which the
original coordinates lie. For example, precision_meters = 1
gives
results precise to 1 meter, and precision_meters = 10000
gives
the eastings/northings of the hectad in which the original coordinates lie.
The main purpose of this function is to make this slightly more automatic for Willson's PhD work by providing the destination epsg:29903 code in the function. The function also re-names the output coordinate fields to 'eastings' and 'northings'.
a data frame with all rows and all columns of x, plus two additional columns for eastings and northings.
a data frame with all rows and all columns of x, plus two additional columns for eastings and northings.
spTransform
, CRS
,
rgdal
, proj4string
,
http://spatialreference.org/ref/epsg/tm75-irish-grid/
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.