From 2a3d6f04f421f424276dfc531bf5ca9bdeeaa78b Mon Sep 17 00:00:00 2001 From: Steffen Oppel Date: Tue, 2 Jun 2020 11:36:37 +0100 Subject: [PATCH 1/2] updated CRS definition to avoid error in latest rgdal release trying to resolve Issue #29 by replacing CRS assignment with an EPSG code - I have not tested whether this will actually work! --- R/tripSplit.r | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/R/tripSplit.r b/R/tripSplit.r index 46343eb..716aae3 100644 --- a/R/tripSplit.r +++ b/R/tripSplit.r @@ -73,7 +73,8 @@ tripSplit <- function( DataGroup <- SpatialPointsDataFrame( SpatialPoints( data.frame(dataGroup$Longitude, dataGroup$Latitude), - proj4string=CRS("+proj=longlat + datum=wgs84") + #proj4string=CRS("+proj=longlat + datum=wgs84") ## causes error in latest rgdal release + proj4string=CRS(SRS_string = "EPSG:4326") ), data = dataGroup, match.ID=FALSE) @@ -115,12 +116,14 @@ splitSingleID <- function( nest <- colony[match(unique(Track$ID), colony$ID),] colonyWGS <- SpatialPoints( data.frame(nest$Longitude, nest$Latitude), - proj4string=CRS("+proj=longlat + datum=WGS84") + #proj4string=CRS("+proj=longlat + datum=wgs84") ## causes error in latest rgdal release + proj4string=CRS(SRS_string = "EPSG:4326") ) } else{ colonyWGS <- SpatialPoints( data.frame(colony$Longitude, colony$Latitude), - proj4string=CRS("+proj=longlat + datum=WGS84")) + #proj4string=CRS("+proj=longlat + datum=wgs84") ## causes error in latest rgdal release + proj4string=CRS(SRS_string = "EPSG:4326") } ### set up data to include in output----------------------------------------- From 58a848e609d67ebc99a59a1357cecbd2821ed8b4 Mon Sep 17 00:00:00 2001 From: Bealhammar Date: Wed, 3 Jun 2020 15:04:21 +0100 Subject: [PATCH 2/2] Auto stash before revert of "Small fix to vignette/README" parenthesis missing --- R/tripSplit.r | 1 + 1 file changed, 1 insertion(+) diff --git a/R/tripSplit.r b/R/tripSplit.r index 716aae3..24e9431 100644 --- a/R/tripSplit.r +++ b/R/tripSplit.r @@ -124,6 +124,7 @@ splitSingleID <- function( data.frame(colony$Longitude, colony$Latitude), #proj4string=CRS("+proj=longlat + datum=wgs84") ## causes error in latest rgdal release proj4string=CRS(SRS_string = "EPSG:4326") + ) } ### set up data to include in output-----------------------------------------