Correlation between two raster using band collection statistics

3289
5
Jump to solution
07-12-2017 01:07 PM
ShirleyLi
New Contributor III

I'm using band collection statistics to calculate correlation between two kernel density rasters. But i got the following errors

ERROR 010007 : Too many arguments.usage: STACKSTATS <stack><out_data_file> {BRIEF | DETAIL} 

ERROR 010067: Error in executing grid expression.

the two rasters have same cell size. 

a little bit background: our goal is to see where two point distribution are similar or not similar. so i generate kernel density rasters from the two point layers, and run band collection statistics to calculate the correlation between the two rasters.

Any help is appreciated!

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

even with the paths scratched out, they appear very long, on some sort of network drive... can you not work on your local machine with a simple folder structure (c:\test for example) to try to rule out their location and path issues.

View solution in original post

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

you don't indicate whether you are doing this through the tool or via a script

BandCollectionStats([inRasterBand1, inRasterBand2], outStatFile, "DETAILED")

the first parameter is a list of rasters, in a workspace or their absolute paths.  Too many parameters suggests that the bands aren't enclosed in a list.  If scripting isn't the case, show the dialog prior to running or show your script

0 Kudos
ShirleyLi
New Contributor III

Hi Dan,

Thank you for your quick response. I'm using the tool and attached is a screenshot of the tool settings. I entered the path of the two rasters and where the result txt will be stored. I also checked the "compute covariance and correlation matrices" option.

0 Kudos
DanPatterson_Retired
MVP Emeritus

even with the paths scratched out, they appear very long, on some sort of network drive... can you not work on your local machine with a simple folder structure (c:\test for example) to try to rule out their location and path issues.

0 Kudos
ShirleyLi
New Contributor III

it works! i move them to a local folder with a shorter path and it ran successfully. Thank you!

0 Kudos
DanPatterson_Retired
MVP Emeritus

That is good.  My mottos... work local ...and ... the path to enlightenment is short and clean