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

source code of boost/boost/geometry/core/tags.hpp