qgis_snappointstogrid: QGIS algorithm - Snap points to grid

View source: R/qgis_snappointstogrid.R

qgis_snappointstogridR Documentation

QGIS algorithm - Snap points to grid

Description

QGIS Algorithm provided by QGIS (native c++) Snap points to grid (native:snappointstogrid). This algorithm modifies the coordinates of geometries in a vector layer, so that all points or vertices are snapped to the closest point of the grid. If the snapped geometry cannot be calculated (or is totally collapsed) the feature's geometry will be cleared. Note that snapping to grid may generate an invalid geometry in some corner cases. Snapping can be performed on the X, Y, Z or M axis. A grid spacing of 0 for any axis will disable snapping for that axis.

Usage

qgis_snappointstogrid(
  INPUT = qgisprocess:::qgis_default_value(),
  HSPACING = qgisprocess:::qgis_default_value(),
  VSPACING = qgisprocess:::qgis_default_value(),
  ZSPACING = qgisprocess:::qgis_default_value(),
  MSPACING = qgisprocess:::qgis_default_value(),
  OUTPUT = qgisprocess:::qgis_default_value(),
  ...,
  .complete_output = .complete_output_option(),
  .quiet = .quiet_option(),
  .messages = .message_option()
)

Arguments

INPUT

source - Input layer. Path to a vector layer.

HSPACING

distance - X Grid Spacing. 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.

VSPACING

distance - Y Grid Spacing. 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.

ZSPACING

number - Z Grid Spacing. 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.

MSPACING

number - M Grid Spacing. 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.

OUTPUT

sink - Snapped. Path for new vector layer.

...

further parameters passed to qgisprocess::qgis_run_algorithm()

.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.

.quiet

logical specifying if parameter .quiet for qgisprocess::qgis_run_algorithm() Default value is TRUE.

.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 - outputVector - Snapped


JanCaha/r_package_qgis documentation built on April 4, 2024, 8:10 p.m.