All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::rp::GeometricRefining Class Reference

Geometric (and positioning) correction/refining of a already geo-referenced raster using a set of small reference rasters. More...

#include <GeometricRefining.h>

Inheritance diagram for te::rp::GeometricRefining:
te::rp::Algorithm

Classes

class  InputParameters
 Input parameters. More...
 
struct  InternalMatchingInfo
 Reference rasters matching info. More...
 
class  OutputParameters
 Output parameters. More...
 

Public Member Functions

bool execute (AlgorithmOutputParameters &outputParams) throw ( te::rp::Exception )
 Executes the algorithm using the supplied parameters. More...
 
 GeometricRefining ()
 
bool initialize (const AlgorithmInputParameters &inputParams) throw ( te::rp::Exception )
 Initialize the algorithm instance making it ready for execution. More...
 
bool isInitialized () const
 Returns true if the algorithm instance is initialized and ready for execution. More...
 
void reset () throw ( te::rp::Exception )
 Clear all internal allocated objects and reset the algorithm to its initial state. More...
 
 ~GeometricRefining ()
 

Protected Member Functions

void convert (const std::vector< InternalMatchingInfo > &inTiePoints, std::vector< te::gm::GTParameters::TiePoint > &outTiePoints, std::vector< double > &outTiePointsWeights) const
 Convesion from matching infor tie-points to a vector of tie-points. More...
 
bool getTPConvexHull (const std::vector< te::gm::GTParameters::TiePoint > &tiePoints, const bool useTPSecondCoordPair, std::auto_ptr< te::gm::Surface > &convexHullPtr) const
 Returns the tie points converx hull. More...
 
double getTPConvexHullArea (const std::vector< te::gm::GTParameters::TiePoint > &tiePoints, const bool useTPSecondCoordPair) const
 Returns the tie points converx hull area. More...
 
bool getTransformation (const std::vector< InternalMatchingInfo > &inTiePoints, std::auto_ptr< te::gm::GeometricTransformation > &baseGeometricTransformPtr, std::vector< te::gm::GTParameters::TiePoint > &baseTransAgreementTiePoints, double &convexHullAreaPercent) const
 Try to instantiate a valid geometric transformation following the user parameters. More...
 

Protected Attributes

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

Detailed Description

Geometric (and positioning) correction/refining of a already geo-referenced raster using a set of small reference rasters.

Note
Reference: CASTEJON, E. F. ; FONSECA, L. M. G. ; ARCANJO, J. S. . Melhoria da geometria e posicionamento de imagens orbitais de média resolução - Um experimento com dados CBERS-CCD. In: XVI Simpósio Brasileiro de Sensoriamento Remoto - SBSR, 2013, Foz do Iguaçu, PR - Brasil. Anais do XVI Simpósio Brasileiro de Sensoriamento Remoto - SBSR, 2013.

Definition at line 50 of file GeometricRefining.h.

Constructor & Destructor Documentation

te::rp::GeometricRefining::GeometricRefining ( )

Definition at line 184 of file GeometricRefining.cpp.

References reset().

te::rp::GeometricRefining::~GeometricRefining ( )

Definition at line 189 of file GeometricRefining.cpp.

Member Function Documentation

void te::rp::GeometricRefining::convert ( const std::vector< InternalMatchingInfo > &  inTiePoints,
std::vector< te::gm::GTParameters::TiePoint > &  outTiePoints,
std::vector< double > &  outTiePointsWeights 
) const
protected
bool te::rp::GeometricRefining::execute ( AlgorithmOutputParameters outputParams)
throw (te::rp::Exception
)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.

Implements te::rp::Algorithm.

Definition at line 193 of file GeometricRefining.cpp.

References te::rp::Register::execute(), te::rp::TiePointsLocator::execute(), te::rp::GeometricRefining::OutputParameters::MatchingResult::Fail, te::rst::Grid::geoToGrid(), te::rp::FeederConstRaster::getCurrentObj(), te::rp::FeederConstRaster::getCurrentOffset(), te::rst::Raster::getExtent(), te::rst::Grid::getExtent(), te::rst::Raster::getGrid(), te::gm::Envelope::getLowerLeftX(), te::gm::Envelope::getLowerLeftY(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rp::FeederConstRaster::getObjsCount(), te::rst::Raster::getResolutionX(), te::rst::Raster::getResolutionY(), te::rst::Raster::getSRID(), getTPConvexHullArea(), getTransformation(), te::gm::Envelope::getUpperRightX(), te::gm::Envelope::getUpperRightY(), te::rp::Register::initialize(), te::rp::TiePointsLocator::initialize(), te::rp::GeometricRefining::InternalMatchingInfo::m_convexHullAreaPercent, te::rp::TiePointsLocator::InputParameters::m_enableGeometryFilter, te::rp::GeometricRefining::InputParameters::m_enableMultiThread, te::rp::TiePointsLocator::InputParameters::m_enableMultiThread, te::rp::GeometricRefining::InputParameters::m_enableProgress, te::rp::TiePointsLocator::InputParameters::m_enableProgress, te::rp::GeometricRefining::InputParameters::m_enableRasterCache, te::rp::TiePointsLocator::InputParameters::m_geometryFilterAssurance, te::rp::TiePointsLocator::InputParameters::m_geomTransfMaxError, te::rp::GeometricRefining::InputParameters::m_geomTransfMaxTiePointError, te::rp::Register::InputParameters::m_geomTransfName, te::rp::GeometricRefining::InputParameters::m_geomTransfName, te::rp::TiePointsLocator::InputParameters::m_geomTransfName, te::rp::Register::InputParameters::m_geomTransfPtr, te::rp::GeometricRefining::OutputParameters::m_geomTransPtr, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inMaskRaster2Ptr, m_inputParameters, te::rp::Register::InputParameters::m_inputRasterBands, te::rp::Register::InputParameters::m_inputRasterPtr, te::rp::TiePointsLocator::InputParameters::m_inRaster1Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster1Ptr, te::rp::TiePointsLocator::InputParameters::m_inRaster2Bands, te::rp::TiePointsLocator::InputParameters::m_inRaster2Ptr, te::rp::GeometricRefining::InputParameters::m_inRasterBands2Process, te::rp::GeometricRefining::OutputParameters::m_inRasterCoveredAreaPercent, te::rp::GeometricRefining::InputParameters::m_inRasterExpectedColDisplacement, te::rp::GeometricRefining::InputParameters::m_inRasterExpectedColError, te::rp::GeometricRefining::InputParameters::m_inRasterExpectedRowDisplacement, te::rp::GeometricRefining::InputParameters::m_inRasterExpectedRowError, te::rp::GeometricRefining::InputParameters::m_inRasterPtr, te::rp::GeometricRefining::InputParameters::m_inRasterSubSectorsFactor, te::rp::GeometricRefining::InputParameters::m_inRasterTPLocationBands, te::rp::Register::InputParameters::m_interpMethod, te::rp::GeometricRefining::InputParameters::m_interpMethod, m_isInitialized, te::rp::GeometricRefining::InputParameters::m_locatorParams, te::rp::GeometricRefining::OutputParameters::m_matchingResult, te::rp::TiePointsLocator::InputParameters::m_maxR1ToR2Offset, te::rp::GeometricRefining::InputParameters::m_minrReferenceRasterCoveredAreaPercent, te::rp::GeometricRefining::InputParameters::m_minrReferenceRasterRequiredTiePointsFactor, te::rp::Register::InputParameters::m_noDataValue, te::rp::GeometricRefining::InputParameters::m_outliersRemotionAssurance, te::rp::GeometricRefining::InputParameters::m_outputNoDataValue, te::rp::Register::OutputParameters::m_outputRasterPtr, te::rp::GeometricRefining::OutputParameters::m_outputRasterPtr, te::rp::Register::InputParameters::m_outputResolutionX, te::rp::Register::InputParameters::m_outputResolutionY, te::rp::Register::InputParameters::m_outputSRID, te::rp::TiePointsLocator::InputParameters::m_pixelSizeXRelation, te::rp::TiePointsLocator::InputParameters::m_pixelSizeYRelation, te::rp::GeometricRefining::InputParameters::m_processAllReferenceRasters, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster1TargetAreaWidth, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaColStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaHeight, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaLineStart, te::rp::TiePointsLocator::InputParameters::m_raster2TargetAreaWidth, te::rp::GeometricRefining::InternalMatchingInfo::m_referenceRasterIndex, te::rp::GeometricRefining::InputParameters::m_referenceRastersPtr, te::rp::GeometricRefining::InputParameters::m_referenceRastersWeights, te::rp::GeometricRefining::InputParameters::m_referenceTPLocationBands, te::rp::Register::OutputParameters::m_rInfo, te::rp::GeometricRefining::OutputParameters::m_rInfo, te::rp::Register::OutputParameters::m_rType, te::rp::GeometricRefining::OutputParameters::m_rType, te::rp::Register::InputParameters::m_tiePoints, te::rp::TiePointsLocator::OutputParameters::m_tiePoints, te::rp::GeometricRefining::OutputParameters::m_tiePoints, te::rp::GeometricRefining::InternalMatchingInfo::m_tiePoints, te::rp::TiePointsLocator::OutputParameters::m_transformationPtr, te::common::AbstractFactory< GeometricTransformation, std::string >::make(), te::rp::FeederConstRaster::moveNext(), te::rp::FeederConstRaster::moveTo(), te::rst::Interpolator::NearestNeighbor, te::rp::GeometricRefining::OutputParameters::MatchingResult::NotMatched, te::rp::FeederConstRaster::reset(), te::rp::GeometricRefining::OutputParameters::MatchingResult::Success, TERP_TRUE_OR_RETURN_FALSE, TERP_TRUE_OR_THROW, te::gm::Envelope::transform(), te::gm::Coord2D::x, and te::gm::Coord2D::y.

bool te::rp::GeometricRefining::getTPConvexHull ( const std::vector< te::gm::GTParameters::TiePoint > &  tiePoints,
const bool  useTPSecondCoordPair,
std::auto_ptr< te::gm::Surface > &  convexHullPtr 
) const
protected

Returns the tie points converx hull.

Parameters
tiePointsInput tie-points.
useTPSecondCoordPairIf true the sencond tie-point component (te::gm::GTParameters::TiePoint::second) will be used for the area calcule, otherwize the first component will be used.
Returns
Returns true if ok. false on errors.

Definition at line 1057 of file GeometricRefining.cpp.

References te::gm::GeometryCollection::add(), te::gm::Geometry::convexHull(), and te::gm::MultiPointType.

Referenced by getTPConvexHullArea().

double te::rp::GeometricRefining::getTPConvexHullArea ( const std::vector< te::gm::GTParameters::TiePoint > &  tiePoints,
const bool  useTPSecondCoordPair 
) const
protected

Returns the tie points converx hull area.

Parameters
tiePointsInput tie-points.
useTPSecondCoordPairIf true the sencond tie-point component (te::gm::GTParameters::TiePoint::second) will be used for the area calcule, otherwize the first component will be used.
Returns
Returns the tie points converx hull area.

Definition at line 1042 of file GeometricRefining.cpp.

References getTPConvexHull().

Referenced by execute(), and getTransformation().

bool te::rp::GeometricRefining::getTransformation ( const std::vector< InternalMatchingInfo > &  inTiePoints,
std::auto_ptr< te::gm::GeometricTransformation > &  baseGeometricTransformPtr,
std::vector< te::gm::GTParameters::TiePoint > &  baseTransAgreementTiePoints,
double &  convexHullAreaPercent 
) const
protected

Try to instantiate a valid geometric transformation following the user parameters.

Parameters
inTiePointsInput tie-points.
baseGeometricTransformPtrThe output base geometric transformation (with the minumim required tie-points).
baseTransAgreementTiePointsThe filtered output tie-points (non-outliers) in agreenment with the generated base transformation.
convexHullAreaPercentThe input raster area percent covered by tie-points - range [0,100].
Returns
true if OK, false on errors.

Definition at line 1096 of file GeometricRefining.cpp.

References te::gm::GTFilter::applyRansac(), convert(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Raster::getResolutionX(), te::rst::Raster::getResolutionY(), getTPConvexHullArea(), te::rp::GeometricRefining::InputParameters::m_enableMultiThread, te::rp::GeometricRefining::InputParameters::m_geomTransfMaxTiePointError, te::rp::GeometricRefining::InputParameters::m_geomTransfName, m_inputParameters, te::rp::GeometricRefining::InputParameters::m_inRasterPtr, te::rp::GeometricRefining::InputParameters::m_minInRasterCoveredAreaPercent, te::rp::GeometricRefining::InputParameters::m_outliersRemotionAssurance, te::rp::GeometricRefining::InputParameters::m_outliersRemotionMaxIterations, and te::gm::GTParameters::m_tiePoints.

Referenced by execute().

bool te::rp::GeometricRefining::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.

Definition at line 890 of file GeometricRefining.cpp.

References m_isInitialized.

Member Data Documentation

GeometricRefining::InputParameters te::rp::GeometricRefining::m_inputParameters
protected

Input execution parameters.

Definition at line 239 of file GeometricRefining.h.

Referenced by convert(), execute(), getTransformation(), initialize(), and reset().

bool te::rp::GeometricRefining::m_isInitialized
protected

Tells if this instance is initialized.

Definition at line 241 of file GeometricRefining.h.

Referenced by execute(), initialize(), isInitialized(), and reset().


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