library(raster)
#> Loading required package: sp
library(stars)
#> Loading required package: abind
#> Loading required package: sf
#> Linking to GEOS 3.10.1, GDAL 3.4.0, PROJ 8.2.0; sf_use_s2() is TRUE
library(terra)
#> terra 1.5.23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example... | |
library(gdalio) | |
library(rayshader) | |
library(topography) | |
library(gdalwebsrv) | |
rotate <- function(x) t(apply(x, 2, rev)) | |
gdalio_rayshader_matrix <- function(dsn, ...) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#anglr questions | |
# example... | |
library(gdalio) | |
library(rayshader) | |
library(topography) | |
library(gdalwebsrv) | |
library(anglr) | |
source(system.file("raster_format/raster_format.codeR", package = "gdalio", mustWork = TRUE)) | |
#functions... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rstac example/test | |
library(vapour) | |
library(gdalio) | |
library(rstac) | |
library(sf) | |
library(dplyr) | |
library(scico) | |
source(system.file("raster_format/raster_format.codeR", package = "gdalio", mustWork = TRUE)) | |
# get random swiss region |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rstac) | |
library(sf) | |
library(raytrix) | |
library(rayshader) | |
# set region and search stac! | |
region <- st_bbox(st_buffer(st_point(c(-151.739,-16.501)), 0.063)) %>% | |
st_as_sfc() %>% | |
st_set_crs(4326) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(gdalio) | |
library(terra) | |
library(viridisLite) | |
source(system.file("raster_format/raster_format.codeR", package = "gdalio", mustWork = TRUE)) | |
Sys.setenv(GOOGLE_APPLICATION_CREDENTIALS = "MYKEY.json") | |
gee_src <- "EEDAI:CGIAR/SRTM90_V4" | |
src_info <- vapour::vapour_raster_info(gee_src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Warp and plot the EGM2008 1' geoid model | |
# geoid COGS hosted here: https://www.agisoft.com/downloads/geoids/ | |
library(vapour) | |
library(gdalio) | |
library(terra) | |
source(system.file("raster_format/raster_format.codeR", package = "gdalio", mustWork = TRUE)) | |
geoid <- '/vsicurl/https://s3-eu-west-1.amazonaws.com/download.agisoft.com/gtg/us_nga_egm2008_1.tif' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Customise style of a targets-derived visNetwork object | |
#' | |
#' @param v object class "visNetwork" from either `tar_visnetwork` or `tar_glimpse` | |
#' @param colors character vector of length 1 or 3. Hex colour codes to define: | |
#' Up to Date, Errored and Outdated targets (in that order). If an object from | |
#' `tar_glimpse` is provided, only the first colour is used to fill the nodes. | |
#' @param shapes a character vector of length 3. any of the following: diamond, | |
#' dot, star, triangle, triangleDown, hexagon, square. | |
#' @param background character - Hex colour codes to define the background | |
#' @param leg_shape_col character - Hex colour code. for tar_visnetwork an |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sf) | |
library(dplyr) | |
library(mapview) | |
mapviewOptions(fgb = FALSE) | |
plts <- read_sf('data/PlotData/KuamutLocations.shp') | |
pnts <- read_sf("data/Kuamut_2022_NewGPS_Points_Shapefiles/PlotCentre.shp") | |
pnts_clean <- pnts %>% | |
filter(is.na(NUMBER)|NUMBER!=100) %>% | |
mutate(nearest = st_nearest_feature(., plts), |
library(vapour)
library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.3, PROJ 8.2.0; sf_use_s2() is TRUE
#> WARNING: different compile-time and runtime versions for GEOS found:
#> Linked against: 3.10.2-CAPI-1.16.0 compiled against: 3.10.1-CAPI-1.16.0
#> It is probably a good idea to reinstall sf, and maybe rgeos and rgdal too
library(rstac)
mpc_dem <- function(aoi, src = c("cop-dem-glo-30", "alos-dem")) {