setSelfTouchingRingFormingHoleValid method

void setSelfTouchingRingFormingHoleValid(
  1. bool isValid
)

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

This does not affect whether Self-Touching Rings disconnecting the polygon interior are considered valid (these are considered to be invalid under the SFS, and many other spatial models as well). This includes "bow-tie" shells, which self-touch at a single point causing the interior to be disconnected, and "C-shaped" holes which self-touch at a single point causing an island to be formed.

@param isValid states whether geometry with this condition is valid

Implementation

void setSelfTouchingRingFormingHoleValid(bool isValid) {
  isSelfTouchingRingFormingHoleValid = isValid;
}