| Home | Libraries | People | FAQ | More

#### validity_failure_type

Enumerates the possible validity failure types for a geometry.

###### Description

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.

###### Synopsis

    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,
        failure_collinear_points_on_face = 70,
        failure_non_coplanar_points_on_face = 71,
        failure_few_points_on_face = 72,
        failure_inconsistent_orientation = 73,
        failure_invalid_intersection = 74,
        failure_disconnected_surface = 75
    };

###### Values

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)
failure_collinear_points_on_face | The geometry has colinear points on the same face (applies to polyhedral surfaces only)
failure_non_coplanar_points_on_face | The geometry has non-coplanar points on the same face The points do not lie on the same plane and thus cannot define a face (applies to polyhedral surfaces only)
failure_few_points_on_face | The geometry has a very small number of points on the same face The face must have at least 3 points to be defined (applies to polyhedral surfaces only)
failure_inconsistent_orientation | The geometry has inconsistent orientation of at least one edge The edge has the same orientation in both faces it belongs to (applies to polyhedral surfaces only)
failure_invalid_intersection | The geometry has invalid intersection of the faces The faces do not intersect in a valid way, i.e. on a common edge (applies to polyhedral surfaces only)
failure_disconnected_surface | The geometry has disconnected faces, i.e. it is not continuous (applies to polyhedral surfaces only)

###### Header

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

###### See also

The is_valid algorithm taking a reference to validity_failure_type as second argument