Skip to content

Commit

Permalink
current update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 1, 2023
1 parent d884003 commit 950d416
Show file tree
Hide file tree
Showing 48 changed files with 1,837 additions and 954 deletions.
Binary file modified .github/depends.Rds
Binary file not shown.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: qgis
Type: Package
Title: An extension of package "qgisprocess" providing direct R functions for QGIS functions
Version: 3.32.3.9000
Version: 3.34.0.9000
Authors@R: person(given = "Jan",
family = "Caha",
role = c("aut", "cre"),
email = "jan.caha@outlook.com",
comment = c(ORCID = "0000-0003-0165-0606"))
Maintainer: Jan Caha <jan.caha@outlook.com>
Description: An extension of package `qgisprocess` providing direct R functions for QGIS functions. Compiled against QGIS version: 3.32.3-Lima.
Description: An extension of package `qgisprocess` providing direct R functions for QGIS functions. Compiled against QGIS version: 3.34.0-Prizren.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Expand Down
11 changes: 10 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,16 @@ export(qgis_addxyfields)
export(qgis_advancedpythonfieldcalculator)
export(qgis_affinetransform)
export(qgis_aggregate)
export(qgis_alignrasters)
export(qgis_alignsingleraster)
export(qgis_angletonearest)
export(qgis_antimeridiansplit)
export(qgis_arrayoffsetlines)
export(qgis_arraytranslatedfeatures)
export(qgis_aspect)
export(qgis_assignprojection)
export(qgis_atlaslayouttopdf)
export(qgis_b3dmtogltf)
export(qgis_barplot)
export(qgis_basicstatisticsforfields)
export(qgis_batchnominatimgeocoder)
Expand All @@ -381,6 +384,7 @@ export(qgis_boundingboxes)
export(qgis_boxplot)
export(qgis_buffer)
export(qgis_bufferbym)
export(qgis_calculateexpression)
export(qgis_calculatevectoroverlaps)
export(qgis_cellstackpercentile)
export(qgis_cellstackpercentrankfromrasterlayer)
Expand Down Expand Up @@ -431,6 +435,7 @@ export(qgis_downloadgpsdata)
export(qgis_downloadvectortiles)
export(qgis_dropgeometries)
export(qgis_dropmzvalues)
export(qgis_dtmslopebasedfilter)
export(qgis_dxfexport)
export(qgis_equaltofrequency)
export(qgis_executesql)
Expand Down Expand Up @@ -476,6 +481,7 @@ export(qgis_fuzzifyrastersmallmembership)
export(qgis_generatepointspixelcentroidsalongline)
export(qgis_generatepointspixelcentroidsinsidepolygons)
export(qgis_geometrybyexpression)
export(qgis_gltftovector)
export(qgis_greaterthanfrequency)
export(qgis_heatmapkerneldensityestimation)
export(qgis_highestpositioninrasterstack)
Expand All @@ -492,7 +498,6 @@ export(qgis_joinbylocationsummary)
export(qgis_joinbynearest)
export(qgis_keepnbiggestparts)
export(qgis_kmeansclustering)
export(qgis_knearestconcavehull)
export(qgis_layertobookmarks)
export(qgis_lessthanfrequency)
export(qgis_linedensity)
Expand All @@ -511,6 +516,8 @@ export(qgis_meshexporttimeseries)
export(qgis_meshrasterize)
export(qgis_minimumboundinggeometry)
export(qgis_minimumenclosingcircle)
export(qgis_modelerrastercalc)
export(qgis_modelervirtualrastercalc)
export(qgis_multidifference)
export(qgis_multiintersection)
export(qgis_multiparttosingleparts)
Expand Down Expand Up @@ -548,6 +555,7 @@ export(qgis_randompointsinpolygons)
export(qgis_randompointsinsidepolygons)
export(qgis_randompointsonlines)
export(qgis_rasterbooleanand)
export(qgis_rastercalc)
export(qgis_rastercalculator)
export(qgis_rasterize)
export(qgis_rasterlayerhistogram)
Expand Down Expand Up @@ -631,6 +639,7 @@ export(qgis_union)
export(qgis_variabledistancebuffer)
export(qgis_vectorlayerhistogram)
export(qgis_vectorlayerscatterplot)
export(qgis_virtualrastercalc)
export(qgis_voronoipolygons)
export(qgis_wedgebuffers)
export(qgis_writevectortiles_mbtiles)
Expand Down
45 changes: 45 additions & 0 deletions R/qgis_alignrasters.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##' QGIS Algorithm provided by QGIS (native c++) Align rasters (native:alignrasters). Aligns rasters by resampling them to the same cell size and reprojecting to the same CRS.
##'
##' @title QGIS algorithm - Align rasters
##'
##' @param LAYERS `alignrasterlayers` - Input layers. .
##' @param REFERENCE_LAYER `raster` - Reference layer. Path to a raster layer.
##' @param CRS `crs` - Override reference CRS. CRS as an auth ID (e.g. 'EPSG:3111'). CRS as a PROJ4 string (e.g. 'PROJ4:…'). CRS as a WKT string (e.g. 'WKT:…'). Path to a layer. The CRS of the layer is used..
##' @param CELL_SIZE_X `number` - Override reference cell size X. 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 CELL_SIZE_Y `number` - Override reference cell size Y. 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 GRID_OFFSET_X `number` - Override reference grid offset X. 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 GRID_OFFSET_Y `number` - Override reference grid offset Y. 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 EXTENT `extent` - Clip to extent. A comma delimited string of x min, x max, y min, y max. E.g. '4,10,101,105'. Path to a layer. The extent of the layer is used..
##' @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_LAYERS - outputMultilayer - Aligned rasters
##'
##'
##' @export
##' @md
##' @importFrom qgisprocess qgis_run_algorithm

qgis_alignrasters <- function(LAYERS = qgisprocess:::qgis_default_value(), REFERENCE_LAYER = qgisprocess:::qgis_default_value(), CRS = qgisprocess:::qgis_default_value(), CELL_SIZE_X = qgisprocess:::qgis_default_value(), CELL_SIZE_Y = qgisprocess:::qgis_default_value(), GRID_OFFSET_X = qgisprocess:::qgis_default_value(), GRID_OFFSET_Y = qgisprocess:::qgis_default_value(), EXTENT = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {

check_algorithm_necessities("native:alignrasters")

if (.messages){
output <- qgisprocess::qgis_run_algorithm("native:alignrasters", `LAYERS` = LAYERS, `REFERENCE_LAYER` = REFERENCE_LAYER, `CRS` = CRS, `CELL_SIZE_X` = CELL_SIZE_X, `CELL_SIZE_Y` = CELL_SIZE_Y, `GRID_OFFSET_X` = GRID_OFFSET_X, `GRID_OFFSET_Y` = GRID_OFFSET_Y, `EXTENT` = EXTENT,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("native:alignrasters", `LAYERS` = LAYERS, `REFERENCE_LAYER` = REFERENCE_LAYER, `CRS` = CRS, `CELL_SIZE_X` = CELL_SIZE_X, `CELL_SIZE_Y` = CELL_SIZE_Y, `GRID_OFFSET_X` = GRID_OFFSET_X, `GRID_OFFSET_Y` = GRID_OFFSET_Y, `EXTENT` = EXTENT,..., .quiet = .quiet)
)
}

if (.complete_output) {
return(output)
}
else{
qgisprocess::qgis_extract_output(output, "OUTPUT_LAYERS")
}
}
48 changes: 48 additions & 0 deletions R/qgis_alignsingleraster.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
##' QGIS Algorithm provided by QGIS (native c++) Align raster (native:alignsingleraster). Aligns raster by resampling it to the same cell size and reprojecting to the same CRS as a reference raster.
##'
##' @title QGIS algorithm - Align raster
##'
##' @param INPUT `raster` - Input layer. Path to a raster layer.
##' @param RESAMPLING_METHOD `enum` of `("Nearest neighbour", "Bilinear", "Cubic", "Cubic spline", "Lanczos", "Average", "Mode", "Maximum", "Minimum", "Median", "First quartile", "Third quartile")` - Resampling method. Number of selected option, e.g. '1'. Comma separated list of options, e.g. '1,3'.
##' @param RESCALE `boolean` - Rescale values according to the cell size. 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 REFERENCE_LAYER `raster` - Reference layer. Path to a raster layer.
##' @param CRS `crs` - Override reference CRS. CRS as an auth ID (e.g. 'EPSG:3111'). CRS as a PROJ4 string (e.g. 'PROJ4:…'). CRS as a WKT string (e.g. 'WKT:…'). Path to a layer. The CRS of the layer is used..
##' @param CELL_SIZE_X `number` - Override reference cell size X. 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 CELL_SIZE_Y `number` - Override reference cell size Y. 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 GRID_OFFSET_X `number` - Override reference grid offset X. 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 GRID_OFFSET_Y `number` - Override reference grid offset Y. 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 EXTENT `extent` - Clip to extent. A comma delimited string of x min, x max, y min, y max. E.g. '4,10,101,105'. Path to a layer. The extent of the layer is used..
##' @param OUTPUT `rasterDestination` - Aligned raster. Path for new raster 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
##' * OUTPUT - outputRaster - Aligned raster
##'
##'
##' @export
##' @md
##' @importFrom qgisprocess qgis_run_algorithm

qgis_alignsingleraster <- function(INPUT = qgisprocess:::qgis_default_value(), RESAMPLING_METHOD = qgisprocess:::qgis_default_value(), RESCALE = qgisprocess:::qgis_default_value(), REFERENCE_LAYER = qgisprocess:::qgis_default_value(), CRS = qgisprocess:::qgis_default_value(), CELL_SIZE_X = qgisprocess:::qgis_default_value(), CELL_SIZE_Y = qgisprocess:::qgis_default_value(), GRID_OFFSET_X = qgisprocess:::qgis_default_value(), GRID_OFFSET_Y = qgisprocess:::qgis_default_value(), EXTENT = qgisprocess:::qgis_default_value(), OUTPUT = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {

check_algorithm_necessities("native:alignsingleraster")

if (.messages){
output <- qgisprocess::qgis_run_algorithm("native:alignsingleraster", `INPUT` = INPUT, `RESAMPLING_METHOD` = RESAMPLING_METHOD, `RESCALE` = RESCALE, `REFERENCE_LAYER` = REFERENCE_LAYER, `CRS` = CRS, `CELL_SIZE_X` = CELL_SIZE_X, `CELL_SIZE_Y` = CELL_SIZE_Y, `GRID_OFFSET_X` = GRID_OFFSET_X, `GRID_OFFSET_Y` = GRID_OFFSET_Y, `EXTENT` = EXTENT, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("native:alignsingleraster", `INPUT` = INPUT, `RESAMPLING_METHOD` = RESAMPLING_METHOD, `RESCALE` = RESCALE, `REFERENCE_LAYER` = REFERENCE_LAYER, `CRS` = CRS, `CELL_SIZE_X` = CELL_SIZE_X, `CELL_SIZE_Y` = CELL_SIZE_Y, `GRID_OFFSET_X` = GRID_OFFSET_X, `GRID_OFFSET_Y` = GRID_OFFSET_Y, `EXTENT` = EXTENT, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
)
}

if (.complete_output) {
return(output)
}
else{
qgisprocess::qgis_extract_output(output, "OUTPUT")
}
}
39 changes: 39 additions & 0 deletions R/qgis_b3dmtogltf.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
##' QGIS Algorithm provided by QGIS (native c++) Convert B3DM to GLTF (native:b3dmtogltf). Converts files from the legacy B3DM format to GLTF.
##'
##' @title QGIS algorithm - Convert B3DM to GLTF
##'
##' @param INPUT `file` - Input B3DM. Path to a file.
##' @param OUTPUT `fileDestination` - Output file. 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 - outputFile - Output file
##'
##'
##' @export
##' @md
##' @importFrom qgisprocess qgis_run_algorithm

qgis_b3dmtogltf <- function(INPUT = qgisprocess:::qgis_default_value(), OUTPUT = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {

check_algorithm_necessities("native:b3dmtogltf")

if (.messages){
output <- qgisprocess::qgis_run_algorithm("native:b3dmtogltf", `INPUT` = INPUT, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("native:b3dmtogltf", `INPUT` = INPUT, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
)
}

if (.complete_output) {
return(output)
}
else{
qgisprocess::qgis_extract_output(output, "OUTPUT")
}
}
38 changes: 38 additions & 0 deletions R/qgis_calculateexpression.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
##' QGIS Algorithm provided by QGIS (native c++) Calculate expression (native:calculateexpression). This algorithm calculates the result of a QGIS expression and makes it available for use in other parts of the model.
##'
##' @title QGIS algorithm - Calculate expression
##'
##' @param INPUT `string` - Input. 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 ... 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 - outputVariant - Value
##'
##'
##' @export
##' @md
##' @importFrom qgisprocess qgis_run_algorithm

qgis_calculateexpression <- function(INPUT = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {

check_algorithm_necessities("native:calculateexpression")

if (.messages){
output <- qgisprocess::qgis_run_algorithm("native:calculateexpression", `INPUT` = INPUT,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("native:calculateexpression", `INPUT` = INPUT,..., .quiet = .quiet)
)
}

if (.complete_output) {
return(output)
}
else{
qgisprocess::qgis_extract_output(output, "OUTPUT")
}
}
14 changes: 7 additions & 7 deletions R/qgis_concavehull.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
##' QGIS Algorithm provided by QGIS Concave hull (alpha shapes) (qgis:concavehull). Creates a concave hull using the alpha shapes algorithm. This algorithm computes the concave hull of the features in an input layer.
##' QGIS Algorithm provided by QGIS (native c++) Concave hull (native:concavehull). This algorithm computes the concave hull of the features from an input layer.
##'
##' @title QGIS algorithm - Concave hull (alpha shapes)
##' @title QGIS algorithm - Concave hull
##'
##' @param INPUT `source` - Input point layer. Path to a vector layer.
##' @param INPUT `source` - Input layer. Path to a vector layer.
##' @param ALPHA `number` - Threshold (0-1, where 1 is equivalent with Convex Hull). 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 HOLES `boolean` - Allow holes. 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_MULTIGEOMETRY `boolean` - Split multipart geometry into singleparts geometries. 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_MULTIGEOMETRY `boolean` - Split multipart geometry into singleparts. 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 OUTPUT `sink` - Concave hull. 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`.
Expand All @@ -23,13 +23,13 @@

qgis_concavehull <- function(INPUT = qgisprocess:::qgis_default_value(), ALPHA = qgisprocess:::qgis_default_value(), HOLES = qgisprocess:::qgis_default_value(), NO_MULTIGEOMETRY = qgisprocess:::qgis_default_value(), OUTPUT = qgisprocess:::qgis_default_value(),..., .complete_output = .complete_output_option(), .quiet = .quiet_option(), .messages = .message_option()) {

check_algorithm_necessities("qgis:concavehull")
check_algorithm_necessities("native:concavehull")

if (.messages){
output <- qgisprocess::qgis_run_algorithm("qgis:concavehull", `INPUT` = INPUT, `ALPHA` = ALPHA, `HOLES` = HOLES, `NO_MULTIGEOMETRY` = NO_MULTIGEOMETRY, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
output <- qgisprocess::qgis_run_algorithm("native:concavehull", `INPUT` = INPUT, `ALPHA` = ALPHA, `HOLES` = HOLES, `NO_MULTIGEOMETRY` = NO_MULTIGEOMETRY, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
} else {
suppressMessages(
output <- qgisprocess::qgis_run_algorithm("qgis:concavehull", `INPUT` = INPUT, `ALPHA` = ALPHA, `HOLES` = HOLES, `NO_MULTIGEOMETRY` = NO_MULTIGEOMETRY, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
output <- qgisprocess::qgis_run_algorithm("native:concavehull", `INPUT` = INPUT, `ALPHA` = ALPHA, `HOLES` = HOLES, `NO_MULTIGEOMETRY` = NO_MULTIGEOMETRY, `OUTPUT` = OUTPUT,..., .quiet = .quiet)
)
}

Expand Down
Loading

0 comments on commit 950d416

Please sign in to comment.