26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_ABSTRACTVALIDATOR_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_ABSTRACTVALIDATOR_H
30 #include "../Config.h"
32 #include "../CommonDataStructures.h"
41 class GeometryCollection;
AbstractValidatorPtr(te::gm::AbstractValidator *validator=nullptr)
AbstractValidatorSharedPtr(te::gm::AbstractValidator *validator=nullptr)
An abstract class to represent an algorithm that validates an geometry.
virtual ~AbstractValidator()=default
Destructor.
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 no...
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 ch...
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...
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.
double m_precision
When appliable, the precision to be used in the validation.
virtual void setPrecision(double precision)
When appliable, sets the precision to be used in the validation.
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...
AbstractValidator()
Constructor.
virtual te::gm::GeometryPtr validate(const te::gm::Geometry *geometry) const
Validates a geometry.
It is a collection of other geometric objects.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
LineString is a curve with linear interpolation between points.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
std::vector< te::gm::Geometry * > GeometryVector
#define TEGEOMEXPORT
You can use this macro in order to export/import classes and functions from this module.