GEOS  3.13.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::operation::valid::IsValidOp Class Reference

#include <IsValidOp.h>

Public Member Functions

 IsValidOp (const geom::Geometry *p_inputGeometry)
 
void setSelfTouchingRingFormingHoleValid (bool p_isValid)
 
bool isValid ()
 
const TopologyValidationErrorgetValidationError ()
 

Static Public Member Functions

static bool isValid (const geom::Geometry *geom)
 
static bool isValid (const geom::CoordinateXY &coord)
 
static bool isValid (const geom::CoordinateXY *coord)
 

Detailed Description

Implements the algorithms required to compute the isValid() method for Geometry. See the documentation for the various geometry types for a specification of validity.

Version
1.7

Constructor & Destructor Documentation

◆ IsValidOp()

geos::operation::valid::IsValidOp::IsValidOp ( const geom::Geometry p_inputGeometry)
inline

Creates a new validator for a geometry.

Parameters
p_inputGeometrythe geometry to validate

Member Function Documentation

◆ getValidationError()

const TopologyValidationError* geos::operation::valid::IsValidOp::getValidationError ( )

Computes the validity of the geometry, and if not valid returns the validation error for the geometry, or null if the geometry is valid.

Returns
the validation error, if the geometry is invalid or null if the geometry is valid

◆ isValid() [1/3]

bool geos::operation::valid::IsValidOp::isValid ( )

Tests the validity of the input geometry.

Returns
true if the geometry is valid

◆ isValid() [2/3]

static bool geos::operation::valid::IsValidOp::isValid ( const geom::CoordinateXY *  coord)
static

Checks whether a coordinate is valid for processing. Coordinates are valid if their x and y ordinates are in the range of the floating point representation.

Parameters
coordthe coordinate to validate
Returns
true if the coordinate is valid

◆ isValid() [3/3]

static bool geos::operation::valid::IsValidOp::isValid ( const geom::Geometry geom)
inlinestatic

Tests whether a Geometry is valid.

Parameters
geomthe Geometry to test
Returns
true if the geometry is valid

◆ setSelfTouchingRingFormingHoleValid()

void geos::operation::valid::IsValidOp::setSelfTouchingRingFormingHoleValid ( bool  p_isValid)
inline

Sets whether polygons using Self-Touching Rings to form holes are reported as valid. If this flag is set, the following Self-Touching conditions are treated as being valid:

  • the shell ring self-touches to create a hole touching the shell
  • a hole ring self-touches to create two holes touching at a point

The default (following the OGC SFS standard) is that this condition is not valid (false).

Self-Touching Rings which disconnect the the polygon interior are still considered to be invalid (these are invalid under the SFS, and many other spatial models as well). This includes:

  • exverted ("bow-tie") shells which self-touch at a single point
  • inverted shells with the inversion touching the shell at another point
  • exverted holes with exversion touching the hole at another point
  • inverted ("C-shaped") holes which self-touch at a single point causing an island to be formed
  • inverted shells or exverted holes which form part of a chain of touching rings (which disconnect the interior)
Parameters
p_isValidstates whether geometry with this condition is valid

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