Opened 11 years ago

Closed 8 years ago

#4256 closed defect (wontfix)

gdal_rasterize does not update statistics given by gdalinfo -stats

Reported by: janh Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:


When burning new values into raster bands with "gdal_rasterize", the statistics given by "gdalinfo -stats" are not updated. Attached a tif-file with all zeros burned into all four bands that gives the original values with gdalinfo -stats

Attachments (1)

test.tif (398.1 KB ) - added by janh 11 years ago.

Download all attachments as: .zip

Change History (2)

by janh, 11 years ago

Attachment: test.tif added

comment:1 by Jukka Rahkonen, 8 years ago

Resolution: wontfix
Status: newclosed

You are right. Gdal_rasterize does not care about statistics and gdalinfo -stats does not recompute statistics if they are already stored into file.

It is possible to remove the old statistics by running with -unsetstats option

Situation is not optimal because normal GDAL user can't know to be aware of possibly wrong statistics, and it odd that statistics can be created with one tool but for updating the statistics another tool must be used first for wiping the old statistics.

I am still closing the ticket as wontfix because I think that updating the statistics does not especially belong for gdal_rasterize.

BTW the attached image test.tif must be some wrong image, it is not all zeros for all the bands.

Note: See TracTickets for help on using tickets.