te::vp::MakeGeometryValid Class Reference

A static class with methods to make geometry valid. More...

#include <MakeGeometryValid.h>

Inheritance diagram for te::vp::MakeGeometryValid:
te::common::Static

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...
 

Detailed Description

A static class with methods to make geometry valid.

Definition at line 49 of file MakeGeometryValid.h.

Member Function Documentation

static bool te::vp::MakeGeometryValid::makeValid ( const te::da::DataSourcePtr  dataSource,
const std::string &  dataSetName,
std::string &  errorMessage,
te::da::ObjectIdSet oidSet = 0 
)
static

This method gets the datasource capabilities and calls the specific function to fix geometry.

Parameters
dataSourceThe data source information.
dataSetNameThe input data name.
errorMessageVariable to catch any error occurred during execution.
oidSetSet of object ids to filter iconsistent geometries.
Returns
True, if the function was executed successfully and the geometries fixed was updated.
static bool te::vp::MakeGeometryValid::makeValidMemory ( const te::da::DataSourcePtr  dataSource,
const std::string &  dataSetName,
std::string &  errorMessage,
te::da::ObjectIdSet oidSet = 0 
)
staticprivate

It tries to fix invalid geometry by GEOS and updates the source data.

Parameters
dataSourceThe data source information.
dataSetNameThe input data name.
errorMessageVariable to catch any error occurred during execution.
Returns
True, if the query was executed successfully and the geometries fixed was updated.
static bool te::vp::MakeGeometryValid::makeValidQuery ( const te::da::DataSourcePtr  dataSource,
const std::string &  dataSetName,
std::string &  errorMessage,
te::da::ObjectIdSet oidSet = 0 
)
staticprivate

It tries to fix invalid geometry by SQL clause ST_MakeValid and updates the source data.

Parameters
dataSourceThe data source information.
dataSetNameThe input data name.
errorMessageVariable to catch any error occurred during execution.
Returns
True, if the query was executed successfully and the geometries fixed was updated.
Note
The layer must be inserted in a database with spatial extent.

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