Skip to content

Commit

Permalink
gain and offset are doubles
Browse files Browse the repository at this point in the history
  • Loading branch information
ircwaves committed Oct 4, 2016
1 parent eacb9ad commit 29fcacc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions GIP/gip/GeoImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ namespace gip {

//! \name Multiple band convenience functions
//! Set gain for all bands
void SetGain(float gain) { for (unsigned int i=0;i<_RasterBands.size();i++) _RasterBands[i].SetGain(gain); }
void SetGain(double gain) { for (unsigned int i=0;i<_RasterBands.size();i++) _RasterBands[i].SetGain(gain); }
//! Set gain for all bands
void SetOffset(float offset) { for (unsigned int i=0;i<_RasterBands.size();i++) _RasterBands[i].SetOffset(offset); }
void SetOffset(double offset) { for (unsigned int i=0;i<_RasterBands.size();i++) _RasterBands[i].SetOffset(offset); }
//! Set for all bands
void SetUnits(std::string units) { for (unsigned int i=0;i<_RasterBands.size();i++) _RasterBands[i].SetUnits(units); }
//! Set NoData for all bands
Expand Down
8 changes: 4 additions & 4 deletions GIP/gip/GeoRaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ namespace gip {
return units;
}
//! Get gain
float Gain() const { return _GDALRasterBand->GetScale(); }
double Gain() const { return _GDALRasterBand->GetScale(); }
//! Get offset
float Offset() const { return _GDALRasterBand->GetOffset(); }
double Offset() const { return _GDALRasterBand->GetOffset(); }
//! Set Unit type
GeoRaster& SetUnits(std::string units) { _GDALRasterBand->SetUnitType(units.c_str()); return *this; }
//! Set gain
GeoRaster& SetGain(float gain) { _GDALRasterBand->SetScale(gain); return *this; }
GeoRaster& SetGain(double gain) { _GDALRasterBand->SetScale(gain); return *this; }
//! Set offset
GeoRaster& SetOffset(float offset) { _GDALRasterBand->SetOffset(offset); return *this; }
GeoRaster& SetOffset(double offset) { _GDALRasterBand->SetOffset(offset); return *this; }
//! Flag indicating if NoData value is used or not
bool NoData() const { return _NoData; }
//! Get NoDataValue
Expand Down

0 comments on commit 29fcacc

Please sign in to comment.