Skip to content

Commit

Permalink
docs: more guidance for big layers
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Jul 1, 2024
1 parent b02034a commit 6953056
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 9 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
SystemRequirements: C++11, GDAL (>= 2.0.1), GEOS (>= 3.4.0), PROJ (>=
4.8.0)
Remotes:
Remotes:
eblondel/ows4R
27 changes: 23 additions & 4 deletions R/layers.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#' @param reduce_layers whether to reduce output layers to a single `sf` object.
#' @param ... additional vendor parameter arguments passed to
#' [`ows4R::GetFeature()`](https://docs.geoserver.org/stable/en/user/services/wfs/reference.html#getfeature).# nolint
#' For example, including `count=1` returns the first available feature.
#' For example, including `count = 1` returns the first available feature.
#' Or `outputFormat = "CSV"` (or `outputFormat = "JSON"`) might help downloading
#' bigger datasets.
#' @return If `reduce_layers = FALSE` (default), a list of `sf`
#' objects, one element for each layer. Any layers for which download was
#' unsuccessful will be NULL. If `reduce_layers = TRUE`, all layers are
Expand All @@ -37,8 +39,7 @@
#' an `sf` out of a single layer request instead of a list of length 1.
#' @export
#'
#' @examples
#' \dontrun{
#' @examplesIf interactive()
#' # Layers as character vector
#' emodnet_get_layers(
#' service = "biology",
Expand All @@ -58,7 +59,25 @@
#' layers = "mediseh_zostera_m_pnt",
#' count = 1
#' )
#' }
#'
#' # Usage of csv output
#' data <- emodnet_get_layers(
#' service = "biology_occurrence_data",
#' layers = "abiotic_observations",
#' outputFormat = "CSV"
#' )
#' str(data[["abiotic_observations"]])
#'
#' @section Big downloads:
#'
#' If a layer is really big (like `"abiotic_observations"` of the
#' `"biology_occurrence_data"` service),
#' you might consider a combination of these ideas:
#' - using [`outputFormat = "CSV"`](https://docs.geoserver.org/stable/en/user/services/wfs/reference.html#getfeature);

Check warning on line 76 in R/layers.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/layers.R,line=76,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 118 characters.
#' - filtering using [`cql_filters`](https://emodnet.github.io/EMODnetWFS/articles/ecql_filtering.html) or

Check warning on line 77 in R/layers.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/layers.R,line=77,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 106 characters.
#' [bounding boxes](https://emodnet.github.io/EMODnetWFS/articles/request-params.html#limit-spatial-extent-using-a-boundary-box)

Check warning on line 78 in R/layers.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/layers.R,line=78,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 128 characters.
#' (possibly splitting the area of interests into several requests);
#' - Using [EMODnet's download toolbox](https://emodnet.ec.europa.eu/geoviewer/).

Check warning on line 80 in R/layers.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/layers.R,line=80,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 81 characters.
emodnet_get_layers <- function(wfs = NULL,
service = NULL,
service_version = NULL,
Expand Down
31 changes: 28 additions & 3 deletions man/emodnet_get_layers.Rd

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

0 comments on commit 6953056

Please sign in to comment.