sb52191

Adding the values of all the shapefiles in a folder.

Discussion created by sb52191 on Jul 8, 2013
Latest reply on Jul 8, 2013 by jamesfreddyc
Hi,
I have a folder with a number of shapefiles with binary values that I want to add all together (to see which pixels are constantly valued at 1, which are constantly valued at 0, etc.) This is easy to do in raster calculator, as you just select one of the shapefiles then add it to the next one and continue, but I would like to use python to do this automatically no matter how many shapefiles are in the folder. I was thinking of making a for loop to select the shapefiles, then add them to an empty list, and then trying to sum the list but I'm not sure what to use. Advice?

Thanks,
Scott

Outcomes