Skip to content

Commit

Permalink
fix WMS blank for classified raster with NaN, #5289
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Jun 27, 2016
1 parent 65bb7ec commit c3a5759
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mapdrawgdal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,9 @@ LoadGDALImages( GDALDatasetH hDS, int band_numbers[4], int band_count,
if( bGotNoData && pafRawData[i] == fNoDataValue )
continue;

if( CPLIsNan(pafRawData[i]) )
continue;

if( !bMinMaxSet ) {
dfScaleMin = dfScaleMax = pafRawData[i];
bMinMaxSet = TRUE;
Expand Down Expand Up @@ -1764,6 +1767,9 @@ msDrawRasterLayerGDAL_16BitClassification(
if( bGotNoData && pafRawData[i] == fNoDataValue )
continue;

if( CPLIsNan(pafRawData[i]) )
continue;

if( !bGotFirstValue ) {
fDataMin = fDataMax = pafRawData[i];
bGotFirstValue = TRUE;
Expand Down Expand Up @@ -1915,6 +1921,9 @@ msDrawRasterLayerGDAL_16BitClassification(
continue;
}

if( CPLIsNan(fRawValue) )
continue;

if(SKIP_MASK(j,i))
continue;

Expand Down

0 comments on commit c3a5759

Please sign in to comment.