Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5658 closed defect (duplicate)

VRT ComputeStatistics() fails on VRTs that have rescaled values

Reported by: lpinner Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.11.0
Severity: normal Keywords: VRT
Cc:

Description

Possibly related to #5468? Is also apparent in GDAL 1.10

gdal_translate -of vrt -ot byte -scale -1 1 0 255 gdal/trunk/autotest/gcore/data/float32.tif test.vrt
gdalinfo -stats test.vrt
<snip>
Band 1 Block=20x20 Type=Byte, ColorInterp=Gray
ERROR 1: VRTSourcedRasterBand::IRasterIO() called recursively on the same band. It looks like the VRT is referencing itself.
ERROR 1: test.vrt, band 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: test.vrt, band 1: Failed to compute statistics, no valid pixels found in sampling.

Change History (3)

comment:1 by lpinner, 10 years ago

I've tried this with a number of Float32 netcdfs and tifs and get the same errors. I originally came across the issue trying to generate stretched NDVI images (data range -1 to 1) for display.

comment:2 by Even Rouault, 10 years ago

Resolution: duplicate
Status: newclosed

Yes, this is the same issue as #5468.

comment:3 by lpinner, 10 years ago

Thanks Even, I've confirmed ComputeStatistics is working for rescaled VRTs using a trunk build from Tamas' GISInternals site.

Note: See TracTickets for help on using tickets.