coordError | R Documentation |
Calculates the potential error in coordinates due to lack of coordinate precision.
coordError(coords, nthreads = 1)
coords |
longitude and latitude in decimal degrees, either as a long/lat vector, or as a 2-column table. Can be either as numeric or character format |
nthreads |
number of threads to use for parallelization of the function.
The R package |
This function assumes that the true precision of the coordinates is equivalent to the
greatest number of decimals in either the longitude or latitude that are not trailing
zeroes. In other words:
(-130.45670, 45.53000)
is interpreted as (-130.4567, 45.5300)
(-130.20000, 45.50000)
is interpreted as (-130.2, 45.5)
If we use (-130.45670, 45.53000)
as an example, these coordinates are interpreted
as (-130.4567, 45.5300)
and the greatest possible error is inferred as two
endpoints:
(-130.45670, 45.53000)
and (-130.45679, 45.53009)
The distance between these two is then calculated and returned.
Returns a vector of coordinate error in meters.
Pascal Title
data(crotalus)
xy <- crotalus[1:100, c('decimallongitude','decimallatitude')]
coordError(xy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.