Have you tried the saga -> resampling inside qgis ? A.
Il mer 8 lug 2020, 18:50 Federico Gianoli <[email protected]> ha scritto: > Dear all, > > I'm looking for a function to resample a raster from 300m to 1km by > considering the mean value of pixels that are not "No Data", as GDAL Warp > does. > But, in case the majority of values within the 3x3 kernel of the 300m > raster are "No data", "No data" will be assigned to the resampled pixel, > which is not included in the above mentioned GDAL tool. > I tried to explain the request here: > https://gis.stackexchange.com/questions/366978/how-to-resample-a-raster-considering-a-minimum-number-of-valid-pixels]. > Apparently, neither QGIS nor Gdal have the possibility to make this control > on the values during the resampling. Do you know if there is an automatic > way to do this? > In order to solve this problem, I have done this script > https://gist.github.com/fgianoli/46a45c5fe042a952580947a282feedc1 to > create a mask to check my results. But I'm experiencing this error at the > end of the process, and I don't understand if my code is wrong or is a qgis > setting: (I'm running version 3.14 under Win10): > > NameError: free variable 'self' referenced before assignment in enclosing > scope > Traceback (most recent call last): > File > "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", > line 201, in on_complete > self.feedback.reportError( > NameError: free variable 'self' referenced before assignment in enclosing > scope > > > > Any suggestions? > Many thanks and kind regards, > > Federico > _______________________________________________ > QGIS-Developer mailing list > [email protected] > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
