R/unprojet.R

Defines functions unprojet

unprojet <- function(data, proj4 = NULL, area = NULL){
  require(sp)
  options(warn = - 1)
  xy <- data[c("lon2","lat2")]
  data[c("LONGITUDE","LATITUDE")] <- coordinates(spTransform(SpatialPointsDataFrame(xy,data,
                                                                                    proj4string = CRS(area)),
                                                             CRS(proj4)))
  return(data)
}
PabloMBooster/vmsR documentation built on June 29, 2023, 11:16 a.m.