]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/core/tags.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / core / tags.hpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2
3// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
6
20effc67
TL
7// This file was modified by Oracle on 2014-2020.
8// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
7c673cae
FG
9// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10
11// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
12// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
13
14// Use, modification and distribution is subject to the Boost Software License,
15// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16// http://www.boost.org/LICENSE_1_0.txt)
17
18#ifndef BOOST_GEOMETRY_CORE_TAGS_HPP
19#define BOOST_GEOMETRY_CORE_TAGS_HPP
20
21
22namespace boost { namespace geometry
23{
24
25// Tags defining strategies linked to coordinate systems
26
92f5a8d4
TL
27/// Tag used for undefined coordinate system
28struct cs_undefined_tag {};
29
7c673cae
FG
30/// Tag used for casting spherical/geographic coordinate systems
31struct spherical_tag {};
32
33
34/// Tag indicating Cartesian coordinate system family (cartesian,epsg)
35struct cartesian_tag {};
36
37/// Tag indicating Spherical polar coordinate system family
38struct spherical_polar_tag : spherical_tag {};
39
40/// Tag indicating Spherical equatorial coordinate system family
41struct spherical_equatorial_tag : spherical_tag {};
42
43/// Tag indicating Geographic coordinate system family (geographic)
44struct geographic_tag : spherical_tag {};
45
46
47// Tags defining coordinate systems reference models
48
49/// For reference spheroid defining parameters of geographical coordinate system
50struct srs_spheroid_tag {};
51
52/// For reference sphere defining parameters of spherical coordinate system
53struct srs_sphere_tag : srs_spheroid_tag {};
54
55
56// Tags defining tag hierarchy
57
58/// For single-geometries (point, linestring, polygon, box, ring, segment)
59struct single_tag {};
60
61
62/// For multiple-geometries (multi_point, multi_linestring, multi_polygon)
63struct multi_tag {};
64
65/// For point-like types (point, multi_point)
66struct pointlike_tag {};
67
68/// For linear types (linestring, multi-linestring, segment)
69struct linear_tag {};
70
20effc67
TL
71// Subset of linear types (polygon, multi_polygon)
72struct polylinear_tag : linear_tag {};
73
7c673cae
FG
74/// For areal types (polygon, multi_polygon, box, ring)
75struct areal_tag {};
76
77// Subset of areal types (polygon, multi_polygon, ring)
78struct polygonal_tag : areal_tag {};
79
80/// For volume types (also box (?), polyhedron)
81struct volumetric_tag {};
82
83
84// Tags defining geometry types
85
86
87/// "default" tag
88struct geometry_not_recognized_tag {};
89
90/// OGC Point identifying tag
91struct point_tag : single_tag, pointlike_tag {};
92
93/// OGC Linestring identifying tag
20effc67 94struct linestring_tag : single_tag, polylinear_tag {};
7c673cae
FG
95
96/// OGC Polygon identifying tag
97struct polygon_tag : single_tag, polygonal_tag {};
98
99/// Convenience (linear) ring identifying tag
100struct ring_tag : single_tag, polygonal_tag {};
101
102/// Convenience 2D or 3D box (mbr / aabb) identifying tag
103struct box_tag : single_tag, areal_tag {};
104
105/// Convenience segment (2-points) identifying tag
106struct segment_tag : single_tag, linear_tag {};
107
108
109/// OGC Multi point identifying tag
110struct multi_point_tag : multi_tag, pointlike_tag {};
111
112/// OGC Multi linestring identifying tag
20effc67 113struct multi_linestring_tag : multi_tag, polylinear_tag {};
7c673cae
FG
114
115/// OGC Multi polygon identifying tag
116struct multi_polygon_tag : multi_tag, polygonal_tag {};
117
118/// OGC Geometry Collection identifying tag
119struct geometry_collection_tag : multi_tag {};
120
1e59de90
TL
121/// Tag identifying dynamic geometries, e.g. variants
122struct dynamic_geometry_tag {};
123
7c673cae
FG
124
125/*!
126\brief Meta-function to get for a tag of a multi-geometry
127 the tag of the corresponding single-geometry
128*/
129template <typename Tag>
130struct single_tag_of
131{};
132
133#ifndef DOXYGEN_NO_DETAIL
134
135template <>
136struct single_tag_of<multi_point_tag>
137{
138 typedef point_tag type;
139};
140
141template <>
142struct single_tag_of<multi_linestring_tag>
143{
144 typedef linestring_tag type;
145};
146
147template <>
148struct single_tag_of<multi_polygon_tag>
149{
150 typedef polygon_tag type;
151};
152
153#endif
154
155
156}} // namespace boost::geometry
157
158#endif // BOOST_GEOMETRY_CORE_TAGS_HPP