Loading...
Searching...
No Matches
te::rp::GeoMosaic Class Reference

Create a mosaic from a set of geo-referenced rasters. More...

#include <GeoMosaic.h>

Inheritance diagram for te::rp::GeoMosaic:
te::rp::Algorithm

Classes

class  InputParameters
 GeoMosaic input parameters. More...
 
class  OutputParameters
 GeoMosaic output parameters. More...
 
class  ProcessedRasterInfosDataT
 

Public Member Functions

bool execute (AlgorithmOutputParameters &outputParams) _NOEXCEPT_OP(false)
 Executes the algorithm using the supplied parameters.
 
 GeoMosaic ()
 
const std::string & getErrorMessage () const
 Return the current error message if there is any.
 
bool initialize (const AlgorithmInputParameters &inputParams) _NOEXCEPT_OP(false)
 Initialize the algorithm instance making it ready for execution.
 
bool isInitialized () const
 Returns true if the algorithm instance is initialized and ready for execution.
 
void reset () _NOEXCEPT_OP(false)
 Clear all internal allocated objects and reset the algorithm to its initial state.
 
 ~GeoMosaic ()
 

Protected Types

typedef std::vector< ProcessedRasterInfosDataTProcessedRastersInfosT
 

Protected Member Functions

bool getEqualizationParams (const te::rst::Raster &inRaster, const unsigned int inRasterIndex, const std::vector< unsigned int > &inputRastersBands, ProcessedRastersInfosT &processedRastersInfos, const te::sam::rtree::Index< unsigned int > &blendedRastersInfosTree, te::gm::MultiPolygon const *const validAreaDelimiterPolPtr, const te::rst::Raster &mosaicRaster, const unsigned int mosaicCenterRasterIdx, te::gm::MultiPolygon const *const mosaicValidAreaDelimiterPolPtr, std::vector< double > &rasterMeans, std::vector< double > &rasterStdDevs, std::vector< double > &offsets, std::vector< double > &scales, std::vector< double > &newRasterMeans, std::vector< double > &newRasterStdDevs) const
 Calcule of input raster equalization parameters.
 
bool getNextRasterIndex2Process (const double &globalMosaicCenterX, const double &globalMosaicCenterY, ProcessedRastersInfosT &procRastersInfos, te::gm::MultiPolygon const *const mosaicValidAreasUnionPtr, bool &mextRasterWasFound, unsigned int &mextRasterIndex)
 Find the index of the next raster to process.
 
bool getRasterDataValidArea (const te::rst::Raster &inputRaster, const unsigned int inputRasterIdx, std::unique_ptr< te::gm::Polygon > &vAreaPolygon, std::unique_ptr< te::gm::MultiPolygon > &vAreaMultiPolygon)
 Returns the given raster valid data area.
 
bool getRasterStats (const te::rst::Raster &inRaster, const std::vector< unsigned int > &inputRastersBands, te::gm::MultiPolygon const *const validAreaDelimiterPolPtr, std::vector< double > &rasterMeans, std::vector< double > &rasterStdDevs) const
 Calcule of raster statistics.
 
void setErrorMessage (const std::string &newErrorMessage)
 Set the current error message.
 

Protected Attributes

GeoMosaic::InputParameters m_inputParameters
 Input execution parameters.
 
bool m_isInitialized
 Tells if this instance is initialized.
 

Private Attributes

std::string m_errorMessage
 Current error message.
 

Detailed Description

Create a mosaic from a set of geo-referenced rasters.

Definition at line 53 of file GeoMosaic.h.

Member Typedef Documentation

◆ ProcessedRastersInfosT

Definition at line 227 of file GeoMosaic.h.

Constructor & Destructor Documentation

◆ GeoMosaic()

te::rp::GeoMosaic::GeoMosaic ( )

◆ ~GeoMosaic()

te::rp::GeoMosaic::~GeoMosaic ( )

Member Function Documentation

◆ execute()

bool te::rp::GeoMosaic::execute ( AlgorithmOutputParameters outputParams)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

◆ getEqualizationParams()

bool te::rp::GeoMosaic::getEqualizationParams ( const te::rst::Raster inRaster,
const unsigned int  inRasterIndex,
const std::vector< unsigned int > &  inputRastersBands,
ProcessedRastersInfosT processedRastersInfos,
const te::sam::rtree::Index< unsigned int > &  blendedRastersInfosTree,
te::gm::MultiPolygon const *const  validAreaDelimiterPolPtr,
const te::rst::Raster mosaicRaster,
const unsigned int  mosaicCenterRasterIdx,
te::gm::MultiPolygon const *const  mosaicValidAreaDelimiterPolPtr,
std::vector< double > &  rasterMeans,
std::vector< double > &  rasterStdDevs,
std::vector< double > &  offsets,
std::vector< double > &  scales,
std::vector< double > &  newRasterMeans,
std::vector< double > &  newRasterStdDevs 
) const
protected

Calcule of input raster equalization parameters.

Parameters
inRasterInput raster.
inRasterIndexInput raster index.
inputRastersBandsInput raster bands to use.
processedRastersInfosCurrent processed rasters info.
blendedRastersInfosTreeA tree indexing blendedRastersInfos.
validAreaDelimiterPolPtrA pointer (or a null pointer) to the current input raster valid data area.
mosaicRasterThe mosaic raster reference.
mosaicValidAreaDelimiterPolPtrA pointer (or a null pointer) to the current mosaic raster valid data area.
rasterMeansInRaster calculated original means values.
rasterStdDevsInRaster calculated original standart deviation values.
offsetsInRaster calculated offsets to mosaic.
scalesInRaster calculated scales to mosaic.
newRasterMeansInRaster calculated new means values after merging into the mosaic.
newRasterStdDevsInRaster calculated new standart deviation values after merging into the mosaic.
mosaicCenterRasterIdxThe index of the first blended raster at the mosaic center.

◆ getErrorMessage()

const std::string & te::rp::Algorithm::getErrorMessage ( ) const
inherited

Return the current error message if there is any.

Returns
Return the current error message if there is any.

◆ getNextRasterIndex2Process()

bool te::rp::GeoMosaic::getNextRasterIndex2Process ( const double &  globalMosaicCenterX,
const double &  globalMosaicCenterY,
ProcessedRastersInfosT procRastersInfos,
te::gm::MultiPolygon const *const  mosaicValidAreasUnionPtr,
bool &  mextRasterWasFound,
unsigned int &  mextRasterIndex 
)
protected

Find the index of the next raster to process.

Parameters
globalMosaicCenterXGlobal mosaic center X.
globalMosaicCenterYGlobal mosaic center Y.
procRastersInfosGlobal processed rasters infos.
mosaicValidAreasUnionPtrCurrent blended rasters area union geometry.
mextRasterIndexThe found next raster index to process.
mextRasterWasFoundTrue if the next raster was found.
Returns
true if OK, false on errors.

◆ getRasterDataValidArea()

bool te::rp::GeoMosaic::getRasterDataValidArea ( const te::rst::Raster inputRaster,
const unsigned int  inputRasterIdx,
std::unique_ptr< te::gm::Polygon > &  vAreaPolygon,
std::unique_ptr< te::gm::MultiPolygon > &  vAreaMultiPolygon 
)
protected

Returns the given raster valid data area.

Parameters
inputRasterInput Raster to process.
inputRasterIdxInput raster index.
vAreaPolygonData valid area in a polygon form.
vAreaMultiPolygonData valid area in a multi-polygon form.
Returns
true if OK, false on errors.

◆ getRasterStats()

bool te::rp::GeoMosaic::getRasterStats ( const te::rst::Raster inRaster,
const std::vector< unsigned int > &  inputRastersBands,
te::gm::MultiPolygon const *const  validAreaDelimiterPolPtr,
std::vector< double > &  rasterMeans,
std::vector< double > &  rasterStdDevs 
) const
protected

Calcule of raster statistics.

Parameters
inputRastersBandsInput raster bands to use.
validAreaDelimiterPolPtrA pointer to a valid geometry where the raster valid data is or a null pointer to processe the entire raster.
rasterMeansOutput means values
rasterStdDevsOutput standart deviation values

◆ initialize()

bool te::rp::GeoMosaic::initialize ( const AlgorithmInputParameters inputParams)
virtual

Initialize the algorithm instance making it ready for execution.

Parameters
inputParamsInput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

◆ isInitialized()

bool te::rp::GeoMosaic::isInitialized ( ) const
virtual

Returns true if the algorithm instance is initialized and ready for execution.

Returns
true if the algorithm instance is initialized and ready for execution.

Implements te::rp::Algorithm.

◆ reset()

void te::rp::GeoMosaic::reset ( )
virtual

Clear all internal allocated objects and reset the algorithm to its initial state.

Reimplemented from te::rp::Algorithm.

◆ setErrorMessage()

void te::rp::Algorithm::setErrorMessage ( const std::string &  newErrorMessage)
protectedinherited

Set the current error message.

Parameters
newErrorMessageNew error message;

Member Data Documentation

◆ m_errorMessage

std::string te::rp::Algorithm::m_errorMessage
privateinherited

Current error message.

Definition at line 104 of file Algorithm.h.

◆ m_inputParameters

GeoMosaic::InputParameters te::rp::GeoMosaic::m_inputParameters
protected

Input execution parameters.

Definition at line 229 of file GeoMosaic.h.

◆ m_isInitialized

bool te::rp::GeoMosaic::m_isInitialized
protected

Tells if this instance is initialized.

Definition at line 231 of file GeoMosaic.h.


The documentation for this class was generated from the following file: