##' QGIS Algorithm provided by GDAL Raster information (gdal:gdalinfo). ---------------- Arguments ---------------- INPUT: Input layer Argument type: raster Acceptable values: - Path to a raster layer MIN_MAX: Force computation of the actual min/max values for each band Default value: false Argument type: boolean Acceptable values: - 1 for true/yes - 0 for false/no - 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 STATS: Read and display image statistics (force computation if necessary) Default value: false Argument type: boolean Acceptable values: - 1 for true/yes - 0 for false/no - 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 NOGCP: Suppress GCP info Default value: false Argument type: boolean Acceptable values: - 1 for true/yes - 0 for false/no - 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 NO_METADATA: Suppress metadata info Default value: false Argument type: boolean Acceptable values: - 1 for true/yes - 0 for false/no - 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 EXTRA: Additional command-line parameters (optional) 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 OUTPUT: Layer information Argument type: fileDestination Acceptable values: - Path for new file
##'
##' @title QGIS algorithm - Raster information
##'
##' @param INPUT `raster` - Input layer. Path to a raster layer.
##' @param MIN_MAX `boolean` - Force computation of the actual min\code{/}max values for each band. 1 for true/yes. 0 for false/no. 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 STATS `boolean` - Read and display image statistics (force computation if necessary). 1 for true/yes. 0 for false/no. 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 NOGCP `boolean` - Suppress GCP info. 1 for true/yes. 0 for false/no. 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 NO_METADATA `boolean` - Suppress metadata info. 1 for true/yes. 0 for false/no. 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 EXTRA `string` - Additional command-line 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 OUTPUT `fileDestination` - Layer information. Path for new file.
##' @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
##' * OUTPUT - outputHtml - Layer information
##'
##'
##' @export
##' @md
##' @importFrom qgisprocess qgis_run_algorithm
gdal_gdalinfo <- function(INPUT = qgisprocess:::qgis_default_value(), MIN_MAX = qgisprocess:::qgis_default_value(), STATS = qgisprocess:::qgis_default_value(), NOGCP = qgisprocess:::qgis_default_value(), NO_METADATA = qgisprocess:::qgis_default_value(), EXTRA = qgisprocess:::qgis_default_value(), OUTPUT = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {
check_algorithm_necessities("gdal:gdalinfo")
if (.messages){
output <- qgisprocess::qgis_run_algorithm("gdal:gdalinfo", `INPUT` = INPUT, `MIN_MAX` = MIN_MAX, `STATS` = STATS, `NOGCP` = NOGCP, `NO_METADATA` = NO_METADATA, `EXTRA` = EXTRA, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("gdal:gdalinfo", `INPUT` = INPUT, `MIN_MAX` = MIN_MAX, `STATS` = STATS, `NOGCP` = NOGCP, `NO_METADATA` = NO_METADATA, `EXTRA` = EXTRA, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
)
}
if (.complete_output) {
return(output)
}
else{
qgisprocess::qgis_extract_output(output, "OUTPUT")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.