Hi,
Receiving the error below when trying to use the pixelStats2SHP tool. I've used the tool before but can't seem to be able to get it to work so may very well be a syntax error (apologies if so). I have also tried updating my conda environment and using the new au-osgeo-lnx-env.
import rsgislib
from rsgislib import zonalstats
from rsgislib import rastergis
# calculate pixel stats to txt
inputimage = 'NDVI_19052015.tif'
inputvector = 'corn_aoi.shp'
outputvector = 'corn_stats1.shp'
zonalattributes = zonalstats.ZonalAttributes(minThreshold=0, maxThreshold=2, calcCount=False,\
calcMin=False, calcMax=False, calcMean=True, calcStdDev=True, calcMode=False, calcSum=False)
zonalstats.pixelStats2SHP(inputimage, inputvector, outputvector, zonalattributes, True, True, True, zonalstats.METHOD_POLYCONTAINSPIXELCENTER)
-
-
python ./zonal_stats.py Calculating: mean, stdDev, for pixels with values between 0 and 2.
and pixelcount for all pixels in polygon.
Could not open
Traceback (most recent call last):
File "./zonal_stats.py", line 13, in <module>
zonalstats.pixelStats2SHP(inputimage, inputvector, outputvector, zonalattributes, True, True, True, zonalstats.METHOD_POLYCONTAINSPIXELCENTER)
_zonalstats.error: Could not open