]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/include/boost/geometry/algorithms/validity_failure_type.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / algorithms / validity_failure_type.hpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2
3 // Copyright (c) 2015, Oracle and/or its affiliates.
4
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
6
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
9
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_VALIDITY_FAILURE_TYPE_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_VALIDITY_FAILURE_TYPE_HPP
12
13
14 namespace boost { namespace geometry
15 {
16
17
18 /*!
19 \brief Enumerates the possible validity failure types for a geometry
20 \ingroup enum
21 \details The enumeration validity_failure_type enumerates the possible
22 reasons for which a geometry may be found as invalid by the
23 is_valid algorithm.
24 Besides the values that indicate invalidity, there is an
25 additional value (no_failure) that indicates validity.
26
27 \qbk{
28 [heading See also]
29 [link geometry.reference.algorithms.is_valid The is_valid
30 algorithm taking a reference to validity_failure_type as second argument]
31 }
32 */
33 enum validity_failure_type
34 {
35 /// The geometry is valid
36 ///
37 no_failure = 0,
38 /// The geometry has a very small number of points, e.g., less
39 /// than 2 for linestrings, less than 3 for open rings, a closed
40 /// multi-polygon that contains a polygon with less than 4 points, etc.
41 /// (applies to linestrings, rings, polygons, multi-linestrings
42 /// and multi-polygons)
43 failure_few_points = 10,
44 /// The topological dimension of the geometry is smaller than its
45 /// dimension, e.g., a linestring with 3 identical points, an open
46 /// polygon with an interior ring consisting of 3 collinear points, etc.
47 /// (applies to linear and areal geometries, including segments
48 /// and boxes)
49 failure_wrong_topological_dimension = 11,
50 /// The geometry contains spikes
51 /// (applies to linear and areal geometries)
52 failure_spikes = 12,
53 /// The geometry has (consecutive) duplicate points
54 /// (applies to areal geometries only)
55 failure_duplicate_points = 13,
56 /// The geometry is defined as closed, the starting/ending points
57 /// are not equal
58 /// (applies to areal geometries only)
59 failure_not_closed = 20, // for areal geometries
60 /// The geometry has invalid self-intersections.
61 /// (applies to areal geometries only)
62 failure_self_intersections = 21, // for areal geometries
63 /// The actual orientation of the geometry is different from the one defined
64 /// (applies to areal geometries only)
65 failure_wrong_orientation = 22, // for areal geometries
66 /// The geometry contains interior rings that lie outside the exterior ring
67 /// (applies to polygons and multi-polygons only)
68 failure_interior_rings_outside = 30, // for (multi-)polygons
69 /// The geometry has nested interior rings
70 /// (applies to polygons and multi-polygons only)
71 failure_nested_interior_rings = 31, // for (multi-)polygons
72 /// The interior of the geometry is disconnected
73 /// (applies to polygons and multi-polygons only)
74 failure_disconnected_interior = 32, // for (multi-)polygons
75 /// The multi-polygon contains polygons whose interiors are not disjoint
76 /// (applies to multi-polygons only)
77 failure_intersecting_interiors = 40, // for multi-polygons
78 /// The top-right corner of the box is lexicographically smaller
79 /// than its bottom-left corner
80 /// (applies to boxes only)
81 failure_wrong_corner_order = 50, // for boxes
82 /// The geometry has at least one point with an invalid coordinate
83 /// (for example, the coordinate is a NaN)
84 failure_invalid_coordinate = 60
85 };
86
87
88 }} // namespace boost::geometry
89
90 #endif // BOOST_GEOMETRY_ALGORITHMS_VALIDITY_FAILURE_TYPE_HPP