qgis_meancoordinates: Mean Coordinate(s)

Description Usage Arguments Value Examples

Description

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 categorical attribute is selected in the category field, 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.

Usage

1
qgis_meancoordinates(input, output, weight = NA, category = NA)

Arguments

input

<chr> or simple feature object Input layer. Must be target source or simple feature

output

<chr> Destination of output file

weight

<chr> attribute can be specified as containing weights. String

category

<chr> attribute can be specified as containing categories

Value

simple feature, geojson, or shapefile

Examples

1
2
3
4
5
6
7
qgis_meancoordinates(input = 'C://Documents/Spatial/cities.geojson',
                     output = 'C://Documents/Spatial/meancoordinate.geojson',
                     weight = 'Population')

qgis_meancoordinates(input = 'C://Documents/Spatial/Counties.geojson',
                     output = 'C://Documents/Spatial/meancoordinate.geojson',
                     category = 'COUNTY_NAME')

smitty1788/mercatoR documentation built on May 14, 2019, 3:03 p.m.