Beispiel #1
0
 def getBandGradation(self, bandNo):
     '''
     Return list of categories of raster's band
     '''
     try:
         res = self.bandgradation[bandNo]
     except KeyError:
         band = self.getBand(bandNo)
         res = get_gradations(band.compressed())
         self.bandgradation[bandNo] = res
     return res
Beispiel #2
0
 def getBandGradation(self, bandNo):
     '''
     Return list of categories of raster's band
     '''
     try:
         res = self.bandgradation[bandNo]
     except KeyError:
         band = self.getBand(bandNo)
         res = get_gradations(band.compressed())
         self.bandgradation[bandNo] = res
     return res
Beispiel #3
0
 def getBandStat(self, bandNo):
     '''
     Return mean and std of the raster's band
     '''
     band = self.getBand(bandNo)
     result = {}
     result['mean'] = np.mean(band)
     result['std']  = np.std (band)
     result['min']  = np.min (band)
     result['max']  = np.max (band)
     result['gradation'] = get_gradations(band.compressed())
     return result