1#ifndef SQL_GIS_GEOMETRIES_TRAITS_H_INCLUDED
2#define SQL_GIS_GEOMETRIES_TRAITS_H_INCLUDED
34#include <boost/geometry/core/access.hpp>
35#include <boost/geometry/core/closure.hpp>
36#include <boost/geometry/core/coordinate_dimension.hpp>
37#include <boost/geometry/core/coordinate_system.hpp>
38#include <boost/geometry/core/coordinate_type.hpp>
39#include <boost/geometry/core/cs.hpp>
40#include <boost/geometry/core/exterior_ring.hpp>
41#include <boost/geometry/core/interior_rings.hpp>
42#include <boost/geometry/core/interior_type.hpp>
43#include <boost/geometry/core/point_order.hpp>
44#include <boost/geometry/core/ring_type.hpp>
45#include <boost/geometry/core/tags.hpp>
46#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
47#include <boost/geometry/geometries/concepts/point_concept.hpp>
48#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
64struct tag<
gis::Cartesian_point> {
65 typedef boost::geometry::point_tag
type;
69struct coordinate_type<
gis::Cartesian_point> {
74struct coordinate_system<
gis::Cartesian_point> {
75 typedef boost::geometry::cs::cartesian
type;
79struct dimension<
gis::Cartesian_point> : boost::mpl::int_<2> {};
81template <std::
size_t Dimension>
82struct access<
gis::Cartesian_point, Dimension> {
84 return p.get<Dimension>();
88 p.set<Dimension>(value);
95struct tag<
gis::Cartesian_linestring> {
96 typedef boost::geometry::linestring_tag
type;
102struct tag<
gis::Cartesian_linearring> {
103 typedef boost::geometry::ring_tag
type;
107struct point_order<
gis::Cartesian_linearring> {
108 static const order_selector value = counterclockwise;
112struct closure<
gis::Cartesian_linearring> {
113 static const closure_selector value = closed;
119struct tag<
gis::Cartesian_polygon> {
120 typedef boost::geometry::polygon_tag
type;
124struct ring_const_type<
gis::Cartesian_polygon> {
129struct ring_mutable_type<
gis::Cartesian_polygon> {
134struct interior_const_type<
gis::Cartesian_polygon> {
140struct interior_mutable_type<
gis::Cartesian_polygon> {
146struct exterior_ring<
gis::Cartesian_polygon> {
158struct interior_rings<
gis::Cartesian_polygon> {
175struct tag<
gis::Cartesian_multipoint> {
176 typedef boost::geometry::multi_point_tag
type;
182struct tag<
gis::Cartesian_multilinestring> {
183 typedef boost::geometry::multi_linestring_tag
type;
189struct tag<
gis::Cartesian_multipolygon> {
190 typedef boost::geometry::multi_polygon_tag
type;
200struct tag<
gis::Geographic_point> {
201 typedef boost::geometry::point_tag
type;
205struct coordinate_type<
gis::Geographic_point> {
210struct coordinate_system<
gis::Geographic_point> {
211 typedef boost::geometry::cs::geographic<radian>
type;
215struct dimension<
gis::Geographic_point> : boost::mpl::int_<2> {};
217template <std::
size_t Dimension>
218struct access<
gis::Geographic_point, Dimension> {
220 return p.get<Dimension>();
224 p.set<Dimension>(value);
231struct tag<
gis::Geographic_linestring> {
232 typedef boost::geometry::linestring_tag
type;
238struct tag<
gis::Geographic_linearring> {
239 typedef boost::geometry::ring_tag
type;
243struct point_order<
gis::Geographic_linearring> {
244 static const order_selector value = counterclockwise;
248struct closure<
gis::Geographic_linearring> {
249 static const closure_selector value = closed;
255struct tag<
gis::Geographic_polygon> {
256 typedef boost::geometry::polygon_tag
type;
260struct ring_const_type<
gis::Geographic_polygon> {
265struct ring_mutable_type<
gis::Geographic_polygon> {
270struct interior_const_type<
gis::Geographic_polygon> {
276struct interior_mutable_type<
gis::Geographic_polygon> {
282struct exterior_ring<
gis::Geographic_polygon> {
294struct interior_rings<
gis::Geographic_polygon> {
312struct tag<
gis::Geographic_multipoint> {
313 typedef boost::geometry::multi_point_tag
type;
319struct tag<
gis::Geographic_multilinestring> {
320 typedef boost::geometry::multi_linestring_tag
type;
326struct tag<
gis::Geographic_multipolygon> {
327 typedef boost::geometry::multi_polygon_tag
type;
Malloc_allocator is a C++ STL memory allocator based on my_malloc/my_free.
Definition: malloc_allocator.h:63
A Cartesian 2d linear ring.
Definition: geometries_cs.h:177
A Cartesian 2d point.
Definition: geometries_cs.h:47
A Cartesian 2d polygon.
Definition: geometries_cs.h:269
decltype(m_interior_rings) & interior_rings()
Get list of interior rings.
Cartesian_linearring & cartesian_exterior_ring() const
Get the exterior ring.
Definition: geometries.cc:210
decltype(m_interior_rings) const & const_interior_rings() const
Get list of interior rings.
A geographic (ellipsoidal) 2d linear ring.
Definition: geometries_cs.h:223
A geographic (ellipsoidal) 2d point.
Definition: geometries_cs.h:58
A geographic (ellipsoidal) 2d polygon.
Definition: geometries_cs.h:322
decltype(m_interior_rings) & interior_rings()
Get list of interior rings.
decltype(m_interior_rings) const & const_interior_rings() const
Get list of interior rings.
Geographic_linearring & geographic_exterior_ring() const
Get the exterior ring.
Definition: geometries.cc:255
const char * p
Definition: ctype-mb.cc:1225
This file declares the coordinate system specific subclasses of the geometry class hierarchy.
Tag dispatch for custom Role_properties.
Definition: sql_auth_cache.h:591
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2876
static double get(gis::Cartesian_point const &p)
Definition: geometries_traits.h:83
static void set(gis::Cartesian_point &p, double const &value)
Definition: geometries_traits.h:87
static void set(gis::Geographic_point &p, double const &value)
Definition: geometries_traits.h:223
static double get(gis::Geographic_point const &p)
Definition: geometries_traits.h:219
boost::geometry::cs::cartesian type
Definition: geometries_traits.h:75
boost::geometry::cs::geographic< radian > type
Definition: geometries_traits.h:211
double type
Definition: geometries_traits.h:70
double type
Definition: geometries_traits.h:206
static gis::Cartesian_linearring & get(gis::Cartesian_polygon &py)
Definition: geometries_traits.h:147
static gis::Cartesian_linearring const & get(gis::Cartesian_polygon const &py)
Definition: geometries_traits.h:151
static gis::Geographic_linearring const & get(gis::Geographic_polygon const &py)
Definition: geometries_traits.h:287
static gis::Geographic_linearring & get(gis::Geographic_polygon &py)
Definition: geometries_traits.h:283
std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > const & type
Definition: geometries_traits.h:136
std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > const & type
Definition: geometries_traits.h:272
std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > & type
Definition: geometries_traits.h:142
std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > & type
Definition: geometries_traits.h:278
static std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > & get(gis::Cartesian_polygon &py)
Definition: geometries_traits.h:161
static std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > const & get(gis::Cartesian_polygon const &py)
Definition: geometries_traits.h:167
static std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > const & get(gis::Geographic_polygon const &py)
Definition: geometries_traits.h:304
static std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > & get(gis::Geographic_polygon &py)
Definition: geometries_traits.h:297
gis::Cartesian_linearring const & type
Definition: geometries_traits.h:125
gis::Geographic_linearring const & type
Definition: geometries_traits.h:261
gis::Cartesian_linearring & type
Definition: geometries_traits.h:130
gis::Geographic_linearring & type
Definition: geometries_traits.h:266
boost::geometry::ring_tag type
Definition: geometries_traits.h:103
boost::geometry::linestring_tag type
Definition: geometries_traits.h:96
boost::geometry::multi_linestring_tag type
Definition: geometries_traits.h:183
boost::geometry::multi_point_tag type
Definition: geometries_traits.h:176
boost::geometry::multi_polygon_tag type
Definition: geometries_traits.h:190
boost::geometry::point_tag type
Definition: geometries_traits.h:65
boost::geometry::polygon_tag type
Definition: geometries_traits.h:120
boost::geometry::ring_tag type
Definition: geometries_traits.h:239
boost::geometry::linestring_tag type
Definition: geometries_traits.h:232
boost::geometry::multi_linestring_tag type
Definition: geometries_traits.h:320
boost::geometry::multi_point_tag type
Definition: geometries_traits.h:313
boost::geometry::multi_polygon_tag type
Definition: geometries_traits.h:327
boost::geometry::point_tag type
Definition: geometries_traits.h:201
boost::geometry::polygon_tag type
Definition: geometries_traits.h:256