crop_dataset_from_ssdb: Crop or get a dataset from ssdb

crop_dataset_from_ssdbR Documentation

Crop or get a dataset from ssdb

Description

Crop or get a dataset from ssdb

Usage

crop_dataset_from_ssdb(
  ssdb,
  crop = NULL,
  table_name = get_value_table_names_from_ssdb(ssdb),
  variables_code0 = NULL,
  ...
)

Arguments

ssdb

database (preferably PostgresSQL) connection (see output of dbConnect) or on a generic object or a dataset, e.g. an object returned by gsodr_dataset OR a list of these objects.

crop

argument "y" of st_crop

table_name

vector with names of the tables . Default is get_value_table_names_from_ssdb(conn). See also @seealso get_value_table_names_from_ssdb.

variables_code0

code of the types (variable_code0) of the measurements that are requested to be extracted.

...

further arguments for get_measurements_from_ssdb

Examples


library(magrittr)
library(raster)

ssdb <- system.file('sumava_extdata/sumava.rds',package="SuSnowDB") %>% readRDS()

crop_ext <- system.file('sumava_extdata/sumava_v2_extent.tif',package="SuSnowDB")  %>% raster() 

ssdb_cropped <- crop_dataset_from_ssdb(ssdb,crop=crop_ext)



ecor/SuSnowDB documentation built on Jan. 2, 2023, midnight