Changeset 15069

Show
Ignore:
Timestamp:
07/29/08 02:06:33 (4 months ago)
Author:
warmerdam
Message:

support handling nodata via pam/aux mechanisms (#2505)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.5/gdal/frmts/gtiff/geotiff.cpp

    r14842 r15069  
    956956 
    957957{ 
    958     if( pbSuccess ) 
    959         *pbSuccess = poGDS->bNoDataSet; 
    960  
    961     return poGDS->dfNoDataValue; 
     958    if( poGDS->bNoDataSet ) 
     959    { 
     960        if( pbSuccess ) 
     961            *pbSuccess = TRUE; 
     962 
     963        return poGDS->dfNoDataValue; 
     964    } 
     965    else 
     966        return GDALPamRasterBand::GetNoDataValue( pbSuccess ); 
    962967} 
    963968 
  • branches/1.5/gdal/gcore/gdalpamdataset.cpp

    r14903 r15069  
    12351235        if( poAuxBand->GetDefaultRAT() != NULL ) 
    12361236            poBand->SetDefaultRAT( poAuxBand->GetDefaultRAT() ); 
     1237 
     1238        // NoData 
     1239        int bSuccess = FALSE; 
     1240        double dfNoDataValue = poAuxBand->GetNoDataValue( &bSuccess ); 
     1241        if( bSuccess ) 
     1242            poBand->SetNoDataValue( dfNoDataValue ); 
    12371243    } 
    12381244