TransWikia.com

SAGA Point Statistics for Polygons

Geographic Information Systems Asked by Roger Haston on September 25, 2020

I am running QGIS 3.10 on a MAC using Catalina (and I also tried on QGIS 3.4) and tried to run SAGA Point Statistics for Polygons. Every time I run it I get an error with it trying to create the layer.

I have:
a. taken all the spaces out of names
b. Tried almost every possible directory

But nothing works.

Ideas?

Here’s the log:

QGIS version: 3.10.5-A Coruña
QGIS code revision: 984615fe1e
Qt version: 5.12.3
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.2 b55d2125
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…
Algorithm 'Point statistics for polygons' starting…
Input parameters:
{ 'AVG ' : False, 'DEV ' : False, 'FIELDS' : 'Intake Total', 'FIELD_NAME' : 0, 'MAX ' : False, 'MIN ' : False, 'NUM ' : True, 'POINTS' : 'file:///Users/rogerhaston/Dropbox/The%20Institute/Projects/Life%20of%20Riley/Shelter%20intake%20models/Master%20Data%20for%20Project/shelter/sac%20pacfa%20va%20%20bf%20combined%20may%207.csv?type=csv&detectTypes=yes&xField=Lon&yField=Lat&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no', 'POLYGONS' : '/Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp|layername=County data joined with demo', 'STATISTICS' : '/Users/rogerhaston/Dropbox/test.shp', 'SUM ' : True, 'VAR ' : False }

shapes_polygons "Point Statistics for Polygons" -POINTS "/private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/6df0debf79ed47f4b6330c885ed98bb9/POINTS.shp" -POLYGONS "/Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp" -FIELDS "Intake Total" -FIELD_NAME 0 -SUM true -AVG false -VAR false -DEV false -MIN false -MAX false -NUM true -STATISTICS "/Users/rogerhaston/Dropbox/test.shp"
Error: no attributes in selection
Error: executing tool [Point Statistics for Polygons]
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 2.3.2

____________________________
library path: /Applications/QGIS3.10.app/Contents/Resources/aaa/
library name: libshapes_polygons
library : Polygons
tool : Point Statistics for Polygons
author : V. Olaya, O. Conrad (c) 2005, 2010
____________________________

Load shapes: /private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/6df0debf79ed47f4b6330c885ed98bb9/POINTS.shp...


Load shapes: /Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp...




Parameters


Points: POINTS
Attributes: <no attributes>
Polygons: County data joined with demo
Statistics: Statistics
Sum: yes
Mean: no
Variance: no
Deviation: no
Minimum: no
Maximum: no
Count: yes
Field Naming: variable type + original name

Execution completed in 3.99 seconds
Results:
{'STATISTICS': '/Users/rogerhaston/Dropbox/test.shp'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>/Users/rogerhaston/Dropbox/test.shp</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.
QGIS version: 3.10.5-A Coruña
QGIS code revision: 984615fe1e
Qt version: 5.12.3
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.2 b55d2125
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…
Algorithm 'Point statistics for polygons' starting…
Input parameters:
{ 'AVG ' : False, 'DEV ' : False, 'FIELDS' : 'Intake Total', 'FIELD_NAME' : 0, 'MAX ' : False, 'MIN ' : False, 'NUM ' : True, 'POINTS' : 'file:///Users/rogerhaston/Dropbox/The%20Institute/Projects/Life%20of%20Riley/Shelter%20intake%20models/Master%20Data%20for%20Project/shelter/sac%20pacfa%20va%20%20bf%20combined%20may%207.csv?type=csv&detectTypes=yes&xField=Lon&yField=Lat&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no', 'POLYGONS' : '/Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp|layername=County data joined with demo', 'STATISTICS' : 'TEMPORARY_OUTPUT', 'SUM ' : True, 'VAR ' : False }

shapes_polygons "Point Statistics for Polygons" -POINTS "/private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/30f1041231c54c7a81659facd65cf697/POINTS.shp" -POLYGONS "/Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp" -FIELDS "Intake Total" -FIELD_NAME 0 -SUM true -AVG false -VAR false -DEV false -MIN false -MAX false -NUM true -STATISTICS "/private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/6cc1dba2f8064dc48323ca2350ce3e48/STATISTICS.shp"
Error: no attributes in selection
Error: executing tool [Point Statistics for Polygons]
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 2.3.2

____________________________
library path: /Applications/QGIS3.10.app/Contents/Resources/aaa/
library name: libshapes_polygons
library : Polygons
tool : Point Statistics for Polygons
author : V. Olaya, O. Conrad (c) 2005, 2010
____________________________

Load shapes: /private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/30f1041231c54c7a81659facd65cf697/POINTS.shp...


Load shapes: /Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp...




Parameters


Points: POINTS
Attributes: <no attributes>
Polygons: County data joined with demo
Statistics: Statistics
Sum: yes
Mean: no
Variance: no
Deviation: no
Minimum: no
Maximum: no
Count: yes
Field Naming: variable type + original name

Execution completed in 4.32 seconds
Results:
{'STATISTICS': '/private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/6cc1dba2f8064dc48323ca2350ce3e48/STATISTICS.shp'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>/private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/6cc1dba2f8064dc48323ca2350ce3e48/STATISTICS.shp</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.
QGIS version: 3.10.5-A Coruña
QGIS code revision: 984615fe1e
Qt version: 5.12.3
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.2 b55d2125
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…
Algorithm 'Point statistics for polygons' starting…
Input parameters:
{ 'AVG ' : False, 'DEV ' : False, 'FIELDS' : 'Intake Total', 'FIELD_NAME' : 0, 'MAX ' : False, 'MIN ' : False, 'NUM ' : True, 'POINTS' : 'file:///Users/rogerhaston/Dropbox/The%20Institute/Projects/Life%20of%20Riley/Shelter%20intake%20models/Master%20Data%20for%20Project/shelter/sac%20pacfa%20va%20%20bf%20combined%20may%207.csv?type=csv&detectTypes=yes&xField=Lon&yField=Lat&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no', 'POLYGONS' : '/Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp|layername=County data joined with demo', 'STATISTICS' : '/Users/rogerhaston/Documents/test.shp', 'SUM ' : True, 'VAR ' : False }

shapes_polygons "Point Statistics for Polygons" -POINTS "/private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/570e08116b2a42eba7956e09d8a26674/POINTS.shp" -POLYGONS "/Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp" -FIELDS "Intake Total" -FIELD_NAME 0 -SUM true -AVG false -VAR false -DEV false -MIN false -MAX false -NUM true -STATISTICS "/Users/rogerhaston/Documents/test.shp"
Error: no attributes in selection
Error: executing tool [Point Statistics for Polygons]
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 2.3.2

____________________________
library path: /Applications/QGIS3.10.app/Contents/Resources/aaa/
library name: libshapes_polygons
library : Polygons
tool : Point Statistics for Polygons
author : V. Olaya, O. Conrad (c) 2005, 2010
____________________________

Load shapes: /private/var/folders/q5/dn3prvx1279894gq00wjmzh80000gn/T/processing_e17dc0d3ac7d452cbe81b35ece4ea034/570e08116b2a42eba7956e09d8a26674/POINTS.shp...


Load shapes: /Users/rogerhaston/Dropbox/The Institute/Projects/Life of Riley/Shelter intake models/Master Data for Project/demographic data/County data joined with demo.shp...




Parameters


Points: POINTS
Attributes: <no attributes>
Polygons: County data joined with demo
Statistics: Statistics
Sum: yes
Mean: no
Variance: no
Deviation: no
Minimum: no
Maximum: no
Count: yes
Field Naming: variable type + original name

Execution completed in 4.50 seconds
Results:
{'STATISTICS': '/Users/rogerhaston/Documents/test.shp'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>/Users/rogerhaston/Documents/test.shp</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

One Answer

Here is my two cents: You likely have imported a CSV data into QGIS through Add Delimited Layer and been trying to run the statistics tool on it. Many geoprocessing tools do not work properly on CSV layer.

Export the POINTS layer as a new shapefile, and resume working on the shapefile. (Also pay attention to the field name and datatype).


TLDR part:

First, I checked the error message Error: no attributes in selection, then noticed the attribute field name Intake Total was too long for a shapefile (length <= 10).

Then, looking up the input parameters, found there was type=csv; 'POINTS' : 'file:///Users/.../sac%20pacfa%20va%20%20bf%20combined%20may%207.csv?type=csv&detectTypes=yes&xField=Lon&yField=Lat&crs=EPSG:4326&spatialIndex=no&subsetIndex=no&watchFile=no'

Answered by Kazuhito on September 25, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP