https://github.com/cran/SoDA
Revision e3fb24ebd97f7686caee78bcef4e558b908a465e authored by jmc on 01 December 2007, 00:00:00 UTC, committed by Gabor Csardi on 01 December 2007, 00:00:00 UTC
1 parent 1c016a1
Tip revision: e3fb24ebd97f7686caee78bcef4e558b908a465e authored by jmc on 01 December 2007, 00:00:00 UTC
version 0.97-1
version 0.97-1
Tip revision: e3fb24e
geoXY.R
"geoXY" <-
function(latitude, longitude,
lat0 = min(latitude, na.rm=TRUE),
lon0 = min(longitude, na.rm=TRUE),
unit = 1.) {
lat0 <- rep(lat0, length(latitude))
lon0 <- rep(lon0, length(longitude))
yDist <- geoDist(lat0, lon0, latitude, lon0)
xDist <- geoDist(lat0, lon0, lat0, longitude)
cbind(X= xDist * sign(longitude - lon0)/unit,
Y = yDist * sign(latitude - lat0)/unit)
}
Computing file changes ...