R/utility.R

Defines functions getEPSG

getEPSG <- function(xy) {
  if (inherits(xy, "SpatialPoints")) {
    sp::proj4string(xy) 
  } else if (is(xy, "RhrMappedData")) {
    sp::proj4string(xy$dat) 
  } else if (is(xy, "RhrTrack")) {
    sp::proj4string(rhrPoints(xy))
  } else {
    sp::CRS(NA_character_)
  }
}
jmsigner/rhr documentation built on June 26, 2020, 8:59 a.m.