diff --git a/404.html b/404.html index 7943e07..18a1dc1 100644 --- a/404.html +++ b/404.html @@ -61,7 +61,7 @@ diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index 8c506ff..6e6e37e 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -108,7 +108,7 @@

Attribution -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/LICENSE-text.html b/LICENSE-text.html index 4049714..4b7408d 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -43,7 +43,7 @@ diff --git a/LICENSE.html b/LICENSE.html index b36b903..444b480 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -47,7 +47,7 @@ diff --git a/authors.html b/authors.html index 124e9d0..03ced99 100644 --- a/authors.html +++ b/authors.html @@ -73,7 +73,7 @@

Citation

diff --git a/index.html b/index.html index fb85db7..047d884 100644 --- a/index.html +++ b/index.html @@ -331,7 +331,7 @@

Dev status

diff --git a/news/index.html b/news/index.html index f9ed3cf..2c2097d 100644 --- a/news/index.html +++ b/news/index.html @@ -59,7 +59,7 @@

ge diff --git a/pkgdown.js b/pkgdown.js index 9757bf9..1a99c65 100644 --- a/pkgdown.js +++ b/pkgdown.js @@ -152,3 +152,11 @@ async function searchFuse(query, callback) { }); }); })(window.jQuery || window.$) + +document.addEventListener('keydown', function(event) { + // Check if the pressed key is '/' + if (event.key === '/') { + event.preventDefault(); // Prevent any default action associated with the '/' key + document.getElementById('search-input').focus(); // Set focus to the search input + } +}); diff --git a/pkgdown.yml b/pkgdown.yml index 1e92627..73d23c4 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,8 +1,8 @@ pandoc: 3.1.11 -pkgdown: 2.1.0 +pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-09-12T16:46Z +last_built: 2024-09-19T17:46Z urls: reference: https://njtierney.github.io/geotargets/reference article: https://njtierney.github.io/geotargets/articles diff --git a/reference/geotargets-options.html b/reference/geotargets-options.html index ff9797b..dc4cc90 100644 --- a/reference/geotargets-options.html +++ b/reference/geotargets-options.html @@ -137,7 +137,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/geotargets-package.html b/reference/geotargets-package.html index 1d17435..376d57d 100644 --- a/reference/geotargets-package.html +++ b/reference/geotargets-package.html @@ -63,7 +63,7 @@

Author< diff --git a/reference/index.html b/reference/index.html index 29c972e..58c963e 100644 --- a/reference/index.html +++ b/reference/index.html @@ -67,6 +67,12 @@

All functionstar_terra_sds() + + +
Create a terra SpatRasterDataset target
+
+ tar_terra_sprc()
@@ -98,7 +104,7 @@

All functions -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/set_window.html b/reference/set_window.html index 54a2a42..3d4b524 100644 --- a/reference/set_window.html +++ b/reference/set_window.html @@ -94,7 +94,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/tar_stars.html b/reference/tar_stars.html index 35209ae..f1dbf2f 100644 --- a/reference/tar_stars.html +++ b/reference/tar_stars.html @@ -349,7 +349,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/tar_terra_rast.html b/reference/tar_terra_rast.html index fd88f86..0f7cfb8 100644 --- a/reference/tar_terra_rast.html +++ b/reference/tar_terra_rast.html @@ -315,7 +315,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/tar_terra_sds.html b/reference/tar_terra_sds.html new file mode 100644 index 0000000..57f92d8 --- /dev/null +++ b/reference/tar_terra_sds.html @@ -0,0 +1,344 @@ + +Create a terra SpatRasterDataset target — tar_terra_sds • geotargets + Skip to contents + + +
+
+
+ +
+

Provides a target format for terra::SpatRasterDataset objects, +which hold sub-datasets, each a SpatRaster that can have multiple layers.

+
+ +
+

Usage

+
tar_terra_sds(
+  name,
+  command,
+  pattern = NULL,
+  filetype = geotargets_option_get("gdal.raster.driver"),
+  gdal = geotargets_option_get("gdal.raster.creation.options"),
+  ...,
+  tidy_eval = targets::tar_option_get("tidy_eval"),
+  packages = targets::tar_option_get("packages"),
+  library = targets::tar_option_get("library"),
+  repository = targets::tar_option_get("repository"),
+  error = targets::tar_option_get("error"),
+  memory = targets::tar_option_get("memory"),
+  garbage_collection = targets::tar_option_get("garbage_collection"),
+  deployment = targets::tar_option_get("deployment"),
+  priority = targets::tar_option_get("priority"),
+  resources = targets::tar_option_get("resources"),
+  storage = targets::tar_option_get("storage"),
+  retrieval = targets::tar_option_get("retrieval"),
+  cue = targets::tar_option_get("cue"),
+  description = targets::tar_option_get("description")
+)
+
+ +
+

Arguments

+ + +
name
+

Symbol, name of the target. A target +name must be a valid name for a symbol in R, and it +must not start with a dot. Subsequent targets +can refer to this name symbolically to induce a dependency relationship: +e.g. tar_target(downstream_target, f(upstream_target)) is a +target named downstream_target which depends on a target +upstream_target and a function f(). In addition, a target's +name determines its random number generator seed. In this way, +each target runs with a reproducible seed so someone else +running the same pipeline should get the same results, +and no two targets in the same pipeline share the same seed. +(Even dynamic branches have different names and thus different seeds.) +You can recover the seed of a completed target +with tar_meta(your_target, seed) and run tar_seed_set() +on the result to locally recreate the target's initial RNG state.

+ + +
command
+

R code to run the target.

+ + +
pattern
+

Language to define branching for a target. +For example, in a pipeline with numeric vector targets x and y, +tar_target(z, x + y, pattern = map(x, y)) implicitly defines +branches of z that each compute x[1] + y[1], x[2] + y[2], +and so on. See the user manual for details.

+ + +
filetype
+

character. File format expressed as GDAL driver names passed +to terra::writeRaster()

+ + +
gdal
+

character. GDAL driver specific datasource creation options +passed to terra::writeRaster()

+ + +
...
+

Additional arguments not yet used

+ + +
tidy_eval
+

Logical, whether to enable tidy evaluation +when interpreting command and pattern. If TRUE, you can use the +"bang-bang" operator !! to programmatically insert +the values of global objects.

+ + +
packages
+

Character vector of packages to load right before +the target runs or the output data is reloaded for +downstream targets. Use tar_option_set() to set packages +globally for all subsequent targets you define.

+ + +
library
+

Character vector of library paths to try +when loading packages.

+ + +
repository
+

Character of length 1, remote repository for target +storage. Choices:

Note: if repository is not "local" and format is "file" +then the target should create a single output file. +That output file is uploaded to the cloud and tracked for changes +where it exists in the cloud. The local file is deleted after +the target runs.

+ + +
error
+

Character of length 1, what to do if the target +stops and throws an error. Options:

  • "stop": the whole pipeline stops and throws an error.

  • +
  • "continue": the whole pipeline keeps going.

  • +
  • "abridge": any currently running targets keep running, +but no new targets launch after that. +(Visit https://books.ropensci.org/targets/debugging.html +to learn how to debug targets using saved workspaces.)

  • +
  • "null": The errored target continues and returns NULL. +The data hash is deliberately wrong so the target is not +up to date for the next run of the pipeline.

  • +
+ + +
memory
+

Character of length 1, memory strategy. +If "persistent", the target stays in memory +until the end of the pipeline (unless storage is "worker", +in which case targets unloads the value from memory +right after storing it in order to avoid sending +copious data over a network). +If "transient", the target gets unloaded +after every new target completes. +Either way, the target gets automatically loaded into memory +whenever another target needs the value. +For cloud-based dynamic files +(e.g. format = "file" with repository = "aws"), +this memory strategy applies to the +temporary local copy of the file: +"persistent" means it remains until the end of the pipeline +and is then deleted, +and "transient" means it gets deleted as soon as possible. +The former conserves bandwidth, +and the latter conserves local storage.

+ + +
garbage_collection
+

Logical, whether to run base::gc() +just before the target runs.

+ + +
deployment
+

Character of length 1. If deployment is +"main", then the target will run on the central controlling R process. +Otherwise, if deployment is "worker" and you set up the pipeline +with distributed/parallel computing, then +the target runs on a parallel worker. For more on distributed/parallel +computing in targets, please visit +https://books.ropensci.org/targets/crew.html.

+ + +
priority
+

Numeric of length 1 between 0 and 1. Controls which +targets get deployed first when multiple competing targets are ready +simultaneously. Targets with priorities closer to 1 get dispatched earlier +(and polled earlier in tar_make_future()).

+ + +
resources
+

Object returned by tar_resources() +with optional settings for high-performance computing +functionality, alternative data storage formats, +and other optional capabilities of targets. +See tar_resources() for details.

+ + +
storage
+

Character of length 1, only relevant to +tar_make_clustermq() and tar_make_future(). +Must be one of the following values:

  • "main": the target's return value is sent back to the +host machine and saved/uploaded locally.

  • +
  • "worker": the worker saves/uploads the value.

  • +
  • "none": almost never recommended. It is only for +niche situations, e.g. the data needs to be loaded +explicitly from another language. If you do use it, +then the return value of the target is totally ignored +when the target ends, but +each downstream target still attempts to load the data file +(except when retrieval = "none").

    +

    If you select storage = "none", then +the return value of the target's command is ignored, +and the data is not saved automatically. +As with dynamic files (format = "file") it is the +responsibility of the user to write to +the data store from inside the target.

    +

    The distinguishing feature of storage = "none" +(as opposed to format = "file") +is that in the general case, +downstream targets will automatically try to load the data +from the data store as a dependency. As a corollary, storage = "none" +is completely unnecessary if format is "file".

  • +
+ + +
retrieval
+

Character of length 1, only relevant to +tar_make_clustermq() and tar_make_future(). +Must be one of the following values:

  • "main": the target's dependencies are loaded on the host machine +and sent to the worker before the target runs.

  • +
  • "worker": the worker loads the targets dependencies.

  • +
  • "none": the dependencies are not loaded at all. +This choice is almost never recommended. It is only for +niche situations, e.g. the data needs to be loaded +explicitly from another language.

  • +
+ + +
cue
+

An optional object from tar_cue() to customize the +rules that decide whether the target is up to date.

+ + +
description
+

Character of length 1, a custom free-form human-readable +text description of the target. Descriptions appear as target labels +in functions like tar_manifest() and tar_visnetwork(), +and they let you select subsets of targets for the names argument of +functions like tar_make(). For example, +tar_manifest(names = tar_described_as(starts_with("survival model"))) +lists all the targets whose descriptions start with the character +string "survival model".

+ +
+
+

Value

+

target class "tar_stem" for use in a target pipeline

+
+
+

Note

+

The iteration argument is unavailable because it is hard-coded to +"list", the only option that works currently.

+
+ +
+

Author

+

Andrew Gene Brown

+

Nicholas Tierney

+

Eric R. Scott

+
+ +
+

Examples

+
if (Sys.getenv("TAR_LONG_EXAMPLES") == "true") {
+  targets::tar_dir({ # tar_dir() runs code from a temporary directory.
+    library(geotargets)
+    targets::tar_script({
+      elev_scale <- function(z = 1) {
+          terra::rast(system.file("ex", "elev.tif", package = "terra")) * z
+      }
+      list(
+        tar_terra_sds(
+          raster_elevs,
+          # two rasters, one unaltered, one scaled by factor of 2
+          command = terra::sds(list(
+            elev_scale(1),
+            elev_scale(2)
+          ))
+        )
+      )
+    })
+    targets::tar_make()
+    targets::tar_read(raster_elevs)
+  })
+}
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/tar_terra_sprc.html b/reference/tar_terra_sprc.html index b952616..b1580e8 100644 --- a/reference/tar_terra_sprc.html +++ b/reference/tar_terra_sprc.html @@ -334,7 +334,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/tar_terra_tiles.html b/reference/tar_terra_tiles.html index 39213ac..1198801 100644 --- a/reference/tar_terra_tiles.html +++ b/reference/tar_terra_tiles.html @@ -329,7 +329,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/tar_terra_vect.html b/reference/tar_terra_vect.html index cbf83e9..011964d 100644 --- a/reference/tar_terra_vect.html +++ b/reference/tar_terra_vect.html @@ -322,7 +322,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/tile_helpers.html b/reference/tile_helpers.html index 1f4e9d6..b84191f 100644 --- a/reference/tile_helpers.html +++ b/reference/tile_helpers.html @@ -195,7 +195,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/search.json b/search.json index b27a9ec..d3e933a 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement nicholas.tierney@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://njtierney.github.io/geotargets/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 geotargets authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://njtierney.github.io/geotargets/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Nicholas Tierney. Author, maintainer. Eric Scott. Author. Andrew Brown. Author.","code":""},{"path":"https://njtierney.github.io/geotargets/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Tierney N, Scott E, Brown (2024). geotargets: 'Targets' Extensions Geospatial Formats. R package version 0.1.0.9000, https://njtierney.github.io/geotargets/, https://github.com/njtierney/geotargets.","code":"@Manual{, title = {geotargets: 'Targets' Extensions for Geospatial Formats}, author = {Nicholas Tierney and Eric Scott and Andrew Brown}, year = {2024}, note = {R package version 0.1.0.9000, https://njtierney.github.io/geotargets/}, url = {https://github.com/njtierney/geotargets}, }"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"geotargets-","dir":"","previous_headings":"","what":"Targets Extensions for Geospatial Formats","title":"Targets Extensions for Geospatial Formats","text":"geotargets extends targets work geospatial data formats, rasters vectors (e.g., shapefiles). Currently support raster vector formats terra package","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Targets Extensions for Geospatial Formats","text":"can install development version geotargets like :","code":"install.packages(\"geotargets\", repos = c(\"https://njtierney.r-universe.dev\", \"https://cran.r-project.org\"))"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"why-geotargets","dir":"","previous_headings":"","what":"Why geotargets","title":"Targets Extensions for Geospatial Formats","text":"want use geospatial data formats (terra) targets package build analytic reproducible pipelines, involves writing lot custom targets wrappers. wrote geotargets can use geospatial data formats targets. provide detail , common problem using popular libraries like terra targets running errors read write. Due limitations come underlying C++ implementation terra library, specific ways write read objects. See ?terra details. geotargets helps handle write read steps, don’t worry can use targets used . essence, ’ve ever come across error: trying read geospatial raster vector targets, geotargets :)","code":"Error in .External(list(name = \"CppMethod__invoke_notvoid\", address = , : NULL value passed as symbol address Error: external pointer is not valid"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Targets Extensions for Geospatial Formats","text":"currently provide support terra package targets. show three examples target factories: tar_terra_rast() tar_terra_vect() tar_terra_sprc() tar_stars() use place tar_target() targets pipeline, work terra raster, vector, raster collection data. like see download working examples , see repo, demo-geotargets.","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_terra_rast-targets-with-terra-rasters","dir":"","previous_headings":"","what":"tar_terra_rast(): targets with terra rasters","title":"Targets Extensions for Geospatial Formats","text":"","code":"library(targets) tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) get_elev <- function() { terra::rast(system.file(\"ex\", \"elev.tif\", package = \"terra\")) } list( tar_terra_rast( terra_rast_example, get_elev() ) ) }) tar_make() x <- tar_read(terra_rast_example) x }) #> ▶ dispatched target terra_rast_example #> ● completed target terra_rast_example [0.018 seconds] #> ▶ ended pipeline [0.168 seconds] #> class : SpatRaster #> dimensions : 90, 95, 1 (nrow, ncol, nlyr) #> resolution : 0.008333333, 0.008333333 (x, y) #> extent : 5.741667, 6.533333, 49.44167, 50.19167 (xmin, xmax, ymin, ymax) #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> source : terra_rast_example #> name : elevation #> min value : 141 #> max value : 547"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_terra_vect-targets-with-terra-vectors","dir":"","previous_headings":"","what":"tar_terra_vect(): targets with terra vectors","title":"Targets Extensions for Geospatial Formats","text":"","code":"tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) lux_area <- function(projection = \"EPSG:4326\") { terra::project(terra::vect(system.file(\"ex\", \"lux.shp\", package = \"terra\")), projection) } list( tar_terra_vect( terra_vect_example, lux_area() ) ) }) tar_make() x <- tar_read(terra_vect_example) x }) #> ▶ dispatched target terra_vect_example #> ● completed target terra_vect_example [0.037 seconds] #> ▶ ended pipeline [0.183 seconds] #> class : SpatVector #> geometry : polygons #> dimensions : 12, 6 (geometries, attributes) #> extent : 5.74414, 6.528252, 49.44781, 50.18162 (xmin, xmax, ymin, ymax) #> source : terra_vect_example #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> names : ID_1 NAME_1 ID_2 NAME_2 AREA POP #> type : #> values : 1 Diekirch 1 Clervaux 312 18081 #> 1 Diekirch 2 Diekirch 218 32543 #> 1 Diekirch 3 Redange 259 18664"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_terra_sprc-targets-with-terra-raster-collections","dir":"","previous_headings":"","what":"tar_terra_sprc(): targets with terra raster collections","title":"Targets Extensions for Geospatial Formats","text":"","code":"tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) elev_scale <- function(z = 1, projection = \"EPSG:4326\") { terra::project( terra::rast(system.file(\"ex\", \"elev.tif\", package = \"terra\")) * z, projection ) } list( tar_terra_sprc( raster_elevs, # two rasters, one unaltered, one scaled by factor of 2 and # reprojected to interrupted goode homolosine command = terra::sprc(list( elev_scale(1), elev_scale(2, \"+proj=igh\") )) ) ) }) tar_make() x <- tar_read(raster_elevs) x }) #> ▶ dispatched target raster_elevs #> ● completed target raster_elevs [0.128 seconds] #> ▶ ended pipeline [0.266 seconds] #> Warning message: #> [rast] skipped sub-datasets (see 'describe(sds=TRUE)'): #> /private/var/folders/wr/by_lst2d2fngf67mknmgf4340000gn/T/RtmpjrYMSQ/targets_80c86866e24b/_targets/scratch/raster_elevs #> class : SpatRasterCollection #> length : 2 #> nrow : 90, 115 #> ncol : 95, 114 #> nlyr : 1, 1 #> extent : 5.741667, 1558890, 49.44167, 5556741 (xmin, xmax, ymin, ymax) #> crs (first) : lon/lat WGS 84 (EPSG:4326) #> names : raster_elevs, raster_elevs"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_stars-targets-with-stars-objects","dir":"","previous_headings":"","what":"tar_stars(): targets with stars objects","title":"Targets Extensions for Geospatial Formats","text":"","code":"tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) list( tar_stars( test_stars, stars::read_stars(system.file(\"tif\", \"olinda_dem_utm25s.tif\", package = \"stars\")) ) ) }) tar_make() x <- tar_read(test_stars) x }) #> ▶ dispatched target test_stars #> ● completed target test_stars [0.031 seconds] #> ▶ ended pipeline [0.139 seconds] #> Warning message: #> In CPL_write_gdal(mat, file, driver, options, type, dims, from, : #> GDAL Message 6: creation option '' is not formatted with the key=value format #> stars object with 2 dimensions and 1 attribute #> attribute(s): #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> test_stars -1 6 12 21.66521 35 88 #> dimension(s): #> from to offset delta refsys point x/y #> x 1 111 288776 89.99 UTM Zone 25, Southern Hem... FALSE [x] #> y 1 111 9120761 -89.99 UTM Zone 25, Southern Hem... FALSE [y]"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Targets Extensions for Geospatial Formats","text":"Please note geotargets project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"a-note-on-development","dir":"","previous_headings":"","what":"A note on development","title":"Targets Extensions for Geospatial Formats","text":"geotargets still undergoing development. currently consider extensions terra maturing approaching stability. love people use package kick tyres. using work, want users know API change subtle breaking ways.","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Targets Extensions for Geospatial Formats","text":"Logo design Hubert Hałun Appsilon.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":null,"dir":"Reference","previous_headings":"","what":"Get or Set geotargets Options — geotargets_option_set","title":"Get or Set geotargets Options — geotargets_option_set","text":"Get set behavior geospatial data target stores using geotargets-specific global options.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get or Set geotargets Options — geotargets_option_set","text":"","code":"geotargets_option_set( gdal_raster_driver = NULL, gdal_raster_creation_options = NULL, gdal_vector_driver = NULL, gdal_vector_creation_options = NULL ) geotargets_option_get(name)"},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get or Set geotargets Options — geotargets_option_set","text":"gdal_raster_driver character, length 1; set driver used raster data target store (default: \"GTiff\"). Options driver names can found : https://gdal.org/drivers/raster/index.html gdal_raster_creation_options character; set GDAL creation options used writing raster files target store (default: \"\"). may specify multiple values e.g. c(\"COMPRESS=DEFLATE\", \"TFW=YES\"). GDAL driver supports unique set creation options. example, default \"GTiff\" driver: https://gdal.org/drivers/raster/gtiff.html#creation-options gdal_vector_driver character, length 1; set file type used vector data target store (default: \"GeoJSON\"). gdal_vector_creation_options character; set GDAL layer creation options used writing vector files target store (default: \"ENCODING=UTF-8\"). may specify multiple values e.g. c(\"WRITE_BBOX=YES\", \"COORDINATE_PRECISION=10\"). GDAL driver supports unique set creation options. example, default \"GeoJSON\" driver: https://gdal.org/drivers/vector/geojson.html#layer-creation-options name character; option name get.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get or Set geotargets Options — geotargets_option_set","text":"Specific options, \"gdal.raster.driver\". See \"Details\" information.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get or Set geotargets Options — geotargets_option_set","text":"options can also set using options(). example, geotargets_options_set(gdal_raster_driver = \"GTiff\") equivalent options(\"geotargets.gdal.raster.driver\" = \"GTiff\").","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get or Set geotargets Options — geotargets_option_set","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) op <- getOption(\"geotargets.gdal.raster.driver\") withr::defer(options(\"geotargets.gdal.raster.driver\" = op)) geotargets_option_set(gdal_raster_driver = \"COG\") targets::tar_script({ list( geotargets::tar_terra_rast( terra_rast_example, system.file(\"ex/elev.tif\", package = \"terra\") |> terra::rast() ) ) }) targets::tar_make() x <- targets::tar_read(terra_rast_example) }) } geotargets_option_get(\"gdal.raster.driver\") #> NULL geotargets_option_get(\"gdal.raster.creation.options\") #> NULL"},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-package.html","id":null,"dir":"Reference","previous_headings":"","what":"geotargets: 'Targets' Extensions for Geospatial Formats — geotargets-package","title":"geotargets: 'Targets' Extensions for Geospatial Formats — geotargets-package","text":"Provides extensions various geospatial file formats, shapefiles rasters. Currently provides support 'terra' geospatial formats. See vignettes worked examples, demonstrations, explanations use various package extensions.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"geotargets: 'Targets' Extensions for Geospatial Formats — geotargets-package","text":"Maintainer: Nicholas Tierney nicholas.tierney@gmail.com (ORCID) Authors: Eric Scott (ORCID) Andrew Brown (ORCID)","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":null,"dir":"Reference","previous_headings":"","what":"Copy a raster within a window — set_window","title":"Copy a raster within a window — set_window","text":"Create new SpatRaster object specified window (area interest) original SpatRaster. wrapper around terra::window() , rather modifying SpatRaster place, returns new SpatRaster leaving original unchanged.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Copy a raster within a window — set_window","text":"","code":"set_window(raster, window)"},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Copy a raster within a window — set_window","text":"raster SpatRaster object window SpatExtent object defining area interest","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Copy a raster within a window — set_window","text":"may general use, created primarily use within tar_terra_tiles().","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Copy a raster within a window — set_window","text":"Eric Scott","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Copy a raster within a window — set_window","text":"","code":"f <- system.file(\"ex/elev.tif\", package=\"terra\") r <- terra::rast(f) e <- terra::ext(c(5.9, 6,49.95, 50)) r2 <- set_window(r, e) terra::ext(r) #> SpatExtent : 5.74166666666667, 6.53333333333333, 49.4416666666667, 50.1916666666667 (xmin, xmax, ymin, ymax) terra::ext(r2) #> SpatExtent : 5.9, 6, 49.95, 50 (xmin, xmax, ymin, ymax)"},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a stars stars Target — tar_stars","title":"Create a stars stars Target — tar_stars","text":"Provides target format stars objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a stars stars Target — tar_stars","text":"","code":"tar_stars( name, command, pattern = NULL, proxy = FALSE, mdim = FALSE, ncdf = FALSE, driver = geotargets_option_get(\"gdal.raster.driver\"), options = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") ) tar_stars_proxy( name, command, pattern = NULL, mdim = FALSE, ncdf = FALSE, driver = geotargets_option_get(\"gdal.raster.driver\"), options = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a stars stars Target — tar_stars","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. proxy logical. Passed stars::read_stars(). TRUE target read object class stars_proxy. Otherwise, object class stars. mdim logical. Use Multidimensional Raster Data Model via stars::write_mdim()? Default: FALSE. supported drivers, e.g. \"netCDF\" \"Zarr\". ncdf logical. Use NetCDF library directly read data via stars::read_ncdf()? Default: FALSE. supported driver=\"netCDF\". driver character. File format expressed GDAL driver names passed stars::write_stars(). See sf::st_drivers(). options character. GDAL driver specific datasource creation options passed stars::write_stars() ... Additional arguments yet used tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a stars stars Target — tar_stars","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a stars stars Target — tar_stars","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) targets::tar_script({ list( geotargets::tar_stars( stars_example, stars::read_stars(system.file(\"tif\", \"olinda_dem_utm25s.tif\", package = \"stars\")) ) ) }) targets::tar_make() x <- targets::tar_read(stars_example) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a terra SpatRaster target — tar_terra_rast","title":"Create a terra SpatRaster target — tar_terra_rast","text":"Provides target format terra::SpatRaster objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a terra SpatRaster target — tar_terra_rast","text":"","code":"tar_terra_rast( name, command, pattern = NULL, filetype = geotargets_option_get(\"gdal.raster.driver\"), gdal = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a terra SpatRaster target — tar_terra_rast","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. filetype character. File format expressed GDAL driver names passed terra::writeRaster() gdal character. GDAL driver specific datasource creation options passed terra::writeRaster() ... Additional arguments yet used tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a terra SpatRaster target — tar_terra_rast","text":"target class \"tar_stem\" use target pipeline","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a terra SpatRaster target — tar_terra_rast","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a terra SpatRaster target — tar_terra_rast","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) targets::tar_script({ list( geotargets::tar_terra_rast( terra_rast_example, system.file(\"ex/elev.tif\", package = \"terra\") |> terra::rast() ) ) }) targets::tar_make() x <- targets::tar_read(terra_rast_example) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a terra SpatRasterCollection target — tar_terra_sprc","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"Provides target format terra::SpatRasterCollection objects, restriction extent geometric parameters.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"","code":"tar_terra_sprc( name, command, pattern = NULL, filetype = geotargets_option_get(\"gdal.raster.driver\"), gdal = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. filetype character. File format expressed GDAL driver names passed terra::writeRaster() gdal character. GDAL driver specific datasource creation options passed terra::writeRaster() ... Additional arguments yet used tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"target class \"tar_stem\" use target pipeline","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"Andrew Gene Brown Nicholas Tierney","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) targets::tar_script({ elev_scale <- function(z = 1, projection = \"EPSG:4326\") { terra::project( terra::rast(system.file(\"ex\", \"elev.tif\", package = \"terra\")) * z, projection ) } list( tar_terra_sprc( raster_elevs, # two rasters, one unaltered, one scaled by factor of 2 and # reprojected to interrupted good homolosine command = terra::sprc(list( elev_scale(1), elev_scale(2, \"+proj=igh\") )) ) ) }) targets::tar_make() x <- targets::tar_read(raster_elevs) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"target factory useful raster large high resolution work -memory. can instead split tiles can iterated , potentially using parallel workers.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"","code":"tar_terra_tiles( name, raster, tile_fun, filetype = geotargets_option_get(\"gdal.raster.driver\"), gdal = geotargets_option_get(\"gdal.raster.creation.options\"), ..., packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. raster SpatRaster object split tiles tile_fun helper function returns list numeric vectors tile_grid tile_blocksize specified one following ways: named function, e.g. tile_blocksize \"tile_blocksize\" anonymous function, e.g. \\(x) tile_grid(x, nrow = 2, ncol = 2) filetype character. File format expressed GDAL driver names passed terra::makeTiles() gdal character. GDAL driver specific datasource creation options passed terra::makeTiles() ... additional arguments yet used packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"list two targets: upstream target creates list extents downstream pattern maps extents create list SpatRaster objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"Eric Scott","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ targets::tar_script({ library(targets) library(geotargets) library(terra) list( tar_target( my_file, system.file(\"ex/elev.tif\", package=\"terra\"), format = \"file\" ), tar_terra_rast( my_map, terra::rast(my_file) ), tar_terra_tiles( name = rast_split, raster = my_map, ncol = 2, nrow = 2 ) ) }) targets::tar_manifest() }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a terra SpatVector target — tar_terra_vect","title":"Create a terra SpatVector target — tar_terra_vect","text":"Provides target format terra::SpatVector objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a terra SpatVector target — tar_terra_vect","text":"","code":"tar_terra_vect( name, command, pattern = NULL, filetype = geotargets_option_get(\"gdal.vector.driver\"), gdal = geotargets_option_get(\"gdal.vector.creation.options\"), ..., packages = targets::tar_option_get(\"packages\"), tidy_eval = targets::tar_option_get(\"tidy_eval\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a terra SpatVector target — tar_terra_vect","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. filetype character. File format expressed GDAL driver names passed terra::writeVector(). See 'Note' details gdal character. GDAL driver specific datasource creation options passed terra::writeVector(). ... Additional arguments yet used packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a terra SpatVector target — tar_terra_vect","text":"target class \"tar_stem\" use target pipeline","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a terra SpatVector target — tar_terra_vect","text":"iteration argument unavailable hard-coded \"list\", option works currently. Although may pass supported GDAL vector driver filetype argument, formats guaranteed work geotargets. moment, tested GeoJSON ESRI Shapefile appear work generally.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a terra SpatVector target — tar_terra_vect","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. targets::tar_script({ lux_area <- function(projection = \"EPSG:4326\") { terra::project( terra::vect(system.file(\"ex\", \"lux.shp\", package = \"terra\" )), projection ) } list( geotargets::tar_terra_vect( terra_vect_example, lux_area() ) ) }) targets::tar_make() x <- targets::tar_read(terra_vect_example) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper functions to create tiles — tile_grid","title":"Helper functions to create tiles — tile_grid","text":"Wrappers around terra::getTileExtents() return list named numeric vectors describing extents tiles rather SpatExtent objects. may general use, intended primarily supplying tile_fun argument tar_terra_tiles().","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper functions to create tiles — tile_grid","text":"","code":"tile_grid(raster, ncol, nrow) tile_blocksize(raster) tile_n(raster, n)"},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper functions to create tiles — tile_grid","text":"raster SpatRaster object ncol integer; number columns split SpatRaster nrow integer; number rows split SpatRaster n integer; total number tiles split SpatRaster ","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper functions to create tiles — tile_grid","text":"list named numeric vectors xmin, xmax, ymin, ymax values can coerced SpatExtent objects terra::ext().","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper functions to create tiles — tile_grid","text":"tile_blocksize() creates extents using raster's native blocksize (see terra::fileBlocksize()), memory efficient. tile_grid() allows specification number rows columns split raster . E.g. nrow = 2 ncol = 2 create 4 tiles (specifies 2x2 matrix, 4 elements).","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Helper functions to create tiles — tile_grid","text":"Eric Scott","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper functions to create tiles — tile_grid","text":"","code":"f <- system.file(\"ex/elev.tif\", package=\"terra\") r <- terra::rast(f) tile_grid(r, ncol = 2, nrow = 2) #> [[1]] #> xmin xmax ymin ymax #> 5.741667 6.141667 49.816667 50.191667 #> #> [[2]] #> xmin xmax ymin ymax #> 6.133333 6.533333 49.816667 50.191667 #> #> [[3]] #> xmin xmax ymin ymax #> 5.741667 6.141667 49.441667 49.816667 #> #> [[4]] #> xmin xmax ymin ymax #> 6.133333 6.533333 49.441667 49.816667 #> tile_blocksize(r) #> [[1]] #> xmin xmax ymin ymax #> 5.741667 6.533333 49.833333 50.191667 #> #> [[2]] #> xmin xmax ymin ymax #> 5.741667 6.533333 49.475000 49.833333 #> #> [[3]] #> xmin xmax ymin ymax #> 5.741667 6.533333 49.441667 49.475000 #> tile_n(r, 8) #> creating 2 * 4 = 8 tile extents #> [[1]] #> xmin xmax ymin ymax #> 5.741667 5.941667 49.816667 50.191667 #> #> [[2]] #> xmin xmax ymin ymax #> 5.941667 6.133333 49.816667 50.191667 #> #> [[3]] #> xmin xmax ymin ymax #> 6.141667 6.333333 49.816667 50.191667 #> #> [[4]] #> xmin xmax ymin ymax #> 6.333333 6.533333 49.816667 50.191667 #> #> [[5]] #> xmin xmax ymin ymax #> 5.741667 5.941667 49.441667 49.816667 #> #> [[6]] #> xmin xmax ymin ymax #> 5.941667 6.133333 49.441667 49.816667 #> #> [[7]] #> xmin xmax ymin ymax #> 6.141667 6.333333 49.441667 49.816667 #> #> [[8]] #> xmin xmax ymin ymax #> 6.333333 6.533333 49.441667 49.816667 #> if (FALSE) { # \\dontrun{ #usage with tar_terra_tiles list( tar_terra_rast( my_map, terra::rast(system.file(\"ex/logo.tif\", package = \"terra\")) ), tar_terra_tiles( name = rast_split, raster = my_map, tile_fun = tile_blocksize ), tar_terra_tiles( name = rast_split_grid, raster = my_map, tile_fun = \\(x) tile_grid(x, ncol = 2, nrow = 2) ), tar_terra_tiles( name = rast_split_n, raster = my_map, tile_fun = \\(x) tile_n(x, n = 6) ) ) } # }"},{"path":"https://njtierney.github.io/geotargets/news/index.html","id":"geotargets-development-version","dir":"Changelog","previous_headings":"","what":"geotargets (development version)","title":"geotargets (development version)","text":"Created tar_stars() tar_stars_proxy() create stars stars_proxy objects, respectively. Created tar_terra_tiles(), “target factory” splitting raster multiple tiles dynamic branching (#69). Created two helper functions use tar_terra_tiles(): tile_grid(), tile_n(), tile_blocksize() (#69, #86, #87, #89). Created utility function set_window() mostly internal use within tar_terra_tiles(). Removes iteration argument tar_*() functions. iteration now hard-coded \"list\" since option works (now least). Added description argument tar_*() functions passed tar_target().","code":""},{"path":"https://njtierney.github.io/geotargets/news/index.html","id":"geotargets-010-14-may-2024","dir":"Changelog","previous_headings":"","what":"geotargets 0.1.0 (14 May 2024)","title":"geotargets 0.1.0 (14 May 2024)","text":"Created tar_terra_rast() tar_terra_vect() targets create SpatRaster SpatVector objects, respectively Created tar_terra_sprc() creates SpatRasterCollection object. geotargets_options_get() geotargets_options_set() can used set get options specific geotargets. geotargets now requires targets version 1.7.0 higher fixed bug resources supplied tar_terra_*() ignored (#66)","code":""}] +[{"path":[]},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement nicholas.tierney@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://njtierney.github.io/geotargets/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://njtierney.github.io/geotargets/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 geotargets authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://njtierney.github.io/geotargets/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Nicholas Tierney. Author, maintainer. Eric Scott. Author. Andrew Brown. Author.","code":""},{"path":"https://njtierney.github.io/geotargets/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Tierney N, Scott E, Brown (2024). geotargets: 'Targets' Extensions Geospatial Formats. R package version 0.1.0.9000, https://njtierney.github.io/geotargets/, https://github.com/njtierney/geotargets.","code":"@Manual{, title = {geotargets: 'Targets' Extensions for Geospatial Formats}, author = {Nicholas Tierney and Eric Scott and Andrew Brown}, year = {2024}, note = {R package version 0.1.0.9000, https://njtierney.github.io/geotargets/}, url = {https://github.com/njtierney/geotargets}, }"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"geotargets-","dir":"","previous_headings":"","what":"Targets Extensions for Geospatial Formats","title":"Targets Extensions for Geospatial Formats","text":"geotargets extends targets work geospatial data formats, rasters vectors (e.g., shapefiles). Currently support raster vector formats terra package","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Targets Extensions for Geospatial Formats","text":"can install development version geotargets like :","code":"install.packages(\"geotargets\", repos = c(\"https://njtierney.r-universe.dev\", \"https://cran.r-project.org\"))"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"why-geotargets","dir":"","previous_headings":"","what":"Why geotargets","title":"Targets Extensions for Geospatial Formats","text":"want use geospatial data formats (terra) targets package build analytic reproducible pipelines, involves writing lot custom targets wrappers. wrote geotargets can use geospatial data formats targets. provide detail , common problem using popular libraries like terra targets running errors read write. Due limitations come underlying C++ implementation terra library, specific ways write read objects. See ?terra details. geotargets helps handle write read steps, don’t worry can use targets used . essence, ’ve ever come across error: trying read geospatial raster vector targets, geotargets :)","code":"Error in .External(list(name = \"CppMethod__invoke_notvoid\", address = , : NULL value passed as symbol address Error: external pointer is not valid"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Targets Extensions for Geospatial Formats","text":"currently provide support terra package targets. show three examples target factories: tar_terra_rast() tar_terra_vect() tar_terra_sprc() tar_stars() use place tar_target() targets pipeline, work terra raster, vector, raster collection data. like see download working examples , see repo, demo-geotargets.","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_terra_rast-targets-with-terra-rasters","dir":"","previous_headings":"","what":"tar_terra_rast(): targets with terra rasters","title":"Targets Extensions for Geospatial Formats","text":"","code":"library(targets) tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) get_elev <- function() { terra::rast(system.file(\"ex\", \"elev.tif\", package = \"terra\")) } list( tar_terra_rast( terra_rast_example, get_elev() ) ) }) tar_make() x <- tar_read(terra_rast_example) x }) #> ▶ dispatched target terra_rast_example #> ● completed target terra_rast_example [0.018 seconds] #> ▶ ended pipeline [0.168 seconds] #> class : SpatRaster #> dimensions : 90, 95, 1 (nrow, ncol, nlyr) #> resolution : 0.008333333, 0.008333333 (x, y) #> extent : 5.741667, 6.533333, 49.44167, 50.19167 (xmin, xmax, ymin, ymax) #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> source : terra_rast_example #> name : elevation #> min value : 141 #> max value : 547"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_terra_vect-targets-with-terra-vectors","dir":"","previous_headings":"","what":"tar_terra_vect(): targets with terra vectors","title":"Targets Extensions for Geospatial Formats","text":"","code":"tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) lux_area <- function(projection = \"EPSG:4326\") { terra::project(terra::vect(system.file(\"ex\", \"lux.shp\", package = \"terra\")), projection) } list( tar_terra_vect( terra_vect_example, lux_area() ) ) }) tar_make() x <- tar_read(terra_vect_example) x }) #> ▶ dispatched target terra_vect_example #> ● completed target terra_vect_example [0.037 seconds] #> ▶ ended pipeline [0.183 seconds] #> class : SpatVector #> geometry : polygons #> dimensions : 12, 6 (geometries, attributes) #> extent : 5.74414, 6.528252, 49.44781, 50.18162 (xmin, xmax, ymin, ymax) #> source : terra_vect_example #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> names : ID_1 NAME_1 ID_2 NAME_2 AREA POP #> type : #> values : 1 Diekirch 1 Clervaux 312 18081 #> 1 Diekirch 2 Diekirch 218 32543 #> 1 Diekirch 3 Redange 259 18664"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_terra_sprc-targets-with-terra-raster-collections","dir":"","previous_headings":"","what":"tar_terra_sprc(): targets with terra raster collections","title":"Targets Extensions for Geospatial Formats","text":"","code":"tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) elev_scale <- function(z = 1, projection = \"EPSG:4326\") { terra::project( terra::rast(system.file(\"ex\", \"elev.tif\", package = \"terra\")) * z, projection ) } list( tar_terra_sprc( raster_elevs, # two rasters, one unaltered, one scaled by factor of 2 and # reprojected to interrupted goode homolosine command = terra::sprc(list( elev_scale(1), elev_scale(2, \"+proj=igh\") )) ) ) }) tar_make() x <- tar_read(raster_elevs) x }) #> ▶ dispatched target raster_elevs #> ● completed target raster_elevs [0.128 seconds] #> ▶ ended pipeline [0.266 seconds] #> Warning message: #> [rast] skipped sub-datasets (see 'describe(sds=TRUE)'): #> /private/var/folders/wr/by_lst2d2fngf67mknmgf4340000gn/T/RtmpjrYMSQ/targets_80c86866e24b/_targets/scratch/raster_elevs #> class : SpatRasterCollection #> length : 2 #> nrow : 90, 115 #> ncol : 95, 114 #> nlyr : 1, 1 #> extent : 5.741667, 1558890, 49.44167, 5556741 (xmin, xmax, ymin, ymax) #> crs (first) : lon/lat WGS 84 (EPSG:4326) #> names : raster_elevs, raster_elevs"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"tar_stars-targets-with-stars-objects","dir":"","previous_headings":"","what":"tar_stars(): targets with stars objects","title":"Targets Extensions for Geospatial Formats","text":"","code":"tar_dir({ # tar_dir() runs code from a temporary directory. tar_script({ library(geotargets) list( tar_stars( test_stars, stars::read_stars(system.file(\"tif\", \"olinda_dem_utm25s.tif\", package = \"stars\")) ) ) }) tar_make() x <- tar_read(test_stars) x }) #> ▶ dispatched target test_stars #> ● completed target test_stars [0.031 seconds] #> ▶ ended pipeline [0.139 seconds] #> Warning message: #> In CPL_write_gdal(mat, file, driver, options, type, dims, from, : #> GDAL Message 6: creation option '' is not formatted with the key=value format #> stars object with 2 dimensions and 1 attribute #> attribute(s): #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> test_stars -1 6 12 21.66521 35 88 #> dimension(s): #> from to offset delta refsys point x/y #> x 1 111 288776 89.99 UTM Zone 25, Southern Hem... FALSE [x] #> y 1 111 9120761 -89.99 UTM Zone 25, Southern Hem... FALSE [y]"},{"path":"https://njtierney.github.io/geotargets/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Targets Extensions for Geospatial Formats","text":"Please note geotargets project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"a-note-on-development","dir":"","previous_headings":"","what":"A note on development","title":"Targets Extensions for Geospatial Formats","text":"geotargets still undergoing development. currently consider extensions terra maturing approaching stability. love people use package kick tyres. using work, want users know API change subtle breaking ways.","code":""},{"path":"https://njtierney.github.io/geotargets/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Targets Extensions for Geospatial Formats","text":"Logo design Hubert Hałun Appsilon.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":null,"dir":"Reference","previous_headings":"","what":"Get or Set geotargets Options — geotargets_option_set","title":"Get or Set geotargets Options — geotargets_option_set","text":"Get set behavior geospatial data target stores using geotargets-specific global options.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get or Set geotargets Options — geotargets_option_set","text":"","code":"geotargets_option_set( gdal_raster_driver = NULL, gdal_raster_creation_options = NULL, gdal_vector_driver = NULL, gdal_vector_creation_options = NULL ) geotargets_option_get(name)"},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get or Set geotargets Options — geotargets_option_set","text":"gdal_raster_driver character, length 1; set driver used raster data target store (default: \"GTiff\"). Options driver names can found : https://gdal.org/drivers/raster/index.html gdal_raster_creation_options character; set GDAL creation options used writing raster files target store (default: \"\"). may specify multiple values e.g. c(\"COMPRESS=DEFLATE\", \"TFW=YES\"). GDAL driver supports unique set creation options. example, default \"GTiff\" driver: https://gdal.org/drivers/raster/gtiff.html#creation-options gdal_vector_driver character, length 1; set file type used vector data target store (default: \"GeoJSON\"). gdal_vector_creation_options character; set GDAL layer creation options used writing vector files target store (default: \"ENCODING=UTF-8\"). may specify multiple values e.g. c(\"WRITE_BBOX=YES\", \"COORDINATE_PRECISION=10\"). GDAL driver supports unique set creation options. example, default \"GeoJSON\" driver: https://gdal.org/drivers/vector/geojson.html#layer-creation-options name character; option name get.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get or Set geotargets Options — geotargets_option_set","text":"Specific options, \"gdal.raster.driver\". See \"Details\" information.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get or Set geotargets Options — geotargets_option_set","text":"options can also set using options(). example, geotargets_options_set(gdal_raster_driver = \"GTiff\") equivalent options(\"geotargets.gdal.raster.driver\" = \"GTiff\").","code":""},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-options.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get or Set geotargets Options — geotargets_option_set","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) op <- getOption(\"geotargets.gdal.raster.driver\") withr::defer(options(\"geotargets.gdal.raster.driver\" = op)) geotargets_option_set(gdal_raster_driver = \"COG\") targets::tar_script({ list( geotargets::tar_terra_rast( terra_rast_example, system.file(\"ex/elev.tif\", package = \"terra\") |> terra::rast() ) ) }) targets::tar_make() x <- targets::tar_read(terra_rast_example) }) } geotargets_option_get(\"gdal.raster.driver\") #> NULL geotargets_option_get(\"gdal.raster.creation.options\") #> NULL"},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-package.html","id":null,"dir":"Reference","previous_headings":"","what":"geotargets: 'Targets' Extensions for Geospatial Formats — geotargets-package","title":"geotargets: 'Targets' Extensions for Geospatial Formats — geotargets-package","text":"Provides extensions various geospatial file formats, shapefiles rasters. Currently provides support 'terra' geospatial formats. See vignettes worked examples, demonstrations, explanations use various package extensions.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/geotargets-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"geotargets: 'Targets' Extensions for Geospatial Formats — geotargets-package","text":"Maintainer: Nicholas Tierney nicholas.tierney@gmail.com (ORCID) Authors: Eric Scott (ORCID) Andrew Brown (ORCID)","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":null,"dir":"Reference","previous_headings":"","what":"Copy a raster within a window — set_window","title":"Copy a raster within a window — set_window","text":"Create new SpatRaster object specified window (area interest) original SpatRaster. wrapper around terra::window() , rather modifying SpatRaster place, returns new SpatRaster leaving original unchanged.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Copy a raster within a window — set_window","text":"","code":"set_window(raster, window)"},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Copy a raster within a window — set_window","text":"raster SpatRaster object window SpatExtent object defining area interest","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Copy a raster within a window — set_window","text":"may general use, created primarily use within tar_terra_tiles().","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Copy a raster within a window — set_window","text":"Eric Scott","code":""},{"path":"https://njtierney.github.io/geotargets/reference/set_window.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Copy a raster within a window — set_window","text":"","code":"f <- system.file(\"ex/elev.tif\", package=\"terra\") r <- terra::rast(f) e <- terra::ext(c(5.9, 6,49.95, 50)) r2 <- set_window(r, e) terra::ext(r) #> SpatExtent : 5.74166666666667, 6.53333333333333, 49.4416666666667, 50.1916666666667 (xmin, xmax, ymin, ymax) terra::ext(r2) #> SpatExtent : 5.9, 6, 49.95, 50 (xmin, xmax, ymin, ymax)"},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a stars stars Target — tar_stars","title":"Create a stars stars Target — tar_stars","text":"Provides target format stars objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a stars stars Target — tar_stars","text":"","code":"tar_stars( name, command, pattern = NULL, proxy = FALSE, mdim = FALSE, ncdf = FALSE, driver = geotargets_option_get(\"gdal.raster.driver\"), options = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") ) tar_stars_proxy( name, command, pattern = NULL, mdim = FALSE, ncdf = FALSE, driver = geotargets_option_get(\"gdal.raster.driver\"), options = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a stars stars Target — tar_stars","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. proxy logical. Passed stars::read_stars(). TRUE target read object class stars_proxy. Otherwise, object class stars. mdim logical. Use Multidimensional Raster Data Model via stars::write_mdim()? Default: FALSE. supported drivers, e.g. \"netCDF\" \"Zarr\". ncdf logical. Use NetCDF library directly read data via stars::read_ncdf()? Default: FALSE. supported driver=\"netCDF\". driver character. File format expressed GDAL driver names passed stars::write_stars(). See sf::st_drivers(). options character. GDAL driver specific datasource creation options passed stars::write_stars() ... Additional arguments yet used tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a stars stars Target — tar_stars","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_stars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a stars stars Target — tar_stars","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) targets::tar_script({ list( geotargets::tar_stars( stars_example, stars::read_stars(system.file(\"tif\", \"olinda_dem_utm25s.tif\", package = \"stars\")) ) ) }) targets::tar_make() x <- targets::tar_read(stars_example) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a terra SpatRaster target — tar_terra_rast","title":"Create a terra SpatRaster target — tar_terra_rast","text":"Provides target format terra::SpatRaster objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a terra SpatRaster target — tar_terra_rast","text":"","code":"tar_terra_rast( name, command, pattern = NULL, filetype = geotargets_option_get(\"gdal.raster.driver\"), gdal = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a terra SpatRaster target — tar_terra_rast","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. filetype character. File format expressed GDAL driver names passed terra::writeRaster() gdal character. GDAL driver specific datasource creation options passed terra::writeRaster() ... Additional arguments yet used tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a terra SpatRaster target — tar_terra_rast","text":"target class \"tar_stem\" use target pipeline","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a terra SpatRaster target — tar_terra_rast","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_rast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a terra SpatRaster target — tar_terra_rast","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) targets::tar_script({ list( geotargets::tar_terra_rast( terra_rast_example, system.file(\"ex/elev.tif\", package = \"terra\") |> terra::rast() ) ) }) targets::tar_make() x <- targets::tar_read(terra_rast_example) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sds.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a terra SpatRasterDataset target — tar_terra_sds","title":"Create a terra SpatRasterDataset target — tar_terra_sds","text":"Provides target format terra::SpatRasterDataset objects, hold sub-datasets, SpatRaster can multiple layers.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a terra SpatRasterDataset target — tar_terra_sds","text":"","code":"tar_terra_sds( name, command, pattern = NULL, filetype = geotargets_option_get(\"gdal.raster.driver\"), gdal = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a terra SpatRasterDataset target — tar_terra_sds","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. filetype character. File format expressed GDAL driver names passed terra::writeRaster() gdal character. GDAL driver specific datasource creation options passed terra::writeRaster() ... Additional arguments yet used tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a terra SpatRasterDataset target — tar_terra_sds","text":"target class \"tar_stem\" use target pipeline","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a terra SpatRasterDataset target — tar_terra_sds","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a terra SpatRasterDataset target — tar_terra_sds","text":"Andrew Gene Brown Nicholas Tierney Eric R. Scott","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a terra SpatRasterDataset target — tar_terra_sds","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) targets::tar_script({ elev_scale <- function(z = 1) { terra::rast(system.file(\"ex\", \"elev.tif\", package = \"terra\")) * z } list( tar_terra_sds( raster_elevs, # two rasters, one unaltered, one scaled by factor of 2 command = terra::sds(list( elev_scale(1), elev_scale(2) )) ) ) }) targets::tar_make() targets::tar_read(raster_elevs) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a terra SpatRasterCollection target — tar_terra_sprc","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"Provides target format terra::SpatRasterCollection objects, restriction extent geometric parameters.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"","code":"tar_terra_sprc( name, command, pattern = NULL, filetype = geotargets_option_get(\"gdal.raster.driver\"), gdal = geotargets_option_get(\"gdal.raster.creation.options\"), ..., tidy_eval = targets::tar_option_get(\"tidy_eval\"), packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. filetype character. File format expressed GDAL driver names passed terra::writeRaster() gdal character. GDAL driver specific datasource creation options passed terra::writeRaster() ... Additional arguments yet used tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"target class \"tar_stem\" use target pipeline","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"Andrew Gene Brown Nicholas Tierney","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a terra SpatRasterCollection target — tar_terra_sprc","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. library(geotargets) targets::tar_script({ elev_scale <- function(z = 1, projection = \"EPSG:4326\") { terra::project( terra::rast(system.file(\"ex\", \"elev.tif\", package = \"terra\")) * z, projection ) } list( tar_terra_sprc( raster_elevs, # two rasters, one unaltered, one scaled by factor of 2 and # reprojected to interrupted good homolosine command = terra::sprc(list( elev_scale(1), elev_scale(2, \"+proj=igh\") )) ) ) }) targets::tar_make() x <- targets::tar_read(raster_elevs) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"target factory useful raster large high resolution work -memory. can instead split tiles can iterated , potentially using parallel workers.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"","code":"tar_terra_tiles( name, raster, tile_fun, filetype = geotargets_option_get(\"gdal.raster.driver\"), gdal = geotargets_option_get(\"gdal.raster.creation.options\"), ..., packages = targets::tar_option_get(\"packages\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. raster SpatRaster object split tiles tile_fun helper function returns list numeric vectors tile_grid tile_blocksize specified one following ways: named function, e.g. tile_blocksize \"tile_blocksize\" anonymous function, e.g. \\(x) tile_grid(x, nrow = 2, ncol = 2) filetype character. File format expressed GDAL driver names passed terra::makeTiles() gdal character. GDAL driver specific datasource creation options passed terra::makeTiles() ... additional arguments yet used packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"list two targets: upstream target creates list extents downstream pattern maps extents create list SpatRaster objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"iteration argument unavailable hard-coded \"list\", option works currently.","code":""},{"path":[]},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"Eric Scott","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Split a raster into tiles that can be iterated over with dynamic branching — tar_terra_tiles","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ targets::tar_script({ library(targets) library(geotargets) library(terra) list( tar_target( my_file, system.file(\"ex/elev.tif\", package=\"terra\"), format = \"file\" ), tar_terra_rast( my_map, terra::rast(my_file) ), tar_terra_tiles( name = rast_split, raster = my_map, ncol = 2, nrow = 2 ) ) }) targets::tar_manifest() }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a terra SpatVector target — tar_terra_vect","title":"Create a terra SpatVector target — tar_terra_vect","text":"Provides target format terra::SpatVector objects.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a terra SpatVector target — tar_terra_vect","text":"","code":"tar_terra_vect( name, command, pattern = NULL, filetype = geotargets_option_get(\"gdal.vector.driver\"), gdal = geotargets_option_get(\"gdal.vector.creation.options\"), ..., packages = targets::tar_option_get(\"packages\"), tidy_eval = targets::tar_option_get(\"tidy_eval\"), library = targets::tar_option_get(\"library\"), repository = targets::tar_option_get(\"repository\"), error = targets::tar_option_get(\"error\"), memory = targets::tar_option_get(\"memory\"), garbage_collection = targets::tar_option_get(\"garbage_collection\"), deployment = targets::tar_option_get(\"deployment\"), priority = targets::tar_option_get(\"priority\"), resources = targets::tar_option_get(\"resources\"), storage = targets::tar_option_get(\"storage\"), retrieval = targets::tar_option_get(\"retrieval\"), cue = targets::tar_option_get(\"cue\"), description = targets::tar_option_get(\"description\") )"},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a terra SpatVector target — tar_terra_vect","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. command R code run target. pattern Language define branching target. example, pipeline numeric vector targets x y, tar_target(z, x + y, pattern = map(x, y)) implicitly defines branches z compute x[1] + y[1], x[2] + y[2], . See user manual details. filetype character. File format expressed GDAL driver names passed terra::writeVector(). See 'Note' details gdal character. GDAL driver specific datasource creation options passed terra::writeVector(). ... Additional arguments yet used packages Character vector packages load right target runs output data reloaded downstream targets. Use tar_option_set() set packages globally subsequent targets define. tidy_eval Logical, whether enable tidy evaluation interpreting command pattern. TRUE, can use \"bang-bang\" operator !! programmatically insert values global objects. library Character vector library paths try loading packages. repository Character length 1, remote repository target storage. Choices: \"local\": file system local machine. \"aws\": Amazon Web Services (AWS) S3 bucket. Can configured non-AWS S3 bucket using endpoint argument tar_resources_aws(), versioning capabilities may lost . See cloud storage section https://books.ropensci.org/targets/data.html details instructions. \"gcp\": Google Cloud Platform storage bucket. See cloud storage section https://books.ropensci.org/targets/data.html details instructions. Note: repository \"local\" format \"file\" target create single output file. output file uploaded cloud tracked changes exists cloud. local file deleted target runs. error Character length 1, target stops throws error. Options: \"stop\": whole pipeline stops throws error. \"continue\": whole pipeline keeps going. \"abridge\": currently running targets keep running, new targets launch . (Visit https://books.ropensci.org/targets/debugging.html learn debug targets using saved workspaces.) \"null\": errored target continues returns NULL. data hash deliberately wrong target date next run pipeline. memory Character length 1, memory strategy. \"persistent\", target stays memory end pipeline (unless storage \"worker\", case targets unloads value memory right storing order avoid sending copious data network). \"transient\", target gets unloaded every new target completes. Either way, target gets automatically loaded memory whenever another target needs value. cloud-based dynamic files (e.g. format = \"file\" repository = \"aws\"), memory strategy applies temporary local copy file: \"persistent\" means remains end pipeline deleted, \"transient\" means gets deleted soon possible. former conserves bandwidth, latter conserves local storage. garbage_collection Logical, whether run base::gc() just target runs. deployment Character length 1. deployment \"main\", target run central controlling R process. Otherwise, deployment \"worker\" set pipeline distributed/parallel computing, target runs parallel worker. distributed/parallel computing targets, please visit https://books.ropensci.org/targets/crew.html. priority Numeric length 1 0 1. Controls targets get deployed first multiple competing targets ready simultaneously. Targets priorities closer 1 get dispatched earlier (polled earlier tar_make_future()). resources Object returned tar_resources() optional settings high-performance computing functionality, alternative data storage formats, optional capabilities targets. See tar_resources() details. storage Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's return value sent back host machine saved/uploaded locally. \"worker\": worker saves/uploads value. \"none\": almost never recommended. niche situations, e.g. data needs loaded explicitly another language. use , return value target totally ignored target ends, downstream target still attempts load data file (except retrieval = \"none\"). select storage = \"none\", return value target's command ignored, data saved automatically. dynamic files (format = \"file\") responsibility user write data store inside target. distinguishing feature storage = \"none\" (opposed format = \"file\") general case, downstream targets automatically try load data data store dependency. corollary, storage = \"none\" completely unnecessary format \"file\". retrieval Character length 1, relevant tar_make_clustermq() tar_make_future(). Must one following values: \"main\": target's dependencies loaded host machine sent worker target runs. \"worker\": worker loads targets dependencies. \"none\": dependencies loaded . choice almost never recommended. niche situations, e.g. data needs loaded explicitly another language. cue optional object tar_cue() customize rules decide whether target date. description Character length 1, custom free-form human-readable text description target. Descriptions appear target labels functions like tar_manifest() tar_visnetwork(), let select subsets targets names argument functions like tar_make(). example, tar_manifest(names = tar_described_as(starts_with(\"survival model\"))) lists targets whose descriptions start character string \"survival model\".","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a terra SpatVector target — tar_terra_vect","text":"target class \"tar_stem\" use target pipeline","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a terra SpatVector target — tar_terra_vect","text":"iteration argument unavailable hard-coded \"list\", option works currently. Although may pass supported GDAL vector driver filetype argument, formats guaranteed work geotargets. moment, tested GeoJSON ESRI Shapefile appear work generally.","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tar_terra_vect.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a terra SpatVector target — tar_terra_vect","text":"","code":"if (Sys.getenv(\"TAR_LONG_EXAMPLES\") == \"true\") { targets::tar_dir({ # tar_dir() runs code from a temporary directory. targets::tar_script({ lux_area <- function(projection = \"EPSG:4326\") { terra::project( terra::vect(system.file(\"ex\", \"lux.shp\", package = \"terra\" )), projection ) } list( geotargets::tar_terra_vect( terra_vect_example, lux_area() ) ) }) targets::tar_make() x <- targets::tar_read(terra_vect_example) }) }"},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper functions to create tiles — tile_grid","title":"Helper functions to create tiles — tile_grid","text":"Wrappers around terra::getTileExtents() return list named numeric vectors describing extents tiles rather SpatExtent objects. may general use, intended primarily supplying tile_fun argument tar_terra_tiles().","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper functions to create tiles — tile_grid","text":"","code":"tile_grid(raster, ncol, nrow) tile_blocksize(raster) tile_n(raster, n)"},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper functions to create tiles — tile_grid","text":"raster SpatRaster object ncol integer; number columns split SpatRaster nrow integer; number rows split SpatRaster n integer; total number tiles split SpatRaster ","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper functions to create tiles — tile_grid","text":"list named numeric vectors xmin, xmax, ymin, ymax values can coerced SpatExtent objects terra::ext().","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Helper functions to create tiles — tile_grid","text":"tile_blocksize() creates extents using raster's native blocksize (see terra::fileBlocksize()), memory efficient. tile_grid() allows specification number rows columns split raster . E.g. nrow = 2 ncol = 2 create 4 tiles (specifies 2x2 matrix, 4 elements).","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Helper functions to create tiles — tile_grid","text":"Eric Scott","code":""},{"path":"https://njtierney.github.io/geotargets/reference/tile_helpers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper functions to create tiles — tile_grid","text":"","code":"f <- system.file(\"ex/elev.tif\", package=\"terra\") r <- terra::rast(f) tile_grid(r, ncol = 2, nrow = 2) #> [[1]] #> xmin xmax ymin ymax #> 5.741667 6.141667 49.816667 50.191667 #> #> [[2]] #> xmin xmax ymin ymax #> 6.133333 6.533333 49.816667 50.191667 #> #> [[3]] #> xmin xmax ymin ymax #> 5.741667 6.141667 49.441667 49.816667 #> #> [[4]] #> xmin xmax ymin ymax #> 6.133333 6.533333 49.441667 49.816667 #> tile_blocksize(r) #> [[1]] #> xmin xmax ymin ymax #> 5.741667 6.533333 49.833333 50.191667 #> #> [[2]] #> xmin xmax ymin ymax #> 5.741667 6.533333 49.475000 49.833333 #> #> [[3]] #> xmin xmax ymin ymax #> 5.741667 6.533333 49.441667 49.475000 #> tile_n(r, 8) #> creating 2 * 4 = 8 tile extents #> [[1]] #> xmin xmax ymin ymax #> 5.741667 5.941667 49.816667 50.191667 #> #> [[2]] #> xmin xmax ymin ymax #> 5.941667 6.133333 49.816667 50.191667 #> #> [[3]] #> xmin xmax ymin ymax #> 6.141667 6.333333 49.816667 50.191667 #> #> [[4]] #> xmin xmax ymin ymax #> 6.333333 6.533333 49.816667 50.191667 #> #> [[5]] #> xmin xmax ymin ymax #> 5.741667 5.941667 49.441667 49.816667 #> #> [[6]] #> xmin xmax ymin ymax #> 5.941667 6.133333 49.441667 49.816667 #> #> [[7]] #> xmin xmax ymin ymax #> 6.141667 6.333333 49.441667 49.816667 #> #> [[8]] #> xmin xmax ymin ymax #> 6.333333 6.533333 49.441667 49.816667 #> if (FALSE) { # \\dontrun{ #usage with tar_terra_tiles list( tar_terra_rast( my_map, terra::rast(system.file(\"ex/logo.tif\", package = \"terra\")) ), tar_terra_tiles( name = rast_split, raster = my_map, tile_fun = tile_blocksize ), tar_terra_tiles( name = rast_split_grid, raster = my_map, tile_fun = \\(x) tile_grid(x, ncol = 2, nrow = 2) ), tar_terra_tiles( name = rast_split_n, raster = my_map, tile_fun = \\(x) tile_n(x, n = 6) ) ) } # }"},{"path":"https://njtierney.github.io/geotargets/news/index.html","id":"geotargets-development-version","dir":"Changelog","previous_headings":"","what":"geotargets (development version)","title":"geotargets (development version)","text":"Created tar_stars() tar_stars_proxy() create stars stars_proxy objects, respectively. Created tar_terra_tiles(), “target factory” splitting raster multiple tiles dynamic branching (#69). Created two helper functions use tar_terra_tiles(): tile_grid(), tile_n(), tile_blocksize() (#69, #86, #87, #89). Created utility function set_window() mostly internal use within tar_terra_tiles(). Removes iteration argument tar_*() functions. iteration now hard-coded \"list\" since option works (now least). Added description argument tar_*() functions passed tar_target().","code":""},{"path":"https://njtierney.github.io/geotargets/news/index.html","id":"geotargets-010-14-may-2024","dir":"Changelog","previous_headings":"","what":"geotargets 0.1.0 (14 May 2024)","title":"geotargets 0.1.0 (14 May 2024)","text":"Created tar_terra_rast() tar_terra_vect() targets create SpatRaster SpatVector objects, respectively Created tar_terra_sprc() creates SpatRasterCollection object. geotargets_options_get() geotargets_options_set() can used set get options specific geotargets. geotargets now requires targets version 1.7.0 higher fixed bug resources supplied tar_terra_*() ignored (#66)","code":""}] diff --git a/sitemap.xml b/sitemap.xml index 521cd6e..69f5cce 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -12,6 +12,7 @@ https://njtierney.github.io/geotargets/reference/set_window.html https://njtierney.github.io/geotargets/reference/tar_stars.html https://njtierney.github.io/geotargets/reference/tar_terra_rast.html +https://njtierney.github.io/geotargets/reference/tar_terra_sds.html https://njtierney.github.io/geotargets/reference/tar_terra_sprc.html https://njtierney.github.io/geotargets/reference/tar_terra_tiles.html https://njtierney.github.io/geotargets/reference/tar_terra_vect.html