Skip to content

Commit

Permalink
Merge pull request #97 from AustralianAntarcticDivision/get-bathy-geb…
Browse files Browse the repository at this point in the history
…co-raad

Get bathy gebco raad
  • Loading branch information
mdsumner authored Oct 12, 2021
2 parents ae17ad3 + a83ed06 commit 56d6546
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
15 changes: 12 additions & 3 deletions R/new_automap.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#' @importFrom vapour vapour_warp_raster
.get_raad_gebco <- function(target) {
## secret squirrel
src <- "/vsicurl/http://data.raadsync.cloud.edu.au/gebco/GEBCO_2019.tif"
src <- getOption("SOmap.auto.topography.source")
if (is.null(src)) {
## secret squirrel
src <- "/vsicurl/http://data.raadsync.cloud.edu.au/gebco/GEBCO_2019.tif"
}
ri <- vapour::vapour_raster_info(src)$projection
if (nchar(ri) < 1) {
source_projection <- "OGC:CRS84"
} else {
source_projection <- NULL
}
ext <- c(raster::xmin(target), raster::xmax(target), raster::ymin(target), raster::ymax(target))
dm <- dim(target)[2:1]
proj <- raster::projection(target)
raster::setValues(target,
vapour::vapour_warp_raster(src, extent = ext, dimension = dm, projection = proj, resample = "cubic")[[1L]])
vapour::vapour_warp_raster(src, extent = ext, dimension = dm, projection = proj, resample = "cubic", source_wkt = source_projection)[[1L]])
}
family_proj <- function(family = NULL, clon = NULL, clat = NULL, true_scale = NULL,
secant_range = NULL) {
Expand Down
Binary file modified data-raw/fronts_park.rds
Binary file not shown.
3 changes: 2 additions & 1 deletion man/SOmap_auto.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 56d6546

Please sign in to comment.