Re: [gdal-dev] removing/updating stats and histogram when editing raster

2018-12-28 Thread Dennis Gocke
Hi Even, Thanks for the quick reply. Regarding removing stats: I just noticed that the gdal_edit.py script also just removes all metadata items starting with the 'STATISTICS_'. So that's probably the way to go. For removing the histogram there is no such option in gdal_edit.py Your suggestion w

Re: [gdal-dev] removing/updating stats and histogram when editing raster

2018-12-28 Thread Even Rouault
Dennis, > Removing: > If I'm not mistaken, stats can be removed by setting the > "STATISTICS_MINIMUM", ... Metadata Items to null, or would that only work > correctly for some raster formats? > Is there a better way to remove previously computed statistics? > How to remove the histogram? In most

[gdal-dev] removing/updating stats and histogram when editing raster

2018-12-27 Thread Dennis Gocke
Hi, when you have a raster where stats and histogram have already been computed and later on you edit some pixels programmatically (GDAL C API), previously computed stats/histogram are not automatically invalidated/removed. For performance reasons it probably makes sense, that this is not done aut