28 #include "../raster/Interpolator.h"
29 #include "../raster/Enums.h"
30 #include "../raster/RasterFactory.h"
31 #include "../raster/Grid.h"
32 #include "../raster/Band.h"
33 #include "../raster/BandProperty.h"
34 #include "../raster/PositionIterator.h"
35 #include "../raster/Utils.h"
36 #include "../memory/CachedRaster.h"
37 #include "../geometry/Envelope.h"
38 #include "../geometry/GTFactory.h"
39 #include "../geometry/Polygon.h"
40 #include "../geometry/LinearRing.h"
41 #include "../geometry/MultiPolygon.h"
42 #include "../srs/Converter.h"
73 m_feederRasterPtr = 0;
74 m_inputRastersBands.clear();
77 m_forceInputNoDataValue =
false;
79 m_autoEqualize =
true;
80 m_useRasterCache =
true;
125 m_outputRasterPtr.reset();
135 m_outputRasterPtr.reset();;
155 throw( te::rp::Exception )
167 double mosaicXResolution = 0.0;
168 double mosaicYResolution = 0.0;
169 double mosaicLLX = DBL_MAX;
170 double mosaicLLY = DBL_MAX;
171 double mosaicURX = -1.0 * DBL_MAX;
172 double mosaicURY = -1.0 * DBL_MAX;
174 std::vector< double > mosaicBandsRangeMin;
175 std::vector< double > mosaicBandsRangeMax;
177 std::vector< te::gm::Polygon > rastersBBoxes;
183 unsigned int inputRasterIdx = 0;
200 if( inputRasterIdx == 0 )
217 auxLinearRingPtr->
setPoint( 0, mosaicLLX, mosaicURY );
218 auxLinearRingPtr->
setPoint( 1, mosaicURX, mosaicURY );
219 auxLinearRingPtr->
setPoint( 2, mosaicURX, mosaicLLY );
220 auxLinearRingPtr->
setPoint( 3, mosaicLLX, mosaicLLY );
221 auxLinearRingPtr->
setPoint( 4, mosaicLLX, mosaicURY );
222 auxPolygon.
push_back( auxLinearRingPtr );
223 auxPolygon.
setSRID( mosaicSRID );
224 rastersBBoxes.push_back( auxPolygon );
254 mosaicLLX = std::min( mosaicLLX, urCoord1.
x );
255 mosaicLLX = std::min( mosaicLLX, llCoord1.
x );
257 mosaicLLY = std::min( mosaicLLY, urCoord1.
y );
258 mosaicLLY = std::min( mosaicLLY, llCoord1.
y );
260 mosaicURX = std::max( mosaicURX, urCoord1.
x );
261 mosaicURX = std::max( mosaicURX, llCoord1.
x );
263 mosaicURY = std::max( mosaicURY, urCoord1.
y );
264 mosaicURY = std::max( mosaicURY, llCoord1.
y );
270 auxLinearRingPtr->
setPoint( 0, llCoord1.
x, urCoord1.
y );
271 auxLinearRingPtr->
setPoint( 1, urCoord1.
x, urCoord1.
y );
272 auxLinearRingPtr->
setPoint( 2, urCoord1.
x, llCoord1.
y );
273 auxLinearRingPtr->
setPoint( 3, llCoord1.
x, llCoord1.
y );
274 auxLinearRingPtr->
setPoint( 4, llCoord1.
x, urCoord1.
y );
275 auxPolygon.
push_back( auxLinearRingPtr );
276 auxPolygon.
setSRID( mosaicSRID );
277 rastersBBoxes.push_back( auxPolygon );
282 for( std::vector< unsigned int >::size_type inputRastersBandsIdx = 0 ;
283 inputRastersBandsIdx <
285 ++inputRastersBandsIdx )
287 const unsigned int& currBand =
304 mosaicBandsRangeMin.resize(
306 mosaicBandsRangeMax.resize(
309 std::vector< te::rst::BandProperty* > bandsProperties;
310 for( std::vector< unsigned int >::size_type bandIdx = 0 ; bandIdx <
318 mosaicBandsRangeMin[ bandIdx ],
319 mosaicBandsRangeMax[ bandIdx ]);
324 mosaicURY ), mosaicSRID );
335 "Output raster creation error" );
340 std::auto_ptr< te::mem::CachedRaster > cachedRasterInstancePtr;
347 outputRasterPtr = cachedRasterInstancePtr.get();
358 unsigned int col = 0;
359 unsigned int row = 0;
360 unsigned int bandIdx = 0;
362 for( bandIdx = 0 ; bandIdx < nBands ; ++bandIdx )
366 for( row = 0 ; row < nRows ; ++row )
368 for( col = 0 ; col < nCols ; ++col )
379 std::vector< double > mosaicTargetMeans( outputRasterPtr->
getNumberOfBands(), 0 );
380 std::vector< double > mosaicTargetVariances( outputRasterPtr->
getNumberOfBands(), 0 );
389 double inXStartGeo = 0;
390 double inYStartGeo = 0;
392 double outRowStartDouble = 0;
393 double outColStartDouble = 0;
395 outColStartDouble, outRowStartDouble );
397 const unsigned int outRowStart = (
unsigned int)std::max( 0.0, outRowStartDouble );
398 const unsigned int outColStart = (
unsigned int)std::max( 0.0, outColStartDouble );
399 const unsigned int outRowsBound = std::min( outRowStart +
402 const unsigned int outColsBound = std::min( outColStart +
406 const unsigned int nBands = (
unsigned int)
408 unsigned int outCol = 0;
409 unsigned int outRow = 0;
412 double bandNoDataValue = -1.0 * DBL_MAX;
413 std::complex< double > pixelCValue = 0;
416 unsigned int inputBandIdx = 0;
418 for(
unsigned int inputRastersBandsIdx = 0 ; inputRastersBandsIdx <
419 nBands ; ++inputRastersBandsIdx )
422 inputRastersBandsIdx ] ;
427 (*outputRasterPtr->
getBand( inputRastersBandsIdx ));
428 unsigned int validPixelsNumber = 0;
430 double& mean = mosaicTargetMeans[ inputRastersBandsIdx ];
433 for( outRow = outRowStart ; outRow < outRowsBound ; ++outRow )
435 inRow = ((double)outRow) - outRowStartDouble;
437 for( outCol = outColStart ; outCol < outColsBound ; ++outCol )
439 inCol = ((double)outCol) - outColStartDouble;
441 interpInstance.
getValue( inCol, inRow, pixelCValue, inputBandIdx );
443 if( pixelCValue.real() != bandNoDataValue )
445 outBand.
setValue( outCol, outRow, pixelCValue );
446 mean += pixelCValue.real();
452 mean /= ( (double)validPixelsNumber );
458 double& variance = mosaicTargetVariances[ inputRastersBandsIdx ];
461 double pixelValue = 0;
463 for( outRow = outRowStart ; outRow < outRowsBound ; ++outRow )
465 for( outCol = outColStart ; outCol < outColsBound ; ++outCol )
467 outBand.
getValue( outCol, outRow, pixelValue );
471 variance += ( ( pixelValue - mean ) * ( pixelValue -
472 mean ) ) / ( (
double)validPixelsNumber );
482 "Rasters bounding boxes number mismatch" );
486 std::auto_ptr< te::gm::MultiPolygon > mosaicBBoxesUnionPtr(
489 mosaicBBoxesUnionPtr->add( (
te::gm::Polygon*)rastersBBoxes[ 0 ].clone() );
500 std::vector< unsigned int > outputRasterBands;
501 std::vector< double > dummyRasterOffsets;
502 std::vector< double > dummyRasterScales;
503 for(
unsigned int outputRasterBandsIdx = 0 ; outputRasterBandsIdx <
506 outputRasterBands.push_back( outputRasterBandsIdx );
507 dummyRasterOffsets.push_back( 0.0 );
508 dummyRasterScales.push_back( 1.0 );
516 "Invalid boxes SRID" );
522 std::auto_ptr< te::rst::Raster > reprojectedInputRasterPtr;
523 std::string reprojectedRasterFileName;
525 if( outputRaster.
getSRID() != inputRasterPtr->getSRID() )
527 char fileNameBuffer[L_tmpnam];
528 tmpnam(fileNameBuffer);
530 reprojectedRasterFileName = fileNameBuffer;
531 reprojectedRasterFileName +=
".tif";
533 std::map< std::string, std::string > rInfo;
534 rInfo[
"URI" ] = reprojectedRasterFileName;
536 reprojectedInputRasterPtr.reset( inputRasterPtr->transform(
539 inputRasterPtr = reprojectedInputRasterPtr.get();
545 std::auto_ptr< te::mem::CachedRaster > cachedInputRasterPtr;
549 *inputRasterPtr, 25, 0 ) );
550 inputRasterPtr = cachedInputRasterPtr.get();
558 std::auto_ptr< te::gm::GeometricTransformation > transPtr;
568 outputRaster.
getGrid()->
gridToGeo( auxTP.first.x, auxTP.first.y, auxX, auxY );
569 inputRasterPtr->getGrid()->geoToGrid( auxX, auxY, auxTP.second.x, auxTP.second.y );
574 outputRaster.
getGrid()->
gridToGeo( auxTP.first.x, auxTP.first.y, auxX, auxY );
575 inputRasterPtr->getGrid()->geoToGrid( auxX, auxY, auxTP.second.x, auxTP.second.y );
580 outputRaster.
getGrid()->
gridToGeo( auxTP.first.x, auxTP.first.y, auxX, auxY );
581 inputRasterPtr->getGrid()->geoToGrid( auxX, auxY, auxTP.second.x, auxTP.second.y );
586 outputRaster.
getGrid()->
gridToGeo( auxTP.first.x, auxTP.first.y, auxX, auxY );
587 inputRasterPtr->getGrid()->geoToGrid( auxX, auxY, auxTP.second.x, auxTP.second.y );
594 "Could not initialize a geometric transformation" );
599 std::vector< double > currentRasterBandsOffsets;
600 std::vector< double > currentRasterBandsScales;
604 double currentRasterVariance = 0;
605 double currentRasterMean = 0;
607 for(
unsigned int inputRastersBandsIdx = 0 ; inputRastersBandsIdx <
609 ++inputRastersBandsIdx )
612 inputRastersBandsIdx ];
618 currentRasterVariance );
620 currentRasterBandsScales.push_back( std::sqrt( mosaicTargetVariances[ inputRastersBandsIdx ] /
621 currentRasterVariance ) );
622 currentRasterBandsOffsets.push_back( mosaicTargetMeans[ inputRastersBandsIdx ] -
623 ( currentRasterBandsScales[ inputRastersBandsIdx ] * currentRasterMean ) );
628 currentRasterBandsOffsets = dummyRasterOffsets;
629 currentRasterBandsScales = dummyRasterScales;
635 for( std::size_t mosaicBBoxesUnionIdx = 0 ; mosaicBBoxesUnionIdx <
636 mosaicBBoxesUnionPtr->getNumGeometries() ; ++mosaicBBoxesUnionIdx )
640 mosaicBBoxesUnionPtr->getGeometryN( mosaicBBoxesUnionIdx ) );
646 std::auto_ptr< te::gm::MultiPolygon > overlappedResult;
649 std::auto_ptr< te::gm::Geometry > auxResultPtr(
650 rastersBBoxes[ inputRasterIdx ].intersection( mosaicBBoxesUnionElementPtr ) );
652 if( auxResultPtr.get() )
654 auxResultPtr->setSRID( mosaicBBoxesUnionElementPtr->
getSRID() );
665 auxMultiPol->
add( auxResultPtr.release() );
666 overlappedResult.reset( auxMultiPol );
673 std::auto_ptr< te::gm::MultiPolygon > overlappedResultUnderCurrentSRID;
675 if( overlappedResult.get() )
678 overlappedResult->clone() );
683 if( overlappedResult.get() )
699 currentRasterBandsOffsets,
700 currentRasterBandsScales,
701 mosaicBBoxesUnionElementPtr,
703 *transPtr ),
"Blender initiazing error" );
705 for(
unsigned int overlappedResultIdx = 0 ; overlappedResultIdx <
706 overlappedResult->getNumGeometries() ; ++overlappedResultIdx )
710 overlappedResult->getGeometryN( overlappedResultIdx ) );
716 overlappedResultUnderCurrentSRID->getGeometryN( overlappedResultIdx ) );
722 (
te::gm::Polygon const*)overlappedResult->getGeometryN( overlappedResultIdx ) );
725 (
te::gm::Polygon const*)overlappedResult->getGeometryN( overlappedResultIdx ) );
728 unsigned int outputRow = 0;
729 unsigned int outputCol = 0;
731 unsigned int outBandIdx = 0;
741 for( outBandIdx = 0 ; outBandIdx < nBands ; ++outBandIdx )
743 double& blendedValue = blendedValues[ outBandIdx ];
747 blendedValue = std::max( blendedValue ,
748 mosaicBandsRangeMin[ outBandIdx ] );
749 blendedValue = std::min( blendedValue ,
750 mosaicBandsRangeMax[ outBandIdx ] );
752 outputRaster.
setValue( outputCol, outputRow, blendedValue, outBandIdx );
764 std::auto_ptr< te::gm::MultiPolygon > nonOverlappedResult;
767 std::auto_ptr< te::gm::Geometry > auxResultPtr(
768 rastersBBoxes[ inputRasterIdx ].difference( mosaicBBoxesUnionPtr.get() ) );
770 if( auxResultPtr.get() )
772 auxResultPtr->setSRID( mosaicBBoxesUnionPtr->getSRID() );
783 auxMultiPol->
add( auxResultPtr.release() );
784 nonOverlappedResult.reset( auxMultiPol );
794 nonOverlappedResult.reset( auxMultiPol );
800 if( nonOverlappedResult.get() )
805 for(
unsigned int inputRastersBandsIdx = 0 ; inputRastersBandsIdx <
807 ++inputRastersBandsIdx )
810 inputRastersBandsIdx ];
813 double outputBandRangeMin = 0;
814 double outputBandRangeMax = 0;
816 outputBandRangeMin, outputBandRangeMax );
818 const std::size_t nonOverlappednResultSize =
819 nonOverlappedResult->getNumGeometries();
822 inputBandIdx )->getProperty()->m_noDataValue;
825 for(
unsigned int nonOverlappednResultIdx = 0 ; nonOverlappednResultIdx < nonOverlappednResultSize ;
826 ++nonOverlappednResultIdx )
830 nonOverlappedResult->getGeometryN( nonOverlappednResultIdx ) );
834 unsigned int outputRow = 0;
835 unsigned int outputCol = 0;
840 const te::rst::Grid& inputGrid = (*inputRasterPtr->getGrid());
842 std::complex< double > pixelCValue = 0;
843 double pixelValue = 0;
846 nonOverlappednResultElementPtr );
848 nonOverlappednResultElementPtr );
855 outputGrid.
gridToGeo( (
double)outputCol, (
double)outputRow, outputX, outputY );
856 inputGrid.
geoToGrid( outputX, outputY, inputCol, inputRow );
858 interpInstance.
getValue( inputCol, inputRow, pixelCValue, inputBandIdx );
860 if( pixelCValue.real() == inputBandNoDataValue )
862 outputBand.
setValue( outputCol, outputRow, outputBandNoDataValue );
866 pixelValue = pixelCValue.real() * currentRasterBandsScales[
867 inputRastersBandsIdx ] + currentRasterBandsOffsets[
868 inputRastersBandsIdx ];
869 pixelValue = std::max( pixelValue, outputBandRangeMin );
870 pixelValue = std::min( pixelValue, outputBandRangeMax );
872 outputBand.
setValue( outputCol, outputRow, pixelValue );
883 std::auto_ptr< te::gm::Geometry > boxesUnionResultPtr;
884 boxesUnionResultPtr.reset( mosaicBBoxesUnionPtr->Union(
885 &( rastersBBoxes[ inputRasterIdx ] ) ) );
887 boxesUnionResultPtr->setSRID( outputRaster.
getSRID() );
898 auxMultiPol->
add( boxesUnionResultPtr.release() );
900 mosaicBBoxesUnionPtr.reset( auxMultiPol );
909 if( cachedInputRasterPtr.get() ) cachedInputRasterPtr.reset();
913 if( reprojectedInputRasterPtr.get() )
915 reprojectedInputRasterPtr.reset();
916 remove( reprojectedRasterFileName.c_str() );
926 if( cachedRasterInstancePtr.get() ) cachedRasterInstancePtr.reset();
938 throw( te::rp::Exception )
951 "Invalid m_feederRasterPtr" )
955 "Invalid number of rasters" )
964 for( std::vector< std::vector< unsigned int > >::size_type
965 inputRastersBandsIdx = 0 ; inputRastersBandsIdx <
969 inputRastersBandsIdx ].size() > 0,
"Invalid bands number" );
973 0 ].size(),
"Bands number mismatch" );
987 const bool& forceNoDataValue,
988 const double& noDataValue,
989 double& mean,
double& variance )
994 double internalNoDataValue = 0;
995 if( forceNoDataValue )
996 internalNoDataValue = noDataValue;
1005 double pixelsNumber = 0;
1007 unsigned int col = 0;
1008 unsigned int line = 0;
1010 for( line = 0 ; line < nLines ; ++line )
1011 for( col = 0 ; col < nCols ; ++col )
1015 if( value != internalNoDataValue )
1022 if( pixelsNumber != 0.0 )
1024 mean /= pixelsNumber;
1026 for( line = 0 ; line < nLines ; ++line )
1027 for( col = 0 ; col < nCols ; ++col )
1031 if( value != internalNoDataValue )
1033 variance += ( ( value - mean ) * ( value - mean ) ) / pixelsNumber;
virtual unsigned int getObjsCount() const =0
Return the total number of feeder objects.
int m_blkh
Block height (pixels).
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
#define TERP_DEBUG_TRUE_OR_THROW(value, message)
Checks if value is true and throws an exception if not.
int getSRID() const
It returns the Spatial Reference System ID associated to this geometric object.
virtual te::rst::Raster const * getCurrentObj() const =0
Return the current sequence object.
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
virtual void setValue(unsigned int c, unsigned int r, const double value, std::size_t b=0)
Sets the attribute value in a band of a cell.
std::vector< std::vector< unsigned int > > m_inputRastersBands
Bands to process for each input raster.
unsigned int getNumberOfRows() const
Returns the raster number of rows.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
A LinearRing is a LineString that is both closed and simple.
unsigned int getRow() const
Returns the current row in iterator.
virtual unsigned int getCurrentOffset() const =0
Return the index of the current object.
bool m_isInitialized
Tells if this instance is initialized.
void setSRID(int srid)
It sets the Spatial Reference System ID of the geometry and all its parts if it is a GeometryCollecti...
GeoMosaic output parameters.
Grid * getGrid()
It returns the raster grid.
bool convert(double *xIn, double *yIn, double *xOut, double *yOut, long numCoord, int coordOffset=1) const
Converts a vector of coordinates from source SRS to target SRS.
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
static Raster * make()
It creates and returns an empty raster with default raster driver.
virtual void getValue(unsigned int c, unsigned int r, double &value) const =0
Returns the cell attribute value.
double getResolutionY() const
Returns the grid vertical (y-axis) resolution.
void getValue(const double &c, const double &r, std::complex< double > &v, const std::size_t &b)
Get the interpolated value at specific band.
int m_nblocksy
The number of blocks in y.
virtual std::size_t getNumberOfBands() const =0
Returns the number of bands (dimension of cells attribute values) in the raster.
const OutputParameters & operator=(const OutputParameters ¶ms)
te::rst::Interpolator::Method m_interpMethod
The raster interpolator method (default:NearestNeighbor).
Blended pixel value calculation for two overlaped rasters.
It interpolates one pixel based on a selected algorithm. Methods currently available are Nearest Neig...
static GeometricTransformation * make(const std::string &factoryKey)
It creates an object with the appropriated factory.
An utility struct for representing 2D coordinates.
void getBlendedValues(const double &line, const double &col, std::vector< double > &values)
Blend a pixel value using the current parameters.
static PolygonIterator begin(const te::rst::Raster *r, const te::gm::Polygon *p)
Returns an iterator referring to the first value of the band.
bool m_forceInputNoDataValue
If true, m_noDataValue will be used as the no-data value for input rasters (defalt:false).
void setTargetSRID(int targetSRID)
Sets the target SRS identifier.
void add(Geometry *g)
It adds the geometry into the collection.
#define TERP_TRUE_OR_RETURN_FALSE(value, message)
Checks if value is true. For false values a warning message will be logged and a return of context wi...
double m_noDataValue
The pixel value used where no raster data is avaliable (defaul:0).
AbstractParameters * clone() const
Create a clone copy of this instance.
int m_type
The data type of the elements in the band.
Abstract parameters base interface.
std::vector< TiePoint > m_tiePoints
Tie points.
A raster band description.
A rectified grid is the spatial support for raster data.
MultiPolygon is a MultiSurface whose elements are Polygons.
double m_lly
Lower left corner y-coordinate.
int m_blkw
Block width (pixels).
int getSRID() const
Returns the raster spatial reference system identifier.
virtual void setValue(unsigned int c, unsigned int r, const double value)=0
Sets the cell attribute value.
AbstractParameters * clone() const
Create a clone copy of this instance.
bool isInitialized() const
Returns true if the algorithm instance is initialized and ready for execution.
std::auto_ptr< te::rst::Raster > m_outputRasterPtr
The generated output mosaic raster.
double m_ury
Upper right corner y-coordinate.
te::gm::Envelope * getExtent()
Returns the geographic extension of the grid.
void clear()
It deletes all the rings of the CurvePolygon and clear it.
void setSourceSRID(int sourceSRID)
Sets the source SRS identifier.
double getResolutionX() const
Returns the grid horizontal (x-axis) resolution.
This class implements the strategy to iterate with spatial restriction, the iteration occurs inside a...
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
double m_urx
Upper right corner x-coordinate.
unsigned int getColumn() const
Returns the current column in iterator.
bool m_useRasterCache
Enable(true) or disable the use of raster caching (default:true).
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
unsigned int getNumberOfColumns() const
Returns the raster number of columns.
const Algorithm & operator=(const Algorithm &)
void setPoint(std::size_t i, const double &x, const double &y)
It sets the value of the specified point.
A raster band description.
bool m_autoEqualize
Auto equalization will be performed using the overlaped image areas (default:true).
FeederConstRaster * m_feederRasterPtr
Input rasters feeder.
double m_noDataValue
Value to indicate elements where there is no data, default is std::numeric_limits<double>::max().
virtual void reset()=0
Reset the feeder to the first position (subsequent accesses will start from the first sequence obejct...
void gridToGeo(const double &col, const double &row, double &x, double &y) const
Get the spatial location of a grid point.
#define TERP_TRUE_OR_THROW(value, message)
Checks if value is true and throws an exception if not.
A Converter is responsible for the conversion of coordinates between different Coordinate Systems (CS...
A RAM cache adaptor to an external existent raster that must always be avaliable. ...
static void calcBandStatistics(const te::rst::Band &band, const bool &forceNoDataValue, const double &noDataValue, double &mean, double &variance)
Raster band statistics calcule.
Raster Processing algorithm output parameters base interface.
double m_llx
Lower left corner x-coordinate.
int m_nblocksx
The number of blocks in x.
An abstract class for raster data strucutures.
BandProperty * getProperty()
Returns the band property.
virtual const Band * getBand(std::size_t i) const =0
Returns the raster i-th band.
Create a mosaic from a set of geo-referenced rasters.
#define TERP_LOG_AND_THROW(message)
Logs a error message and throws.
static PolygonIterator end(const te::rst::Raster *r, const te::gm::Polygon *p)
Returns an iterator referring to after the end of the iterator.
int getSRID() const
Returns the grid spatial reference system identifier.
GeoMosaic input parameters.
void reset()
Clear all internal allocated objects and reset the algorithm to its initial state.
2D Geometric transformation parameters.
std::pair< Coord2D, Coord2D > TiePoint
Tie point type definition.
const InputParameters & operator=(const InputParameters ¶ms)
An Envelope defines a 2D rectangular region.
GeoMosaic::InputParameters m_inputParameters
Input execution parameters.
Near neighborhood interpolation method.
TERASTEREXPORT void GetDataTypeRanges(const int &dataType, double &min, double &max)
Return the values range of a given data type.
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
void geoToGrid(const double &x, const double &y, double &col, double &row) const
Get the grid point associated to a spatial location.
te::rp::Blender::BlendMethod m_blendMethod
The pixel blending method (default: NoBlendMethod).
Index into a lookup table.
void push_back(Curve *ring)
It adds the curve to the curve polygon.
bool initialize(const te::rst::Raster &raster1, const std::vector< unsigned int > &raster1Bands, const te::rst::Raster &raster2, const std::vector< unsigned int > &raster2Bands, const BlendMethod &blendMethod, const te::rst::Interpolator::Method &interpMethod1, const te::rst::Interpolator::Method &interpMethod2, const double &noDataValue, const bool forceInputNoDataValue, const std::vector< double > &pixelOffsets1, const std::vector< double > &pixelScales1, const std::vector< double > &pixelOffsets2, const std::vector< double > &pixelScales2, te::gm::Polygon const *const r1ValidDataDelimiterPtr, te::gm::Polygon const *const r2ValidDataDelimiterPtr, const te::gm::GeometricTransformation &geomTransformation)
Inititate the blender instance.
te::common::AccessPolicy getAccessPolicy() const
Returns the raster access policy.
virtual bool moveNext()=0
Advances to the next sequence obeject.
Raster Processing algorithm input parameters base interface.
#define TERP_DEBUG_TRUE_OR_RETURN_FALSE(value, message)
Checks if value is true. For false values a warning message will be logged and a return of context wi...