Skip to content

Commit

Permalink
remove old-style proj init
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Feb 8, 2020
1 parent 1a9a10a commit 017e116
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: raadtools
Type: Package
Title: Tools for Synoptic Environmental Spatial Data
Version: 0.5.3
Version: 0.5.3.9001
Authors@R: c(
person("Michael D.","Sumner", role = c("aut", "cre"), email = "[email protected]"),
person("Ben", "Raymond", role = "ctb", email = "[email protected]")
Expand Down Expand Up @@ -38,5 +38,5 @@ BugReports: https://github.com/AustralianAntarcticDivision/raadtools/issues
Description: Tools for reading, plotting and manipulating spatial data,
particularly from remote sensing and model output.
License: GPL-3
RoxygenNote: 7.0.1
RoxygenNote: 7.0.2
Remotes: AustralianAntarcticDivision/raadfiles
2 changes: 1 addition & 1 deletion R/chla.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ readchla <- function(date, product = c("MODISA", "SeaWiFS"),
d <- d[, c("bin_num", thename)]
names(d) <- c("bin_num", "value")
NROWS <- product2nrows(product)
gridmap <- raster::raster(raster::extent(-180, 180, -90, 90), ncol = NROWS * 2, nrow = NROWS, crs = "+init=epsg:4326")
gridmap <- raster::raster(raster::extent(-180, 180, -90, 90), ncol = NROWS * 2, nrow = NROWS, crs = "+proj=longlat +datum=WGS84 +no_defs")
## this hack is to align with assumption from here
## https://github.com/AustralianAntarcticDivision/ocean_colour/blob/master/seawifs_daily_bins_init.R#L37
gridmap <- raster::crop(gridmap, raster::extent(-180, 180, -90, -30), snap = "out")
Expand Down
2 changes: 1 addition & 1 deletion R/extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ setMethod("extract", signature(x = 'function', y = 'data.frame'), .big.extract)
longlat_coords <- function(x) {
x <- as(x, "SpatialPoints")
if (!raster::couldBeLonLat(x)) {
x <- sp::spTransform(x, sp::CRS("+init=epsg:4326"))
x <- sp::spTransform(x, sp::CRS("+proj=longlat +datum=WGS84 +no_defs", doCheckCRSArgs = FALSE))
}
as.data.frame(coordinates(x))
}
Expand Down

0 comments on commit 017e116

Please sign in to comment.