Description Usage Arguments Value Examples
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.
1 | qgis_meancoordinates(input, output, weight = NA, category = NA)
|
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 |
simple feature, geojson, or shapefile
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.