QGIS Algorithm provided by QGIS (native c++) Mean coordinate(s) (native:meancoordinates). This algorithm computes a point layer with the center of mass of geometries in an input layer. An attribute can be specified as containing weights to be applied to each feature when computing the center of mass. If an attribute is selected in the Unique ID field parameter, features will be grouped according to values in this field. Instead of a single point with the center of mass of the whole layer, the output layer will contain a center of mass for the features in each category.
qgis_meancoordinates(
INPUT = qgisprocess:::qgis_default_value(),
WEIGHT = qgisprocess:::qgis_default_value(),
UID = qgisprocess:::qgis_default_value(),
OUTPUT = qgisprocess:::qgis_default_value(),
...,
.complete_output = .complete_output_option(),
.quiet = .quiet_option(),
.messages = .message_option()
)
source
- Input layer. Path to a vector layer.
field
- Weight field. The name of an existing field. ; delimited list of existing field names.
field
- Unique ID field. The name of an existing field. ; delimited list of existing field names.
sink
- Mean coordinates. Path for new vector layer.
further parameters passed to qgisprocess::qgis_run_algorithm()
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
.
logical specifying if parameter .quiet
for qgisprocess::qgis_run_algorithm()
Default value is TRUE
.
logical specifying if messages from qgisprocess::qgis_run_algorithm()
should be printed (TRUE
) or not (FALSE
). Default value is FALSE
.