...one of the most highly
regarded and expertly designed C++ library projects in the
world.

— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards

Enumerates the possible validity failure types for a geometry.

The enumeration validity_failure_type enumerates the possible reasons for which a geometry may be found as invalid by the is_valid algorithm. Besides the values that indicate invalidity, there is an additional value (no_failure) that indicates validity.

enum validity_failure_type { no_failure = 0, failure_few_points = 10, failure_wrong_topological_dimension = 11, failure_spikes = 12, failure_duplicate_points = 13, failure_not_closed = 20, failure_self_intersections = 21, failure_wrong_orientation = 22, failure_interior_rings_outside = 30, failure_nested_interior_rings = 31, failure_disconnected_interior = 32, failure_intersecting_interiors = 40, failure_wrong_corner_order = 50, failure_invalid_coordinate = 60 };

Value |
Description |
---|---|

no_failure |
The geometry is valid |

failure_few_points |
The geometry has a very small number of points, e.g., less than 2 for linestrings, less than 3 for open rings, a closed multi-polygon that contains a polygon with less than 4 points, etc. (applies to linestrings, rings, polygons, multi-linestrings and multi-polygons) |

failure_wrong_topological_dimension |
The topological dimension of the geometry is smaller than its dimension, e.g., a linestring with 3 identical points, an open polygon with an interior ring consisting of 3 collinear points, etc. (applies to linear and areal geometries, including segments and boxes) |

failure_spikes |
The geometry contains spikes (applies to linear and areal geometries) |

failure_duplicate_points |
The geometry has (consecutive) duplicate points (applies to areal geometries only) |

failure_not_closed |
The geometry is defined as closed, the starting/ending points are not equal (applies to areal geometries only) |

failure_self_intersections |
The geometry has invalid self-intersections. (applies to areal geometries only) |

failure_wrong_orientation |
The actual orientation of the geometry is different from the one defined (applies to areal geometries only) |

failure_interior_rings_outside |
The geometry contains interior rings that lie outside the exterior ring (applies to polygons and multi-polygons only) |

failure_nested_interior_rings |
The geometry has nested interior rings (applies to polygons and multi-polygons only) |

failure_disconnected_interior |
The interior of the geometry is disconnected (applies to polygons and multi-polygons only) |

failure_intersecting_interiors |
The multi-polygon contains polygons whose interiors are not disjoint (applies to multi-polygons only) |

failure_wrong_corner_order |
The top-right corner of the box is lexicographically smaller than its bottom-left corner (applies to boxes only) |

failure_invalid_coordinate |
The geometry has at least one point with an invalid coordinate (for example, the coordinate is a NaN) |

`#include <boost/geometry/algorithms/validity_failure_type.hpp>`

The is_valid algorithm taking a reference to validity_failure_type as second argument