A static class with methods to fix geometry topology. More...
#include <FixGeometryTopology.h>
Static Public Member Functions | |
| static bool | fixTopology (const te::gm::Geometry &geometry, std::vector< te::gm::Geometry * > &fixedGeometryVector, TopologyValidationError topologyError) |
| This method gets a topologically inconsistent geometry and calls specific functions to fix this geometry. More... | |
Static Private Member Functions | |
| static bool | closeGeometryRing (const te::gm::Geometry &geometry, TopologyValidationError topologyError) |
| This function closes an opened geometry ring. More... | |
| static bool | fixSelfIntersection (const te::gm::Geometry &geometry, std::vector< te::gm::Geometry * > &fixedGeometryVector, TopologyValidationError topologyError) |
| This function fixes geometries with self-intersection. More... | |
A static class with methods to fix geometry topology.
Definition at line 48 of file FixGeometryTopology.h.
|
staticprivate |
This function closes an opened geometry ring.
| geometryToFix | Input Geometry to fix. |
| topologyError | If any error occurs, TopologyValidationError struct is populated with error message and geometry coordinate. |
Definition at line 54 of file FixGeometryTopology.cpp.
References te::gm::GeometryCollection::getGeometries(), te::gm::Geometry::getGeomTypeId(), te::gm::LineString::getNPoints(), te::gm::CurvePolygon::getRings(), te::gm::TopologyValidationError::m_message, te::gm::MultiPolygonMType, te::gm::MultiPolygonType, te::gm::MultiPolygonZMType, te::gm::MultiPolygonZType, te::gm::PolygonMType, te::gm::PolygonType, te::gm::PolygonZMType, te::gm::PolygonZType, te::gm::LineString::setNumCoordinates(), te::gm::LineString::setPointN(), and TE_TR.
Referenced by fixTopology().
|
staticprivate |
This function fixes geometries with self-intersection.
| geometryToFix | Input Geometry to fix. |
| fixedGeometryVector | A vector with the result of fixed geometries. |
| topologyError | If any error occurs, TopologyValidationError struct is populated with error message and geometry coordinate. |
Definition at line 105 of file FixGeometryTopology.cpp.
References te::gm::GeometryCollection::add(), te::gm::Geometry::buffer(), te::gm::CheckValidity(), te::common::FreeContents(), te::gm::Geometry::getCentroid(), te::gm::Geometry::getGeomTypeId(), te::gm::Geometry::getSRID(), te::gm::TopologyValidationError::m_coordinate, te::gm::TopologyValidationError::m_message, te::gm::Multi2Single(), te::gm::MultiPolygonType, te::gm::PolygonType, and TE_TR.
Referenced by fixTopology().
|
static |
This method gets a topologically inconsistent geometry and calls specific functions to fix this geometry.
| geometryToFix | Input Geometry to fix. |
| fixedGeometryVector | A vector with the result of fixed geometries. |
| topologyError | If any error occurs, TopologyValidationError struct is populated with error message and geometry coordinate. |
Definition at line 35 of file FixGeometryTopology.cpp.
References te::dt::AbstractData::clone(), closeGeometryRing(), and fixSelfIntersection().
Referenced by te::vp::MakeGeometryValid::makeValidMemory(), and te::rst::Vectorizer::run().