diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 000000000..2d19fc766 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/rcmdcheck.yml b/.github/workflows/R-CMD-check.yaml similarity index 88% rename from .github/workflows/rcmdcheck.yml rename to .github/workflows/R-CMD-check.yaml index 71f31ca0a..281cc6361 100644 --- a/.github/workflows/rcmdcheck.yml +++ b/.github/workflows/R-CMD-check.yaml @@ -9,7 +9,7 @@ on: # * is a special character in YAML so you have to quote this string - cron: "0 4 * * 0" # every week -name: rcmdcheck +name: R-CMD-check jobs: R-CMD-check: @@ -25,13 +25,14 @@ jobs: - {os: windows-latest, r: 'release'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -40,7 +41,7 @@ jobs: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - extra-repositories: "http://cran.uni-muenster.de/pebesma" + extra-repositories: "https://cran.uni-muenster.de/pebesma" - uses: r-lib/actions/setup-r-dependencies@v2 with: diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yaml similarity index 88% rename from .github/workflows/pkgdown.yml rename to .github/workflows/pkgdown.yaml index 0a77c6dd9..6838e1712 100644 --- a/.github/workflows/pkgdown.yml +++ b/.github/workflows/pkgdown.yaml @@ -22,14 +22,14 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - extra-repositories: "http://cran.uni-muenster.de/pebesma" + extra-repositories: "https://cran.uni-muenster.de/pebesma" - uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -42,7 +42,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.1 + uses: JamesIves/github-pages-deploy-action@v4.5.0 with: clean: false branch: gh-pages diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index ed6f8b37f..016a9c0f6 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -15,7 +15,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 with: @@ -31,7 +31,7 @@ jobs: covr::codecov( quiet = FALSE, clean = FALSE, - install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package") + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") ) shell: Rscript {0} @@ -44,7 +44,7 @@ jobs: - name: Upload test results if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-test-failures path: ${{ runner.temp }}/package diff --git a/DESCRIPTION b/DESCRIPTION index f34c1fe3d..f36108302 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -47,10 +47,10 @@ Suggests: OpenStreetMap, PCICt, RNetCDF (>= 1.8-2), - clue, + clue, covr, - cubble (>= 0.3.0), - cubelyr, + cubble (>= 0.3.0), + cubelyr, digest, dplyr (>= 0.7-0), exactextractr, @@ -70,7 +70,7 @@ Suggests: ncmeta (>= 0.0.3), pbapply, plm, - randomForest, + randomForest, raster, rmarkdown, sp, diff --git a/NEWS.md b/NEWS.md index 361d325cc..5666f5767 100644 --- a/NEWS.md +++ b/NEWS.md @@ -232,7 +232,7 @@ * handle `normalize_path` for choosing to `proxy`; #391 -* ignore units when there are different units accross bands of a subdataset +* ignore units when there are different units across bands of a subdataset * speed up `st_rgb()` using faster `st_apply()` approach; #315, #390 @@ -264,13 +264,13 @@ * `st_apply()` and other methods for `stars_proxy` objects handle ... ; #374 -* add `st_bbox()`, `st_crs()` methods for terra's `SpatVector` objects; https://github.com/mtennekes/tmap/issues/536 +* add `st_bbox()`, `st_crs()` methods for terra's `SpatVector` objects; https://github.com/r-tmap/tmap/issues/536 -* add `st_bbox()`, `st_crs()` and `st_as_stars()` methods for terra's `SpatRaster` objects; https://github.com/mtennekes/tmap/issues/536 +* add `st_bbox()`, `st_crs()` and `st_as_stars()` methods for terra's `SpatRaster` objects; https://github.com/r-tmap/tmap/issues/536 * allow for multi-resolution attributes in `stars_proxy` objects (e.g., all gray scale sentinel-2 bands); see vignettes 2 and 7 for examples. -* `plot()` defaults to a categorical color scale when plotting a factor variable; https://github.com/mtennekes/tmap/issues/526 +* `plot()` defaults to a categorical color scale when plotting a factor variable; https://github.com/r-tmap/tmap/issues/526 * `st_extract()` extracts space-time points if `time_column` is specified, and handles time intervals; #352 @@ -328,7 +328,7 @@ # version 0.4-3 -* fix bug in `st_as_stars.Raster`; set crs to the one assigned by raster; https://github.com/mtennekes/tmap/issues/471 +* fix bug in `st_as_stars.Raster`; set crs to the one assigned by raster; https://github.com/r-tmap/tmap/issues/471 * add `s2` to Suggests: @@ -358,7 +358,7 @@ * x/y range subsetting of `stars_proxy` objects now only reads that range, similar to how crop already did this. -* `st_warp()` preserves levels and colors; https://github.com/mtennekes/tmap/issues/429 +* `st_warp()` preserves levels and colors; https://github.com/r-tmap/tmap/issues/429 * `st_crop()` works with bounding boxes larger than the downsampled bounding box; #276 @@ -386,7 +386,7 @@ * handle full `crs` objects as `refsys` element in a spatial dimensions, rather than proj4string only -* `st_raster_type(x)` reveals the raster type of `x`; #248, https://github.com/mtennekes/tmap/issues/368 +* `st_raster_type(x)` reveals the raster type of `x`; #248, https://github.com/r-tmap/tmap/issues/368 * add `st_as_stars.OpenStreetMap()` method; #241 by @mtennekes @@ -474,7 +474,7 @@ * support for `PCICt` 360- and 365-day calendars; #29 -* remove import of `ncdf4` in favour of `RNetCDF`, now in line with practice in `ncmeta` package. Thanks to David Blodgett for motivation and testing (see #87, #94). +* remove import of `ncdf4` in favor of `RNetCDF`, now in line with practice in `ncmeta` package. Thanks to David Blodgett for motivation and testing (see #87, #94). * `st_as_sf` uses date/time column names when appropriate @@ -486,7 +486,7 @@ * depend on sf 0.7-2 -* add logz support for log-scale keys to `plot` and `image` +* add `logz` support for log-scale keys to `plot` and `image` # version 0.2-0 diff --git a/PROPOSAL.md b/PROPOSAL.md index d4be5ab42..656ed09a6 100644 --- a/PROPOSAL.md +++ b/PROPOSAL.md @@ -42,7 +42,7 @@ to finish computation within acceptable time? How can we quickly and easily develop an analysis by testing it on a small portion of the spatiotemporal datasets, before deploying it on the massive data set? How can we use pipe-based workflows or dplyr-verbs on such -data sets? How can we visualy explore high-dimensional raster data? +data sets? How can we visually explore high-dimensional raster data? Today, people use R for large spatiotemporal data, but hit limits related to usability, user interface, and scalability. The @@ -103,17 +103,17 @@ data is distributed. Relevant work outside R includes -* [GDAL](http://www.gdal.org/), in particular gdal [virtual tiles](http://www.gdal.org/gdalbuildvrt.html) for building arbitrary large grid data sets from many individual files, -* [SciDB](http://www.paradigm4.com/), an open source array database which has no spatial or temporal capabilities, but a strongly scalable architecture, and extremely flexible array manipulation methods +* [GDAL](https://gdal.org/), in particular gdal [virtual tiles](https://gdal.org/programs/gdalbuildvrt.html) for building arbitrary large grid data sets from many individual files, +* [SciDB](https://paradigm4.com/), an open source array database which has no spatial or temporal capabilities, but a strongly scalable architecture, and extremely flexible array manipulation methods * [SciDB4geo](https://github.com/appelmar/scidb4geo), a SciDB Plugin for Managing Spatial and Temporal Reference Information of Arrays, and -[SciDB4gdal](https://github.com/appelmar/scidb4geo), a GDAL driver for SciDB arrays, two activities to make SciDB databases aware of space and time -* [PostGIS Raster](http://postgis.net/docs/RT_reference.html), a raster data extension of [PostGIS](http://www.postgis.net/) -* [Rasdaman](http://www.rasdaman.com/), an array database dedicate to images, which is partially open source. +[SciDB4gdal](https://github.com/appelmar/scidb4gdal), a GDAL driver for SciDB arrays, two activities to make SciDB databases aware of space and time +* [PostGIS Raster](https://postgis.net/docs/RT_reference.html), a raster data extension of [PostGIS](https://www.postgis.net/) +* [Rasdaman](https://www.rasdaman.com/), an array database dedicate to images, which is partially open source. Since there is a definite trend that [downloading Earth observation data is no longer -feasible](http://r-spatial.org/2016/11/29/openeo.html), we will +feasible](https://r-spatial.org/2016/11/29/openeo.html), we will have to work towards solutions where the data are accessed over a web service interface. Cloud services such as AWS are starting to give access to the large remote sensing imagery archives of e.g. @@ -174,4 +174,4 @@ We will use most funding to develop the R package and web service API. Total cos ## Dissemination: -We will regularly post blogs about the project on [r-spatial.org](http://r-spatial.org/), use twitter, post to [r-sig-geo](https://stat.ethz.ch/mailman/listinfo/r-sig-geo), stackoverflow, and communicate through github issues or gitter discussion. The project will live on GitHub, in the [r-spatial](https://github.com/r-spatial/) organisation. We will work under a permissive open source license, probably LGPL-2.1. Pull requests will be encouraged. R consortium blogs will be provided at start and end. Publications in _the R Journal_ and other scientific outlets are foreseen. +We will regularly post blogs about the project on [r-spatial.org](https://r-spatial.org/), use twitter, post to [r-sig-geo](https://stat.ethz.ch/mailman/listinfo/r-sig-geo), stackoverflow, and communicate through github issues or gitter discussion. The project will live on GitHub, in the [r-spatial](https://github.com/r-spatial/) organisation. We will work under a permissive open source license, probably LGPL-2.1. Pull requests will be encouraged. R consortium blogs will be provided at start and end. Publications in _the R Journal_ and other scientific outlets are foreseen. diff --git a/R/datasets.R b/R/datasets.R index 49877cdd5..746f6ba7d 100644 --- a/R/datasets.R +++ b/R/datasets.R @@ -14,13 +14,13 @@ #' Monthly Gridded Meteorological Observations #' -#' These are the monthly observational data used for BCSD downscaling. See: http://gdo-dcp.ucllnl.org/downscaled_cmip_projections/dcpInterface.html#About for more information." ; +#' These are the monthly observational data used for BCSD downscaling. See: for more information." ; #' "Atmospheric Temperature, Air Temperature Atmosphere, Precipitation, Rain, Maximum Daily Temperature, Minimum Daily Temperature" ; #' "bcsd_obs" #' Sentinel-2 sample tile #' -#' Sentinel-2 sample tile, downloaded from https://scihub.copernicus.eu/ +#' Sentinel-2 sample tile, downloaded from #' reads the four 10-m bands: B2 (490 nm), B3 (560 nm), B4 (665 nm) and B8 (842 nm) "stars_sentinel2" diff --git a/R/mdim.R b/R/mdim.R index dae61767b..544e1bedb 100644 --- a/R/mdim.R +++ b/R/mdim.R @@ -109,7 +109,7 @@ mdim_use_bounds = function(dims, x, bnds, center = TRUE) { #' @param raster names of the raster variables (default: first two dimensions) #' @param offset integer; offset for each dimension (pixels) of sub-array to read, defaults to 0 for each dimension(requires sf >= 1.0-9) #' @param count integer; size for each dimension (pixels) of sub-array to read (default: read all); a value of NA will read the corresponding dimension entirely; counts are relative to the step size (requires sf >= 1.0-9) -#' @param step integer; step size for each dimension (pixels) of sub-aray to read; defaults to 1 for each dimension (requires sf >= 1.0-9) +#' @param step integer; step size for each dimension (pixels) of sub-array to read; defaults to 1 for each dimension (requires sf >= 1.0-9) #' @param proxy logical; return proxy object? (not functional yet) #' @param debug logical; print debug info? #' @param bounds logical or character: if \code{TRUE} tries to infer from "bounds" attribute; if character, diff --git a/R/mosaic.R b/R/mosaic.R index 627d1c340..dc3e4f604 100644 --- a/R/mosaic.R +++ b/R/mosaic.R @@ -7,7 +7,7 @@ #' @param options character; options to the gdalbuildvrt command #' @param file_ext character; file extension, determining the format used to write to (".tif" implies GeoTIFF) #' @return the stars method returns a stars object with the composite of the input; the \code{character} method returns the file name of the file with the mosaic; see also the GDAL documentation of \code{gdalbuildvrt} -#' @details the gdal function buildvrt builds a mosaic of input images; these imput images can be multi-band, but not higher-dimensional data cubes or stars objects with multiple attributes +#' @details the gdal function buildvrt builds a mosaic of input images; these input images can be multi-band, but not higher-dimensional data cubes or stars objects with multiple attributes #' #' uses \link[sf]{gdal_utils} to internally call \code{buildvrt}; no executables external to R are called. #' @export diff --git a/R/ncdf.R b/R/ncdf.R index b95c4fc16..5054e98e3 100644 --- a/R/ncdf.R +++ b/R/ncdf.R @@ -32,7 +32,7 @@ #' curvilinear coordinates if they are not supplied. #' @param eps numeric; dimension value increases are considered identical when they differ less than \code{eps} #' @param ignore_bounds logical; should bounds values for dimensions, if present, be ignored? -#' @param make_time if \code{TRUE} (the default), an atttempt is made to provide a date-time class from the "time" variable +#' @param make_time if \code{TRUE} (the default), an attempt is made to provide a date-time class from the "time" variable #' @param make_units if \code{TRUE} (the default), an attempt is made to set the units property of each variable #' @param proxy logical; if \code{TRUE}, an object of class \code{stars_proxy} is read which contains array #' metadata only; if \code{FALSE} the full array data is read in memory. If not set, defaults to \code{TRUE} @@ -45,7 +45,7 @@ #' @details #' If \code{var} is not set the first set of variables on a shared grid is used. #' -#' \code{start} and \code{count} columns of ncsub must correspond to the variable dimemsion (nrows) +#' \code{start} and \code{count} columns of ncsub must correspond to the variable dimension (nrows) #' and be valid index using \code{\link[RNetCDF]{var.get.nc}} convention (start is 1-based). If the count value #' is \code{NA} then all steps are included. Axis order must match that of the variable/s being read. #' @export diff --git a/R/plot.R b/R/plot.R index 8b7e3de51..6803786fc 100644 --- a/R/plot.R +++ b/R/plot.R @@ -49,7 +49,7 @@ kw_dflt = function(x, key.pos) { #' @param breaks numeric vector with actual color breaks, or a \code{style} name used in \link[classInt]{classIntervals}. #' @param col colors to use for grid cells, or color palette function #' @param ... further arguments: for \code{plot}, passed on to \code{image.stars}; for \code{image}, passed on to \code{image.default} or \code{rasterImage}. -#' @param key.pos numeric; side to plot a color key: 1 bottom, 2 left, 3 top, 4 right; set to \code{NULL} to omit key. Ignored if multiple columns are plotted in a single function call. Default depends on plot size, map aspect, and, if set, parameter \code{asp}. If it has lenght 2, the second value, ranging from 0 to 1, determines where the key is placed in the available space (default: 0.5, center). +#' @param key.pos numeric; side to plot a color key: 1 bottom, 2 left, 3 top, 4 right; set to \code{NULL} to omit key. Ignored if multiple columns are plotted in a single function call. Default depends on plot size, map aspect, and, if set, parameter \code{asp}. If it has length 2, the second value, ranging from 0 to 1, determines where the key is placed in the available space (default: 0.5, center). #' @param key.width amount of space reserved for width of the key (labels); relative or absolute (using lcm) #' @param key.length amount of space reserved for length of the key (labels); relative or absolute (using lcm) #' @param key.lab character; label for color key in case of multiple subplots, use \code{""} to suppress diff --git a/R/proxy.R b/R/proxy.R index 667f37c45..2c398b06d 100644 --- a/R/proxy.R +++ b/R/proxy.R @@ -332,7 +332,7 @@ st_as_stars.stars_proxy = function(.x, ..., downsample = 0, url = attr(.x, "url" ret # nocov end } else { cl = attr(.x, "call_list") - # FIXME: this means we ALLWAYS process after (possibly partial) reading; + # FIXME: this means we ALWAYS process after (possibly partial) reading; # there are cases where this is not right. Hence: # TODO: only warn when there is a reason to warn. if (!all(downsample == 0)) diff --git a/R/stars.R b/R/stars.R index 56fc82c0e..a3be28b27 100644 --- a/R/stars.R +++ b/R/stars.R @@ -166,7 +166,7 @@ pretty_cut = function(lim, n, inside = FALSE, ...) { #' @param values value(s) to populate the raster values with #' @param n the (approximate) target number of grid cells #' @param pretty logical; should cell coordinates have \link{pretty} values? -#' @param inside logical; should all cells entirely fall inside the bbox, potentially not covering it completely (\code{TRUE}), or allways cover the bbox (\code{FALSE}), or find a good approximation (\code{NA}, default)? +#' @param inside logical; should all cells entirely fall inside the bbox, potentially not covering it completely (\code{TRUE}), or always cover the bbox (\code{FALSE}), or find a good approximation (\code{NA}, default)? #' @param proxy logical; should a \code{stars_proxy} object be created? (requires gdal_create binary when sf < 1.0-6) #' @details For the \code{bbox} method: if \code{pretty} is \code{TRUE}, raster cells may extend the coordinate range of \code{.x} on all sides. If in addition to \code{nx} and \code{ny}, \code{dx} and \code{dy} are also missing, these are set to a single value computed as \code{sqrt(diff(xlim)*diff(ylim)/n)}. #' diff --git a/R/warp.R b/R/warp.R index decbf95b4..147dd3f81 100644 --- a/R/warp.R +++ b/R/warp.R @@ -22,7 +22,7 @@ default_target_grid = function(x, crs, cellsize = NA_real_, segments = NA) { envelope = if (!is.na(segments) && !has_global_longitude(x)) # FIXME: should this branch be retained? st_segmentize(envelope, st_length(st_cast(envelope, "LINESTRING"))/segments) else { - # https://github.com/mtennekes/tmap/issues/526 : + # https://github.com/r-tmap/tmap/issues/526 : old_crs = st_crs(envelope) st_crs(envelope) = NA_crs_ st_set_crs(st_segmentize(envelope, st_length(st_cast(envelope, "LINESTRING"))/segments), old_crs) diff --git a/README.Rmd b/README.Rmd index 642106d85..579f770c5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -14,7 +14,7 @@ is_online = curl::has_internet() # Spatiotemporal Arrays: Raster and Vector Datacubes -[![rcmdcheck](https://github.com/r-spatial/stars/actions/workflows/rcmdcheck.yml/badge.svg)](https://github.com/r-spatial/stars/actions/workflows/rcmdcheck.yml) +[![R-CMD-check](https://github.com/r-spatial/stars/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/stars/actions/workflows/R-CMD-check.yaml) [![CRAN](https://www.r-pkg.org/badges/version/stars)](https://cran.r-project.org/package=stars) [![cran checks](https://badges.cranchecks.info/worst/stars.svg)](https://cran.r-project.org/web/checks/check_results_stars.html) [![Downloads](https://cranlogs.r-pkg.org/badges/stars?color=brightgreen)](https://www.r-pkg.org/pkg/stars) @@ -43,7 +43,7 @@ dimensions represent spatial raster dimensions, and the third time (or band), as e.g. shown here: ```{r cube1,out.width='50%',echo=FALSE} -knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/master/images/cube1.png") +knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/main/images/cube1.png") ``` By data cubes however we also consider higher-dimensional cubes @@ -51,7 +51,7 @@ By data cubes however we also consider higher-dimensional cubes time, spectral band and sensor form dimensions: ```{r cube2,out.width='50%',echo=FALSE} -knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/master/images/cube2.png") +knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/main/images/cube2.png") ``` or lower-dimensional cubes such as a raster image: @@ -105,13 +105,13 @@ plot(st_geometry((r5)), main = "curvilinear") Vector data cubes arise when we do not have two regularly discretized spatial dimensions, but a single dimension that points to distinct spatial feature geometries, such as polygons (e.g. denoting administrative regions): ```{r cube3,out.width='50%',echo=FALSE} -knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/master/images/cube3.png") +knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/main/images/cube3.png") ``` or points (e.g. denoting sensor locations): ```{r cube4,out.width='50%',echo=FALSE} -knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/master/images/cube4.png") +knitr::include_graphics("https://raw.githubusercontent.com/r-spatial/stars/main/images/cube4.png") ``` NetCDF's CF-convention calls this a [discrete axis](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#discrete-axis). @@ -206,7 +206,7 @@ a.cb |> ## Other packages for data cubes -### [`gdalcubes`](https://github.com/appelmar/gdalcubes_R/) +### [`gdalcubes`](https://github.com/appelmar/gdalcubes) Package `gdalcubes` can be used to create data cubes (or functions from them) from image collections, sets of multi-band images with @@ -221,7 +221,7 @@ and does this by resampling and/or aggregating over space and/or time. It reuses GDAL VRT's and gdalwarp for spatial resampling and/or warping, and handles temporal resampling or aggregation itself. -### [`ncdfgeom`](https://github.com/USGS-R/ncdfgeom) +### [`ncdfgeom`](https://github.com/DOI-USGS/ncdfgeom) `ncdfgeom` reads and writes vector data cubes from and to netcdf files in a standards-compliant way. @@ -249,10 +249,10 @@ A comment on the differences between `stars` and `terra` is found ## Other `stars` resources: * blog posts: [first](https://r-spatial.org/r/2017/11/23/stars1.html), -[second](https://www.r-spatial.org/r/2018/03/22/stars2.html), -[third](https://www.r-spatial.org/r/2018/03/23/stars3.html), and [newer blog posts](https://www.r-spatial.org/) +[second](https://r-spatial.org/r/2018/03/22/stars2.html), +[third](https://r-spatial.org/r/2018/03/23/stars3.html), and [newer blog posts](https://r-spatial.org/) * [vignettes](https://r-spatial.github.io/stars/articles/) -* the original [R Consortium proposal](https://github.com/edzer/stars/blob/master/PROPOSAL.md). +* the original [R Consortium proposal](https://github.com/r-spatial/stars/blob/main/PROPOSAL.md). ### Acknowledgment diff --git a/README.md b/README.md index 1d5cc6972..5126d54e4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ -[![rcmdcheck](https://github.com/r-spatial/stars/actions/workflows/rcmdcheck.yml/badge.svg)](https://github.com/r-spatial/stars/actions/workflows/rcmdcheck.yml) +[![R-CMD-check](https://github.com/r-spatial/stars/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/stars/actions/workflows/R-CMD-check.yaml) [![CRAN](https://www.r-pkg.org/badges/version/stars)](https://cran.r-project.org/package=stars) [![cran checks](https://badges.cranchecks.info/worst/stars.svg)](https://cran.r-project.org/web/checks/check_results_stars.html) @@ -16,12 +16,12 @@ coverage](https://codecov.io/gh/r-spatial/stars/branch/main/graph/badge.svg)](ht Spatiotemporal data often comes in the form of dense arrays, with space and time being array dimensions. Examples include - - socio-economic or demographic data, - - environmental variables monitored at fixed stations, - - raster maps - - time series of satellite images with multiple spectral bands, - - spatial simulations, and - - climate or weather model output. +- socio-economic or demographic data, +- environmental variables monitored at fixed stations, +- raster maps +- time series of satellite images with multiple spectral bands, +- spatial simulations, and +- climate or weather model output. This R package provides classes and methods for reading, manipulating, plotting and writing such data cubes, to the extent that there are @@ -33,13 +33,13 @@ The canonical data cube most of us have in mind is that where two dimensions represent spatial raster dimensions, and the third time (or band), as e.g. shown here: - + By data cubes however we also consider higher-dimensional cubes (hypercubes) such as a five-dimensional cube where in addition to time, spectral band and sensor form dimensions: - + or lower-dimensional cubes such as a raster image: @@ -48,7 +48,7 @@ suppressPackageStartupMessages(library(dplyr)) library(stars) # Loading required package: abind # Loading required package: sf -# Linking to GEOS 3.11.1, GDAL 3.6.4, PROJ 9.1.1; sf_use_s2() is TRUE +# Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE tif = system.file("tif/L7_ETMs.tif", package = "stars") read_stars(tif) |> slice(index = 1, along = "band") |> @@ -68,11 +68,11 @@ spatial dimensions, but a single dimension that points to distinct spatial feature geometries, such as polygons (e.g. denoting administrative regions): - + or points (e.g. denoting sensor locations): - + NetCDF’s CF-convention calls this a [discrete axis](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#discrete-axis). @@ -135,10 +135,10 @@ prec_file = system.file("nc/test_stageiv_xyt.nc", package = "stars") # Max. # Total_precipitation_surface... [kg/m^2] 163.75 # dimension(s): -# from to offset delta refsys -# x 1 87 NA NA WGS 84 -# y 1 118 NA NA WGS 84 -# time 1 23 2018-09-13 19:00:00 UTC 1 hours POSIXct +# from to offset delta refsys +# x 1 87 NA NA WGS 84 (CRS84) +# y 1 118 NA NA WGS 84 (CRS84) +# time 1 23 2018-09-13 19:00:00 UTC 1 hours POSIXct # values x/y # x [87x118] -80.61 [°],...,-74.88 [°] [x] # y [87x118] 32.44 [°],...,37.62 [°] [y] @@ -212,29 +212,31 @@ a.cb |> # Caused by warning in `min()`: # ! no non-missing arguments to min; returning Inf # ℹ Run `dplyr::last_dplyr_warnings()` to see the 83 remaining warnings. -# Warning: Removed 966 rows containing missing values (`geom_glyph_box()`). -# Warning: Removed 966 rows containing missing values (`geom_glyph()`). +# Warning: Removed 966 rows containing missing values or values outside the scale range +# (`geom_glyph_box()`). +# Warning: Removed 966 rows containing missing values or values outside the scale range +# (`geom_glyph()`). ``` ![](man/figures/README-plot6-1.png) ## Other packages for data cubes -### [`gdalcubes`](https://github.com/appelmar/gdalcubes_R/) +### [`gdalcubes`](https://github.com/appelmar/gdalcubes) Package `gdalcubes` can be used to create data cubes (or functions from them) from image collections, sets of multi-band images with varying - - spatial resolution - - spatial extent - - coordinate reference systems (e.g., spread over multiple UTM zones) - - observation times +- spatial resolution +- spatial extent +- coordinate reference systems (e.g., spread over multiple UTM zones) +- observation times and does this by resampling and/or aggregating over space and/or time. It reuses GDAL VRT’s and gdalwarp for spatial resampling and/or warping, and handles temporal resampling or aggregation itself. -### [`ncdfgeom`](https://github.com/USGS-R/ncdfgeom) +### [`ncdfgeom`](https://github.com/DOI-USGS/ncdfgeom) `ncdfgeom` reads and writes vector data cubes from and to netcdf files in a standards-compliant way. @@ -245,11 +247,11 @@ Packages `raster` and its successor, `terra` are powerful packages for handling raster maps and stacks of raster maps both in memory and on disk, but do not address - - non-raster time series, - - multi-attribute rasters time series - - rasters with mixed type attributes (e.g., numeric, logical, factor, - POSIXct) - - rectilinear or curvilinear rasters +- non-raster time series, +- multi-attribute rasters time series +- rasters with mixed type attributes (e.g., numeric, logical, factor, + POSIXct) +- rectilinear or curvilinear rasters A list of `stars` commands matching existing `raster` commands is found in this @@ -262,13 +264,13 @@ A comment on the differences between `stars` and `terra` is found ## Other `stars` resources: - - blog posts: [first](https://r-spatial.org/r/2017/11/23/stars1.html), - [second](https://www.r-spatial.org/r/2018/03/22/stars2.html), - [third](https://www.r-spatial.org/r/2018/03/23/stars3.html), and - [newer blog posts](https://www.r-spatial.org/) - - [vignettes](https://r-spatial.github.io/stars/articles/) - - the original [R Consortium - proposal](https://github.com/edzer/stars/blob/master/PROPOSAL.md). +- blog posts: [first](https://r-spatial.org/r/2017/11/23/stars1.html), + [second](https://r-spatial.org/r/2018/03/22/stars2.html), + [third](https://r-spatial.org/r/2018/03/23/stars3.html), and + [newer blog posts](https://r-spatial.org/) +- [vignettes](https://r-spatial.github.io/stars/articles/) +- the original [R Consortium + proposal](https://github.com/r-spatial/stars/blob/main/PROPOSAL.md). ### Acknowledgment diff --git a/documents/stars.tex b/documents/stars.tex index 3ce410ea8..e79828fe7 100644 --- a/documents/stars.tex +++ b/documents/stars.tex @@ -124,29 +124,29 @@ \subsubsection*{Existing work}\label{existing-work} \begin{itemize} \tightlist \item - \href{http://www.gdal.org/}{GDAL}, in particular gdal - \href{http://www.gdal.org/gdalbuildvrt.html}{virtual tiles} for + \href{https://gdal.org/}{GDAL}, in particular gdal + \href{https://gdal.org/programs/gdalbuildvrt.html}{virtual tiles} for building arbitrary large grid data sets from many individual files, \item - \href{http://www.paradigm4.com/}{SciDB}, an open source array database + \href{https://www.paradigm4.com/}{SciDB}, an open source array database which has no spatial or temporal capabilities, but a strongly scalable architecture, and extremely flexible array manipulation methods \item \href{https://github.com/appelmar/scidb4geo}{SciDB4geo}, a SciDB Plugin for Managing Spatial and Temporal Reference Information of - Arrays, and \href{https://github.com/appelmar/scidb4geo}{SciDB4gdal}, + Arrays, and \href{https://github.com/appelmar/scidb4gdal}{SciDB4gdal}, a GDAL driver for SciDB arrays, two activities to make SciDB databases aware of space and time \item - \href{http://postgis.net/docs/RT_reference.html}{PostGIS Raster}, a - raster data extension of \href{http://www.postgis.net/}{PostGIS} + \href{https://postgis.net/docs/RT_reference.html}{PostGIS Raster}, a + raster data extension of \href{https://www.postgis.net/}{PostGIS} \item - \href{http://www.rasdaman.com/}{Rasdaman}, an array database dedicate + \href{https://www.rasdaman.com/}{Rasdaman}, an array database dedicate to images, which is partially open source. \end{itemize} Since there is a definite trend that -\href{http://r-spatial.org/2016/11/29/openeo.html}{downloading Earth +\href{https://r-spatial.org/2016/11/29/openeo.html}{downloading Earth observation data is no longer feasible}, we will have to work towards solutions where the data are accessed over a web service interface. Cloud services such as AWS are starting to give access to the large @@ -259,7 +259,7 @@ \subsection*{How Can The ISC Help:}\label{how-can-the-isc-help} \subsection*{Dissemination:}\label{dissemination} We will regularly post blogs about the project on -\href{http://r-spatial.org/}{r-spatial.org}, use twitter, post to +\href{https://r-spatial.org/}{r-spatial.org}, use twitter, post to \href{https://stat.ethz.ch/mailman/listinfo/r-sig-geo}{r-sig-geo}, stackoverflow, and communicate through github issues or gitter discussion. The project will live on GitHub, in the diff --git a/documents/stars_data.md b/documents/stars_data.md index 7514e9db6..6a1717fe7 100644 --- a/documents/stars_data.md +++ b/documents/stars_data.md @@ -30,7 +30,7 @@ with 57000 tiles coverng the Earth: All Sentinel data is freely [downloadable](https://scihub.copernicus.eu/). -The [openEO](http://r-spatial.org/2016/11/29/openeo.html) blog further sketches the current situation. The [stars](https://github.com/r-spatial/stars) R consortium funded project creates client and middleware software for this problem. To test, evaluate and demonstrate the stars software (and demonstrate R provides a viable solution for these problems), a demonstrator backend is needed. This backend will serve moderately large data (up to 4 Tb) of different types (including spatiotemporal NetCDF model computations, and Landsat and Sentinel satellite imagery), and will be publicly available to evaluate and test the stars software for remote computing on large imagery. +The [openEO](https://r-spatial.org/2016/11/29/openeo.html) blog further sketches the current situation. The [stars](https://github.com/r-spatial/stars) R consortium funded project creates client and middleware software for this problem. To test, evaluate and demonstrate the stars software (and demonstrate R provides a viable solution for these problems), a demonstrator backend is needed. This backend will serve moderately large data (up to 4 Tb) of different types (including spatiotemporal NetCDF model computations, and Landsat and Sentinel satellite imagery), and will be publicly available to evaluate and test the stars software for remote computing on large imagery. ### Existing work @@ -38,7 +38,7 @@ R packages, as distributed over CRAN and/or github, are not suitable for distrib Two examples from data repositories for (amonst others) R users are the [global administrative data](http://gadm.org/) and the [global climate data](http://www.worldclim.org/), both set up by Robert Hijmans (author of [raster](https://cran.r-project.org/package=raster)) and co-workers. The latter has led to a publication which received over 11,000 citations, mainly from users of the dataset. -The [rOpenSci](http://ropensci.org/) project has also developed several packages for downloading geoscientific data, for instance [rnoaa](https://cran.r-project.org/package=rnoaa), but these all allow download - a useful ability that no longer scales. +The [rOpenSci](https://ropensci.org/) project has also developed several packages for downloading geoscientific data, for instance [rnoaa](https://cran.r-project.org/package=rnoaa), but these all allow download - a useful ability that no longer scales. As mentioned, [Google Earth Engine](https://earthengine.google.com/) provides remote processing on Tb-Pb sized dateset, but is not open source, and hence to some extent a black box. In addition, users have limited control over which data it serves, and which software it runs (e.g., it has a python interface but does not allow using numpy) @@ -81,5 +81,5 @@ We will use most funding for cloud deployment, and to develop the R package. Tot ## Dissemination: -We will regularly post blogs about the project on [r-spatial.org](http://r-spatial.org/), use twitter, post to [r-sig-geo](https://stat.ethz.ch/mailman/listinfo/r-sig-geo), stackoverflow, and communicate through github issues or gitter discussion. The project will live on GitHub, in the [r-spatial](https://github.com/r-spatial/) organisation. We will work under a permissive open source license, probably dual GPL + MIT. Pull requests will be encouraged. R consortium blogs will be provided at start and end. Publications in _the R Journal_ or other scientific outlets are foreseen. +We will regularly post blogs about the project on [r-spatial.org](https://r-spatial.org/), use twitter, post to [r-sig-geo](https://stat.ethz.ch/mailman/listinfo/r-sig-geo), stackoverflow, and communicate through github issues or gitter discussion. The project will live on GitHub, in the [r-spatial](https://github.com/r-spatial/) organisation. We will work under a permissive open source license, probably dual GPL + MIT. Pull requests will be encouraged. R consortium blogs will be provided at start and end. Publications in _the R Journal_ or other scientific outlets are foreseen. diff --git a/inst/docker/rdevel/Dockerfile b/inst/docker/rdevel/Dockerfile index 186130f98..6eab7f1b3 100644 --- a/inst/docker/rdevel/Dockerfile +++ b/inst/docker/rdevel/Dockerfile @@ -7,7 +7,7 @@ MAINTAINER "edzerpebesma" edzer.pebesma@uni-muenster.de RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable -RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/ " >> /etc/apt/sources.list +RUN echo "deb https://cran.rstudio.com/bin/linux/ubuntu xenial/ " >> /etc/apt/sources.list RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 RUN apt-get update diff --git a/inst/docker/trusty/Dockerfile b/inst/docker/trusty/Dockerfile index e259a1339..e5b3bcd58 100644 --- a/inst/docker/trusty/Dockerfile +++ b/inst/docker/trusty/Dockerfile @@ -7,7 +7,7 @@ MAINTAINER "edzerpebesma" edzer.pebesma@uni-muenster.de RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable -RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/ " >> /etc/apt/sources.list +RUN echo "deb https://cran.rstudio.com/bin/linux/ubuntu trusty/ " >> /etc/apt/sources.list RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 RUN apt-get update diff --git a/inst/docker/ubuntu/Dockerfile b/inst/docker/ubuntu/Dockerfile index 2f6e3beb4..520ebf5dc 100644 --- a/inst/docker/ubuntu/Dockerfile +++ b/inst/docker/ubuntu/Dockerfile @@ -7,7 +7,7 @@ MAINTAINER "edzerpebesma" edzer.pebesma@uni-muenster.de RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable -RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/ " >> /etc/apt/sources.list +RUN echo "deb https://cran.rstudio.com/bin/linux/ubuntu xenial/ " >> /etc/apt/sources.list RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 RUN apt-get update diff --git a/man/bcsd_obs.Rd b/man/bcsd_obs.Rd index 2ae4d4b68..09c57deb6 100644 --- a/man/bcsd_obs.Rd +++ b/man/bcsd_obs.Rd @@ -11,7 +11,7 @@ An object of class \code{stars_proxy} (inherits from \code{stars}) of dimension bcsd_obs } \description{ -These are the monthly observational data used for BCSD downscaling. See: http://gdo-dcp.ucllnl.org/downscaled_cmip_projections/dcpInterface.html#About for more information." ; +These are the monthly observational data used for BCSD downscaling. See: for more information." ; "Atmospheric Temperature, Air Temperature Atmosphere, Precipitation, Rain, Maximum Daily Temperature, Minimum Daily Temperature" ; } \keyword{datasets} diff --git a/man/figures/README-plot1-1.png b/man/figures/README-plot1-1.png index 88df98dde..a35e0588a 100644 Binary files a/man/figures/README-plot1-1.png and b/man/figures/README-plot1-1.png differ diff --git a/man/figures/README-plot2-1.png b/man/figures/README-plot2-1.png index a3b6ee5eb..723622d4f 100644 Binary files a/man/figures/README-plot2-1.png and b/man/figures/README-plot2-1.png differ diff --git a/man/figures/README-plot3-1.png b/man/figures/README-plot3-1.png index 827ddd398..4d92edf73 100644 Binary files a/man/figures/README-plot3-1.png and b/man/figures/README-plot3-1.png differ diff --git a/man/figures/README-plot4-1.png b/man/figures/README-plot4-1.png index 89c87a5a6..f176e22c4 100644 Binary files a/man/figures/README-plot4-1.png and b/man/figures/README-plot4-1.png differ diff --git a/man/figures/README-plot5-1.png b/man/figures/README-plot5-1.png index 8dcf7bfa2..c0d060bb7 100644 Binary files a/man/figures/README-plot5-1.png and b/man/figures/README-plot5-1.png differ diff --git a/man/figures/README-plot6-1.png b/man/figures/README-plot6-1.png index cb3653fe1..17835bf11 100644 Binary files a/man/figures/README-plot6-1.png and b/man/figures/README-plot6-1.png differ diff --git a/man/mdim.Rd b/man/mdim.Rd index 9856ca3a8..dfe3e3f44 100644 --- a/man/mdim.Rd +++ b/man/mdim.Rd @@ -46,7 +46,7 @@ write_mdim( \item{count}{integer; size for each dimension (pixels) of sub-array to read (default: read all); a value of NA will read the corresponding dimension entirely; counts are relative to the step size (requires sf >= 1.0-9)} -\item{step}{integer; step size for each dimension (pixels) of sub-aray to read; defaults to 1 for each dimension (requires sf >= 1.0-9)} +\item{step}{integer; step size for each dimension (pixels) of sub-array to read; defaults to 1 for each dimension (requires sf >= 1.0-9)} \item{proxy}{logical; return proxy object? (not functional yet)} diff --git a/man/plot.Rd b/man/plot.Rd index 5e76370cb..46b706d95 100644 --- a/man/plot.Rd +++ b/man/plot.Rd @@ -83,7 +83,7 @@ \item{col}{colors to use for grid cells, or color palette function} -\item{key.pos}{numeric; side to plot a color key: 1 bottom, 2 left, 3 top, 4 right; set to \code{NULL} to omit key. Ignored if multiple columns are plotted in a single function call. Default depends on plot size, map aspect, and, if set, parameter \code{asp}. If it has lenght 2, the second value, ranging from 0 to 1, determines where the key is placed in the available space (default: 0.5, center).} +\item{key.pos}{numeric; side to plot a color key: 1 bottom, 2 left, 3 top, 4 right; set to \code{NULL} to omit key. Ignored if multiple columns are plotted in a single function call. Default depends on plot size, map aspect, and, if set, parameter \code{asp}. If it has length 2, the second value, ranging from 0 to 1, determines where the key is placed in the available space (default: 0.5, center).} \item{key.width}{amount of space reserved for width of the key (labels); relative or absolute (using lcm)} diff --git a/man/read_ncdf.Rd b/man/read_ncdf.Rd index be2d05a44..ae5000992 100644 --- a/man/read_ncdf.Rd +++ b/man/read_ncdf.Rd @@ -35,7 +35,7 @@ curvilinear coordinates if they are not supplied.} \item{ignore_bounds}{logical; should bounds values for dimensions, if present, be ignored?} -\item{make_time}{if \code{TRUE} (the default), an atttempt is made to provide a date-time class from the "time" variable} +\item{make_time}{if \code{TRUE} (the default), an attempt is made to provide a date-time class from the "time" variable} \item{make_units}{if \code{TRUE} (the default), an attempt is made to set the units property of each variable} @@ -69,7 +69,7 @@ that order. If \code{var} is not set the first set of variables on a shared grid is used. -\code{start} and \code{count} columns of ncsub must correspond to the variable dimemsion (nrows) +\code{start} and \code{count} columns of ncsub must correspond to the variable dimension (nrows) and be valid index using \code{\link[RNetCDF]{var.get.nc}} convention (start is 1-based). If the count value is \code{NA} then all steps are included. Axis order must match that of the variable/s being read. } diff --git a/man/st_as_stars.Rd b/man/st_as_stars.Rd index cbcd01f56..bb93006b5 100644 --- a/man/st_as_stars.Rd +++ b/man/st_as_stars.Rd @@ -105,7 +105,7 @@ passed on to \code{\link{read_ncdf}}.} \item{pretty}{logical; should cell coordinates have \link{pretty} values?} -\item{inside}{logical; should all cells entirely fall inside the bbox, potentially not covering it completely (\code{TRUE}), or allways cover the bbox (\code{FALSE}), or find a good approximation (\code{NA}, default)?} +\item{inside}{logical; should all cells entirely fall inside the bbox, potentially not covering it completely (\code{TRUE}), or always cover the bbox (\code{FALSE}), or find a good approximation (\code{NA}, default)?} \item{nz}{integer; number of cells in z direction; if missing no z-dimension is created.} diff --git a/man/st_mosaic.Rd b/man/st_mosaic.Rd index 402897b1f..143b7a561 100644 --- a/man/st_mosaic.Rd +++ b/man/st_mosaic.Rd @@ -51,7 +51,7 @@ the stars method returns a stars object with the composite of the input; the \co build mosaic (composite) of several spatially disjoint stars objects } \details{ -the gdal function buildvrt builds a mosaic of input images; these imput images can be multi-band, but not higher-dimensional data cubes or stars objects with multiple attributes +the gdal function buildvrt builds a mosaic of input images; these input images can be multi-band, but not higher-dimensional data cubes or stars objects with multiple attributes uses \link[sf]{gdal_utils} to internally call \code{buildvrt}; no executables external to R are called. } diff --git a/man/stars_sentinel2.Rd b/man/stars_sentinel2.Rd index eacb93642..e2ae28317 100644 --- a/man/stars_sentinel2.Rd +++ b/man/stars_sentinel2.Rd @@ -11,7 +11,7 @@ An object of class \code{stars_proxy} (inherits from \code{stars}) of dimension stars_sentinel2 } \description{ -Sentinel-2 sample tile, downloaded from https://scihub.copernicus.eu/ +Sentinel-2 sample tile, downloaded from reads the four 10-m bands: B2 (490 nm), B3 (560 nm), B4 (665 nm) and B8 (842 nm) } \keyword{datasets} diff --git a/tests/testthat/test-OpenStreetMap.R b/tests/testthat/test-OpenStreetMap.R new file mode 100644 index 000000000..7f48e4173 --- /dev/null +++ b/tests/testthat/test-OpenStreetMap.R @@ -0,0 +1,7 @@ +test_that("st_as_stars.OpenStreetMap works", { + skip_on_cran() + skip_if_not_installed("OpenStreetMap") + m = OpenStreetMap::openmap(c(52,7.3),c(52.1,7.15), type = "osm") + s = st_as_stars(m) + expect_s3_class(s, "stars") +}) diff --git a/tests/testthat/test_cubble.R b/tests/testthat/test-cubble.R similarity index 100% rename from tests/testthat/test_cubble.R rename to tests/testthat/test-cubble.R diff --git a/tests/testthat/test_gdal.R b/tests/testthat/test-gdal.R similarity index 100% rename from tests/testthat/test_gdal.R rename to tests/testthat/test-gdal.R diff --git a/tests/testthat/test_ncdf.R b/tests/testthat/test-ncdf.R similarity index 100% rename from tests/testthat/test_ncdf.R rename to tests/testthat/test-ncdf.R diff --git a/tests/testthat/test_ncproxy.R b/tests/testthat/test-ncproxy.R similarity index 100% rename from tests/testthat/test_ncproxy.R rename to tests/testthat/test-ncproxy.R diff --git a/tests/testthat/test_rectilinear.R b/tests/testthat/test-rectilinear.R similarity index 100% rename from tests/testthat/test_rectilinear.R rename to tests/testthat/test-rectilinear.R diff --git a/tests/testthat/test_st_as_stars.R b/tests/testthat/test-stars.R similarity index 100% rename from tests/testthat/test_st_as_stars.R rename to tests/testthat/test-stars.R diff --git a/tests/testthat/test_tidy.R b/tests/testthat/test-tidyverse.R similarity index 100% rename from tests/testthat/test_tidy.R rename to tests/testthat/test-tidyverse.R diff --git a/tests/testthat/test_tile.R b/tests/testthat/test-tile.R similarity index 100% rename from tests/testthat/test_tile.R rename to tests/testthat/test-tile.R diff --git a/tests/testthat/test_osm.R b/tests/testthat/test_osm.R deleted file mode 100644 index 143b3d9ac..000000000 --- a/tests/testthat/test_osm.R +++ /dev/null @@ -1,9 +0,0 @@ -context("st_as_stars.OpenStreetMap") - -test_that("st_as_stars.OpenStreetMap works", { - skip_on_cran() - skip_if_not(require(OpenStreetMap)) - m = openmap(c(52,7.3),c(52.1,7.15), type = "osm") - s = st_as_stars(m) - expect_true(inherits(s, "stars")) -}) diff --git a/vignettes/stars1.Rmd b/vignettes/stars1.Rmd index aa574d817..ad90fec1d 100644 --- a/vignettes/stars1.Rmd +++ b/vignettes/stars1.Rmd @@ -77,7 +77,7 @@ For this particular dataset (and most other raster datasets), we see that delta `read_stars` reads all bands from a raster dataset, or optionally a subset of raster datasets, into a single `stars` array structure. While doing so, raster values (often UINT8 or UINT16) are converted to double (numeric) values, and scaled back to their original values if needed if the file encodes the scaling parameters. -The data structure `stars` is a generalisation of the `tbl_cube` found in `cubelyr`; we can convert to that by +The data structure `stars` is a generalization of the `tbl_cube` found in `cubelyr`; we can convert to that by ```{r eval=ev} library(cubelyr) as.tbl_cube(x) diff --git a/vignettes/stars4.Rmd b/vignettes/stars4.Rmd index 0dbe98aef..68c74077c 100644 --- a/vignettes/stars4.Rmd +++ b/vignettes/stars4.Rmd @@ -102,7 +102,7 @@ image(s, text_values = TRUE, axes = TRUE) we see that $(0,0)$ is the origin of the grid (grid corner), and $1$ the coordinate value increase from one index (row, col) to the next. It means that consecutive matrix columns represent grid lines, going from south to north. Grids defined this way are **regular**: grid cell size is constant everywhere. -Many actual grid datasets have y coordinates (grid rows) going from North to South (top to bottom); this is realised with a negative value for `delta`. We see that the grid origing $(0,0)$ did not change: +Many actual grid datasets have y coordinates (grid rows) going from North to South (top to bottom); this is realised with a negative value for `delta`. We see that the grid origin $(0,0)$ did not change: ```{r fig.width=4.5, fig.height=4} attr(s, "dimensions")[[2]]$delta = -1 image(s, text_values = TRUE, axes = TRUE) diff --git a/vignettes/stars7.Rmd b/vignettes/stars7.Rmd index 44cf1c853..a01df4b75 100644 --- a/vignettes/stars7.Rmd +++ b/vignettes/stars7.Rmd @@ -288,7 +288,7 @@ plot(m, add = TRUE) This comes with the rather trivial finding that land and sea can be well predicted when there are no clouds, and the less trivial finding that they can be reasonably distinguished through patchy clouds of this kind. Note that predictions of this kind are pure pixel-based: for each prediction only the spectral bands for this pixel are considered, not for instance of any neighboring pixels. -## Paralell processing +## Parallel processing Some machine learning models support multithreading by default (e.g., `ranger` and `xgboost`), but this is not the rule. R is single-threaded, but using appropriate packages we can easily parallelize the calculations, which will reduce the data processing time.