Geometric (and positioning) correction/refining of a already geo-referenced raster using a set of small reference rasters. More...
#include <GeometricRefining.h>
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... | |
Geometric (and positioning) correction/refining of a already geo-referenced raster using a set of small reference rasters.
Definition at line 50 of file GeometricRefining.h.
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.
|
protected |
Convesion from matching infor tie-points to a vector of tie-points.
inTiePoints | Input tie-points. |
outTiePoints | Output tie-points //!< The tie-points generated by matching (first: input rasters lines/cols, second:input raster world coords). |
outTiePointsWeights | Output tie-points weights. |
Definition at line 895 of file GeometricRefining.cpp.
References te::rp::GeometricRefining::InternalMatchingInfo::m_convexHullAreaPercent, te::rp::GeometricRefining::InputParameters::m_geomTransfName, m_inputParameters, te::rp::GeometricRefining::InputParameters::m_minrReferenceRasterRequiredTiePointsFactor, te::rp::GeometricRefining::InternalMatchingInfo::m_referenceRasterIndex, te::rp::GeometricRefining::InputParameters::m_referenceRastersWeights, te::rp::GeometricRefining::InternalMatchingInfo::m_tiePoints, te::common::AbstractFactory< GeometricTransformation, std::string >::make(), and TERP_DEBUG_TRUE_OR_THROW.
Referenced by getTransformation().
|
virtual |
Executes the algorithm using the supplied parameters.
outputParams | Output parameters. |
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.
|
protected |
Returns the tie points converx hull.
tiePoints | Input tie-points. |
useTPSecondCoordPair | If 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. |
Definition at line 1057 of file GeometricRefining.cpp.
References te::gm::GeometryCollection::add(), te::gm::Geometry::convexHull(), and te::gm::MultiPointType.
Referenced by getTPConvexHullArea().
|
protected |
Returns the tie points converx hull area.
tiePoints | Input tie-points. |
useTPSecondCoordPair | If 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. |
Definition at line 1042 of file GeometricRefining.cpp.
References getTPConvexHull().
Referenced by execute(), and getTransformation().
|
protected |
Try to instantiate a valid geometric transformation following the user parameters.
inTiePoints | Input tie-points. |
baseGeometricTransformPtr | The output base geometric transformation (with the minumim required tie-points). |
baseTransAgreementTiePoints | The filtered output tie-points (non-outliers) in agreenment with the generated base transformation. |
convexHullAreaPercent | The input raster area percent covered by tie-points - range [0,100]. |
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().
|
virtual |
Initialize the algorithm instance making it ready for execution.
inputParams | Input parameters. |
Implements te::rp::Algorithm.
Definition at line 800 of file GeometricRefining.cpp.
References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getNumberOfBands(), te::rp::FeederConstRaster::getObjsCount(), m_inputParameters, te::rp::GeometricRefining::InputParameters::m_inRasterBands2Process, te::rp::GeometricRefining::InputParameters::m_inRasterExpectedColError, te::rp::GeometricRefining::InputParameters::m_inRasterExpectedRowError, te::rp::GeometricRefining::InputParameters::m_inRasterPtr, te::rp::GeometricRefining::InputParameters::m_inRasterSubSectorsFactor, te::rp::GeometricRefining::InputParameters::m_inRasterTPLocationBands, m_isInitialized, te::rp::GeometricRefining::InputParameters::m_minInRasterCoveredAreaPercent, te::rp::GeometricRefining::InputParameters::m_minrReferenceRasterCoveredAreaPercent, te::rp::GeometricRefining::InputParameters::m_minrReferenceRasterRequiredTiePointsFactor, te::rp::GeometricRefining::InputParameters::m_referenceRastersPtr, te::rp::GeometricRefining::InputParameters::m_referenceRastersWeights, te::common::RAccess, reset(), TERP_TRUE_OR_RETURN_FALSE, and TERP_TRUE_OR_THROW.
|
virtual |
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.
|
virtual |
Clear all internal allocated objects and reset the algorithm to its initial state.
Implements te::rp::Algorithm.
Definition at line 794 of file GeometricRefining.cpp.
References m_inputParameters, m_isInitialized, and te::rp::GeometricRefining::InputParameters::reset().
Referenced by GeometricRefining(), initialize(), te::rp::GeometricRefining::InputParameters::InputParameters(), te::rp::GeometricRefining::InputParameters::operator=(), te::rp::GeometricRefining::OutputParameters::operator=(), te::rp::GeometricRefining::OutputParameters::OutputParameters(), te::rp::GeometricRefining::InputParameters::~InputParameters(), and te::rp::GeometricRefining::OutputParameters::~OutputParameters().
|
protected |
Input execution parameters.
Definition at line 239 of file GeometricRefining.h.
Referenced by convert(), execute(), getTransformation(), initialize(), and reset().
|
protected |
Tells if this instance is initialized.
Definition at line 241 of file GeometricRefining.h.
Referenced by execute(), initialize(), isInitialized(), and reset().