4 changes: 2 additions & 2 deletions src/providers/wcs/qgswcsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ QMap<int, void *> QgsWcsProvider::identify( const QgsPoint & thePoint )
// Outside the raster
for ( int i = 1; i <= bandCount(); i++ )
{
void * data = VSIMalloc( dataTypeSize( i ) );
void * data = QgsMalloc( dataTypeSize( i ) );
QgsRasterBlock::writeValue( data, dataType( i ), 0, noDataValue( i ) );
results.insert( i, data );
}
Expand Down Expand Up @@ -1708,7 +1708,7 @@ QMap<int, void *> QgsWcsProvider::identify( const QgsPoint & thePoint )
{
GDALRasterBandH gdalBand = GDALGetRasterBand( mCachedGdalDataset, i );

void * data = VSIMalloc( dataTypeSize( i ) );
void * data = QgsMalloc( dataTypeSize( i ) );
CPLErr err = GDALRasterIO( gdalBand, GF_Read, col, row, 1, 1,
data, 1, 1, ( GDALDataType ) mGdalDataType[i-1], 0, 0 );

Expand Down
30 changes: 30 additions & 0 deletions tests/testdata/raster/band3_byte_noct_epsg4326.tif.aux.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<PAMDataset>
<PAMRasterBand band="1">
<Histograms>
<HistItem>
<HistMin>-0.498046875</HistMin>
<HistMax>255.498046875</HistMax>
<BucketCount>256</BucketCount>
<IncludeOutOfRange>0</IncludeOutOfRange>
<Approximate>0</Approximate>
<HistCounts>0|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|19</HistCounts>
</HistItem>
</Histograms>
<Metadata>
<MDI key="COLOR_TABLE_RULE_RGB_0">2.000000e+00 1.280000e+02 0 255 0 255 255 0</MDI>
<MDI key="COLOR_TABLE_RULE_RGB_1">1.280000e+02 2.540000e+02 255 255 0 255 0 0</MDI>
Expand All @@ -11,6 +21,16 @@
</Metadata>
</PAMRasterBand>
<PAMRasterBand band="2">
<Histograms>
<HistItem>
<HistMin>-0.498046875</HistMin>
<HistMax>255.498046875</HistMax>
<BucketCount>256</BucketCount>
<IncludeOutOfRange>0</IncludeOutOfRange>
<Approximate>0</Approximate>
<HistCounts>0|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|19</HistCounts>
</HistItem>
</Histograms>
<Metadata>
<MDI key="COLOR_TABLE_RULE_RGB_0">2.000000e+00 1.280000e+02 0 255 0 255 255 0</MDI>
<MDI key="COLOR_TABLE_RULE_RGB_1">1.280000e+02 2.540000e+02 255 255 0 255 0 0</MDI>
Expand All @@ -22,6 +42,16 @@
</Metadata>
</PAMRasterBand>
<PAMRasterBand band="3">
<Histograms>
<HistItem>
<HistMin>-0.498046875</HistMin>
<HistMax>255.498046875</HistMax>
<BucketCount>256</BucketCount>
<IncludeOutOfRange>0</IncludeOutOfRange>
<Approximate>0</Approximate>
<HistCounts>0|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|0|0|1|0|0|1|0|1|0|0|1|0|1|0|0|1|0|0|1|19</HistCounts>
</HistItem>
</Histograms>
<Metadata>
<MDI key="COLOR_TABLE_RULE_RGB_0">2.000000e+00 1.280000e+02 0 255 0 255 255 0</MDI>
<MDI key="COLOR_TABLE_RULE_RGB_1">1.280000e+02 2.540000e+02 255 255 0 255 0 0</MDI>
Expand Down