From 29fcacc01e2520d0f97f7d4d194e44abeddc4603 Mon Sep 17 00:00:00 2001 From: ircwaves Date: Tue, 4 Oct 2016 15:42:04 -0400 Subject: [PATCH] gain and offset are doubles --- GIP/gip/GeoImage.h | 4 ++-- GIP/gip/GeoRaster.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/GIP/gip/GeoImage.h b/GIP/gip/GeoImage.h index 536ae6b..61589b5 100644 --- a/GIP/gip/GeoImage.h +++ b/GIP/gip/GeoImage.h @@ -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 diff --git a/GIP/gip/GeoRaster.h b/GIP/gip/GeoRaster.h index d3d5ba9..c9ac95a 100644 --- a/GIP/gip/GeoRaster.h +++ b/GIP/gip/GeoRaster.h @@ -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