diff options
Diffstat (limited to 'boost/geometry/core/tags.hpp')
-rw-r--r-- | boost/geometry/core/tags.hpp | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/boost/geometry/core/tags.hpp b/boost/geometry/core/tags.hpp index 9272858ed2..160477b8c4 100644 --- a/boost/geometry/core/tags.hpp +++ b/boost/geometry/core/tags.hpp @@ -57,7 +57,7 @@ struct linear_tag {}; struct areal_tag {}; // Subset of areal types (polygon, multi_polygon, ring) -struct polygonal_tag : areal_tag {}; +struct polygonal_tag : areal_tag {}; /// For volume types (also box (?), polyhedron) struct volumetric_tag {}; @@ -88,6 +88,49 @@ struct box_tag : single_tag, areal_tag {}; struct segment_tag : single_tag, linear_tag {}; +/// OGC Multi point identifying tag +struct multi_point_tag : multi_tag, pointlike_tag {}; + +/// OGC Multi linestring identifying tag +struct multi_linestring_tag : multi_tag, linear_tag {}; + +/// OGC Multi polygon identifying tag +struct multi_polygon_tag : multi_tag, polygonal_tag {}; + +/// OGC Geometry Collection identifying tag +struct geometry_collection_tag : multi_tag {}; + + +/*! +\brief Meta-function to get for a tag of a multi-geometry + the tag of the corresponding single-geometry +*/ +template <typename Tag> +struct single_tag_of +{}; + +#ifndef DOXYGEN_NO_DETAIL + +template <> +struct single_tag_of<multi_point_tag> +{ + typedef point_tag type; +}; + +template <> +struct single_tag_of<multi_linestring_tag> +{ + typedef linestring_tag type; +}; + +template <> +struct single_tag_of<multi_polygon_tag> +{ + typedef polygon_tag type; +}; + +#endif + }} // namespace boost::geometry |