A static class with methods to make geometry valid. More...
#include <MakeGeometryValid.h>
Static Public Member Functions | |
| static bool | makeValid (const te::da::DataSourcePtr dataSource, const std::string &dataSetName, std::string &errorMessage, te::da::ObjectIdSet *oidSet=0) |
| This method gets the datasource capabilities and calls the specific function to fix geometry. More... | |
Static Private Member Functions | |
| static bool | makeValidMemory (const te::da::DataSourcePtr dataSource, const std::string &dataSetName, std::string &errorMessage, te::da::ObjectIdSet *oidSet=0) |
| It tries to fix invalid geometry by GEOS and updates the source data. More... | |
| static bool | makeValidQuery (const te::da::DataSourcePtr dataSource, const std::string &dataSetName, std::string &errorMessage, te::da::ObjectIdSet *oidSet=0) |
| It tries to fix invalid geometry by SQL clause ST_MakeValid and updates the source data. More... | |
A static class with methods to make geometry valid.
Definition at line 49 of file MakeGeometryValid.h.
|
static |
This method gets the datasource capabilities and calls the specific function to fix geometry.
| dataSource | The data source information. |
| dataSetName | The input data name. |
| errorMessage | Variable to catch any error occurred during execution. |
| oidSet | Set of object ids to filter iconsistent geometries. |
Definition at line 61 of file MakeGeometryValid.cpp.
References te::da::DataSourceCapabilities::getQueryCapabilities(), makeValidMemory(), makeValidQuery(), queryCapabilities, and te::da::QueryCapabilities::supportsSpatialSQLDialect().
Referenced by te::vp::CheckGeomValidityDialog::onFixPushButtonClicked().
|
staticprivate |
It tries to fix invalid geometry by GEOS and updates the source data.
| dataSource | The data source information. |
| dataSetName | The input data name. |
| errorMessage | Variable to catch any error occurred during execution. |
Definition at line 239 of file MakeGeometryValid.cpp.
References te::da::ObjectIdSet::add(), te::da::ObjectIdSet::addProperty(), te::gm::CheckValidity(), te::da::ObjectIdSet::clear(), te::gm::FixGeometryTopology::fixTopology(), te::da::GenerateOID(), te::da::GetDataSetType(), te::vp::GetFilledItemMemory(), te::da::GetFirstGeomProperty(), te::dt::Property::getName(), te::da::GetOIDPropertyNames(), te::da::GetPropertyPos(), te::dt::Property::getType(), te::gm::Coord2D::getX(), te::gm::Coord2D::getY(), te::common::TaskProgress::isActive(), te::gm::TopologyValidationError::m_coordinate, te::gm::TopologyValidationError::m_message, p, te::common::TaskProgress::pulse(), te::mem::DataSetItem::setGeometry(), te::common::TaskProgress::setTotalSteps(), te::da::ObjectIdSet::size(), TE_LOG_ERROR, TE_TR, and te::common::Exception::what().
Referenced by makeValid().
|
staticprivate |
It tries to fix invalid geometry by SQL clause ST_MakeValid and updates the source data.
| dataSource | The data source information. |
| dataSetName | The input data name. |
| errorMessage | Variable to catch any error occurred during execution. |
Definition at line 75 of file MakeGeometryValid.cpp.
References ds, te::dt::GEOMETRY_TYPE, te::da::GetDataSetType(), te::da::GetFirstGeomProperty(), te::gm::GeometryProperty::getGeometryType(), te::dt::Property::getName(), te::da::PrimaryKey::getProperties(), te::gm::IsMultiType(), p, TE_LOG_ERROR, TE_TR, and te::common::Exception::what().
Referenced by makeValid().