te::gm::AbstractValidator Class Referenceabstract

An abstract class to represent an algorithm that validates an geometry. More...

#include <AbstractValidator.h>

Inheritance diagram for te::gm::AbstractValidator:
te::gm::AddProjectedCoordinates te::gm::FixNoding te::gm::FixOrientation te::gm::FixRepeatedCoordinates te::gm::MergeCoordinates te::gm::RemoveCollapsedSegments

Public Member Functions

 AbstractValidator ()
 Constructor. More...
 
virtual void setPrecision (double precision)
 When appliable, sets the precision to be used in the validation. More...
 
virtual te::gm::GeometryPtr validate (const te::gm::Geometry *geometry) const
 Validates a geometry. More...
 
virtual te::gm::GeometryPtr validate (const te::gm::Geometry *geometry, bool &wasChanged) const
 Validates a geometry, an returns additional variable to inform if the geometry has been changed or not. More...
 
virtual ~AbstractValidator ()=default
 Destructor. More...
 

Protected Member Functions

te::gm::GeometryPtr mountTopology (const te::gm::GeometryVector &vecOuterRings, const te::gm::GeometryVector &vecInnerRings) const
 This function recreates the rings topology of a polygon, distributing the given inner rings among all the given outer rings. More...
 
virtual te::gm::GeometryPtr validateCollection (const te::gm::GeometryCollection *collection, bool &wasChanged) const
 Validates a geometry collection, an returns additional variable to inform if the geometry has been changed or not. More...
 
virtual te::gm::GeometryPtr validateLine (const te::gm::LineString *lineString, bool &wasChanged) const =0
 Validates a line, an returns additional variable to inform if the geometry has been changed or not. More...
 
virtual te::gm::GeometryPtr validatePolygon (const te::gm::Polygon *polygon, bool &wasChanged) const
 Validates a polygon, an returns additional variable to inform if the geometry has been changed or not. More...
 

Protected Attributes

double m_precision
 When appliable, the precision to be used in the validation. More...
 

Detailed Description

An abstract class to represent an algorithm that validates an geometry.

Definition at line 51 of file AbstractValidator.h.

Constructor & Destructor Documentation

◆ AbstractValidator()

te::gm::AbstractValidator::AbstractValidator ( )

Constructor.

◆ ~AbstractValidator()

virtual te::gm::AbstractValidator::~AbstractValidator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ mountTopology()

te::gm::GeometryPtr te::gm::AbstractValidator::mountTopology ( const te::gm::GeometryVector vecOuterRings,
const te::gm::GeometryVector vecInnerRings 
) const
protected

This function recreates the rings topology of a polygon, distributing the given inner rings among all the given outer rings.

Parameters
vecOuterRingsA vector containing all the outer rings
vecInnerRingsA vector containing all the inner rings
Returns
The geometry with the ring topology fixed

◆ setPrecision()

virtual void te::gm::AbstractValidator::setPrecision ( double  precision)
virtual

When appliable, sets the precision to be used in the validation.

Parameters
precisionWhen appliable, the precision to be used in the validation

◆ validate() [1/2]

virtual te::gm::GeometryPtr te::gm::AbstractValidator::validate ( const te::gm::Geometry geometry) const
virtual

Validates a geometry.

Parameters
geometryThe input geometry to be validate
Returns
The valdiated result geometry

◆ validate() [2/2]

virtual te::gm::GeometryPtr te::gm::AbstractValidator::validate ( const te::gm::Geometry geometry,
bool &  wasChanged 
) const
virtual

Validates a geometry, an returns additional variable to inform if the geometry has been changed or not.

Parameters
geometryThe input geometry to be validate
wasChangedoutput param. TRUE if the geometry has been changed. FALSE otherwise
Returns
The valdiated result geometry

Reimplemented in te::gm::MergeCoordinates, and te::gm::AddProjectedCoordinates.

◆ validateCollection()

virtual te::gm::GeometryPtr te::gm::AbstractValidator::validateCollection ( const te::gm::GeometryCollection collection,
bool &  wasChanged 
) const
protectedvirtual

Validates a geometry collection, an returns additional variable to inform if the geometry has been changed or not.

Parameters
geometryThe input geometry collection to be validate
wasChangedoutput param. TRUE if the geometry has been changed. FALSE otherwise
Returns
The valdiated result geometry collection

◆ validateLine()

virtual te::gm::GeometryPtr te::gm::AbstractValidator::validateLine ( const te::gm::LineString lineString,
bool &  wasChanged 
) const
protectedpure virtual

Validates a line, an returns additional variable to inform if the geometry has been changed or not.

Parameters
geometryThe input line to be validate
wasChangedoutput param. TRUE if the geometry has been changed. FALSE otherwise
Returns
The valdiated result line

Implemented in te::gm::RemoveCollapsedSegments, te::gm::MergeCoordinates, te::gm::FixRepeatedCoordinates, te::gm::FixOrientation, te::gm::FixNoding, and te::gm::AddProjectedCoordinates.

◆ validatePolygon()

virtual te::gm::GeometryPtr te::gm::AbstractValidator::validatePolygon ( const te::gm::Polygon polygon,
bool &  wasChanged 
) const
protectedvirtual

Validates a polygon, an returns additional variable to inform if the geometry has been changed or not.

Parameters
geometryThe input polygon to be validate
wasChangedoutput param. TRUE if the geometry has been changed. FALSE otherwise
Returns
The valdiated result polygon

Reimplemented in te::gm::FixNoding, and te::gm::FixOrientation.

Member Data Documentation

◆ m_precision

double te::gm::AbstractValidator::m_precision
protected

When appliable, the precision to be used in the validation.

Definition at line 135 of file AbstractValidator.h.


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