##' QGIS Algorithm provided by SAGA Next Gen Set coordinate reference system (sagang:setcoordinatereferencesystem). ---------------- Arguments ---------------- CRS_METHOD: Get CRS Definition from... Default value: 0 Argument type: enum Available values: - 0: (0) Proj4 Parameters - 1: (1) EPSG Code - 2: (2) Well Known Text File Acceptable values: - Number of selected option, e.g. '1' - Comma separated list of options, e.g. '1,3' CRS_PROJ4: Proj4 Parameters Default value: Argument type: string Acceptable values: - String value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression CRS_FILE: Well Known Text File Default value: False Argument type: file Acceptable values: - Path to a file CRS_EPSG: Authority Code Default value: -1 Argument type: number Acceptable values: - A numeric value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression CRS_EPSG_AUTH: Authority Default value: EPSG Argument type: string Acceptable values: - String value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression GRIDS: Grids (optional) Argument type: multilayer GRIDS_OUT: Grids Argument type: rasterDestination Acceptable values: - Path for new raster layer SHAPES: Shapes (optional) Argument type: multilayer SHAPES_OUT: Shapes Argument type: vectorDestination Acceptable values: - Path for new vector layer
##'
##' @title QGIS algorithm - Set coordinate reference system
##'
##' @param CRS_METHOD `enum` of `("(0) Proj4 Parameters", "(1) EPSG Code", "(2) Well Known Text File")` - Get CRS Definition from.... Number of selected option, e.g. '1'. Comma separated list of options, e.g. '1,3'.
##' @param CRS_PROJ4 `string` - Proj4 Parameters. String value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param CRS_FILE `file` - Well Known Text File. Path to a file.
##' @param CRS_EPSG `number` - Authority Code. A numeric value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param CRS_EPSG_AUTH `string` - Authority. String value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
##' @param GRIDS `multilayer` - Grids. .
##' @param GRIDS_OUT `rasterDestination` - Grids. Path for new raster layer.
##' @param SHAPES `multilayer` - Shapes. .
##' @param SHAPES_OUT `vectorDestination` - Shapes. Path for new vector layer.
##' @param ... further parameters passed to `qgisprocess::qgis_run_algorithm()`
##' @param .complete_output logical specifying if complete out of `qgisprocess::qgis_run_algorithm()` should be used (`TRUE`) or first output (most likely the main) should read (`FALSE`). Default value is `TRUE`.
##' @param .quiet logical specifying if parameter `.quiet` for `qgisprocess::qgis_run_algorithm()` Default value is `TRUE`.
##' @param .messages logical specifying if messages from `qgisprocess::qgis_run_algorithm()` should be printed (`TRUE`) or not (`FALSE`). Default value is `FALSE`.
##'
##' @details
##' ## Outputs description
##' * GRIDS_OUT - outputRaster - Grids
##' * SHAPES_OUT - outputVector - Shapes
##'
##'
##' @export
##' @md
##' @importFrom qgisprocess qgis_run_algorithm
sagang_setcoordinatereferencesystem <- function(CRS_METHOD = qgisprocess:::qgis_default_value(), CRS_PROJ4 = qgisprocess:::qgis_default_value(), CRS_FILE = qgisprocess:::qgis_default_value(), CRS_EPSG = qgisprocess:::qgis_default_value(), CRS_EPSG_AUTH = qgisprocess:::qgis_default_value(), GRIDS = qgisprocess:::qgis_default_value(), GRIDS_OUT = qgisprocess:::qgis_default_value(), SHAPES = qgisprocess:::qgis_default_value(), SHAPES_OUT = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {
check_algorithm_necessities("sagang:setcoordinatereferencesystem")
if (.messages){
output <- qgisprocess::qgis_run_algorithm("sagang:setcoordinatereferencesystem", `CRS_METHOD` = CRS_METHOD, `CRS_PROJ4` = CRS_PROJ4, `CRS_FILE` = CRS_FILE, `CRS_EPSG` = CRS_EPSG, `CRS_EPSG_AUTH` = CRS_EPSG_AUTH, `GRIDS` = GRIDS, `GRIDS_OUT` = GRIDS_OUT, `SHAPES` = SHAPES, `SHAPES_OUT` = SHAPES_OUT,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("sagang:setcoordinatereferencesystem", `CRS_METHOD` = CRS_METHOD, `CRS_PROJ4` = CRS_PROJ4, `CRS_FILE` = CRS_FILE, `CRS_EPSG` = CRS_EPSG, `CRS_EPSG_AUTH` = CRS_EPSG_AUTH, `GRIDS` = GRIDS, `GRIDS_OUT` = GRIDS_OUT, `SHAPES` = SHAPES, `SHAPES_OUT` = SHAPES_OUT,..., .quiet = .quiet)
)
}
if (.complete_output) {
return(output)
}
else{
qgisprocess::qgis_extract_output(output, "GRIDS_OUT")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.