1 // Boost.Geometry (aka GGL, Generic Geometry Library)
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.
7 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
8 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
10 // Use, modification and distribution is subject to the Boost Software License,
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12 // http://www.boost.org/LICENSE_1_0.txt)
14 #ifndef BOOST_GEOMETRY_CORE_TAGS_HPP
15 #define BOOST_GEOMETRY_CORE_TAGS_HPP
18 namespace boost { namespace geometry
21 // Tags defining strategies linked to coordinate systems
23 /// Tag used for casting spherical/geographic coordinate systems
24 struct spherical_tag {};
27 /// Tag indicating Cartesian coordinate system family (cartesian,epsg)
28 struct cartesian_tag {};
30 /// Tag indicating Spherical polar coordinate system family
31 struct spherical_polar_tag : spherical_tag {};
33 /// Tag indicating Spherical equatorial coordinate system family
34 struct spherical_equatorial_tag : spherical_tag {};
36 /// Tag indicating Geographic coordinate system family (geographic)
37 struct geographic_tag : spherical_tag {};
41 // Tags defining tag hierarchy
43 /// For single-geometries (point, linestring, polygon, box, ring, segment)
47 /// For multiple-geometries (multi_point, multi_linestring, multi_polygon)
50 /// For point-like types (point, multi_point)
51 struct pointlike_tag {};
53 /// For linear types (linestring, multi-linestring, segment)
56 /// For areal types (polygon, multi_polygon, box, ring)
59 // Subset of areal types (polygon, multi_polygon, ring)
60 struct polygonal_tag : areal_tag {};
62 /// For volume types (also box (?), polyhedron)
63 struct volumetric_tag {};
66 // Tags defining geometry types
70 struct geometry_not_recognized_tag {};
72 /// OGC Point identifying tag
73 struct point_tag : single_tag, pointlike_tag {};
75 /// OGC Linestring identifying tag
76 struct linestring_tag : single_tag, linear_tag {};
78 /// OGC Polygon identifying tag
79 struct polygon_tag : single_tag, polygonal_tag {};
81 /// Convenience (linear) ring identifying tag
82 struct ring_tag : single_tag, polygonal_tag {};
84 /// Convenience 2D or 3D box (mbr / aabb) identifying tag
85 struct box_tag : single_tag, areal_tag {};
87 /// Convenience segment (2-points) identifying tag
88 struct segment_tag : single_tag, linear_tag {};
91 /// OGC Multi point identifying tag
92 struct multi_point_tag : multi_tag, pointlike_tag {};
94 /// OGC Multi linestring identifying tag
95 struct multi_linestring_tag : multi_tag, linear_tag {};
97 /// OGC Multi polygon identifying tag
98 struct multi_polygon_tag : multi_tag, polygonal_tag {};
100 /// OGC Geometry Collection identifying tag
101 struct geometry_collection_tag : multi_tag {};
105 \brief Meta-function to get for a tag of a multi-geometry
106 the tag of the corresponding single-geometry
108 template <typename Tag>
112 #ifndef DOXYGEN_NO_DETAIL
115 struct single_tag_of<multi_point_tag>
117 typedef point_tag type;
121 struct single_tag_of<multi_linestring_tag>
123 typedef linestring_tag type;
127 struct single_tag_of<multi_polygon_tag>
129 typedef polygon_tag type;
135 }} // namespace boost::geometry
137 #endif // BOOST_GEOMETRY_CORE_TAGS_HPP