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>
49#include <boost/geometry/multi/core/tags.hpp>
65struct tag<
gis::Cartesian_point> {
66 typedef boost::geometry::point_tag
type;
70struct coordinate_type<
gis::Cartesian_point> {
75struct coordinate_system<
gis::Cartesian_point> {
76 typedef boost::geometry::cs::cartesian
type;
80struct dimension<
gis::Cartesian_point> : boost::mpl::int_<2> {};
82template <std::
size_t Dimension>
83struct access<
gis::Cartesian_point, Dimension> {
85 return p.get<Dimension>();
89 p.set<Dimension>(value);
96struct tag<
gis::Cartesian_linestring> {
97 typedef boost::geometry::linestring_tag
type;
103struct tag<
gis::Cartesian_linearring> {
104 typedef boost::geometry::ring_tag
type;
108struct point_order<
gis::Cartesian_linearring> {
109 static const order_selector value = counterclockwise;
113struct closure<
gis::Cartesian_linearring> {
114 static const closure_selector value = closed;
120struct tag<
gis::Cartesian_polygon> {
121 typedef boost::geometry::polygon_tag
type;
125struct ring_const_type<
gis::Cartesian_polygon> {
130struct ring_mutable_type<
gis::Cartesian_polygon> {
135struct interior_const_type<
gis::Cartesian_polygon> {
141struct interior_mutable_type<
gis::Cartesian_polygon> {
147struct exterior_ring<
gis::Cartesian_polygon> {
159struct interior_rings<
gis::Cartesian_polygon> {
176struct tag<
gis::Cartesian_multipoint> {
177 typedef boost::geometry::multi_point_tag
type;
183struct tag<
gis::Cartesian_multilinestring> {
184 typedef boost::geometry::multi_linestring_tag
type;
190struct tag<
gis::Cartesian_multipolygon> {
191 typedef boost::geometry::multi_polygon_tag
type;
201struct tag<
gis::Geographic_point> {
202 typedef boost::geometry::point_tag
type;
206struct coordinate_type<
gis::Geographic_point> {
211struct coordinate_system<
gis::Geographic_point> {
212 typedef boost::geometry::cs::geographic<radian>
type;
216struct dimension<
gis::Geographic_point> : boost::mpl::int_<2> {};
218template <std::
size_t Dimension>
219struct access<
gis::Geographic_point, Dimension> {
221 return p.get<Dimension>();
225 p.set<Dimension>(value);
232struct tag<
gis::Geographic_linestring> {
233 typedef boost::geometry::linestring_tag
type;
239struct tag<
gis::Geographic_linearring> {
240 typedef boost::geometry::ring_tag
type;
244struct point_order<
gis::Geographic_linearring> {
245 static const order_selector value = counterclockwise;
249struct closure<
gis::Geographic_linearring> {
250 static const closure_selector value = closed;
256struct tag<
gis::Geographic_polygon> {
257 typedef boost::geometry::polygon_tag
type;
261struct ring_const_type<
gis::Geographic_polygon> {
266struct ring_mutable_type<
gis::Geographic_polygon> {
271struct interior_const_type<
gis::Geographic_polygon> {
277struct interior_mutable_type<
gis::Geographic_polygon> {
283struct exterior_ring<
gis::Geographic_polygon> {
295struct interior_rings<
gis::Geographic_polygon> {
313struct tag<
gis::Geographic_multipoint> {
314 typedef boost::geometry::multi_point_tag
type;
320struct tag<
gis::Geographic_multilinestring> {
321 typedef boost::geometry::multi_linestring_tag
type;
327struct tag<
gis::Geographic_multipolygon> {
328 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:1237
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:2875
static double get(gis::Cartesian_point const &p)
Definition: geometries_traits.h:84
static void set(gis::Cartesian_point &p, double const &value)
Definition: geometries_traits.h:88
static void set(gis::Geographic_point &p, double const &value)
Definition: geometries_traits.h:224
static double get(gis::Geographic_point const &p)
Definition: geometries_traits.h:220
boost::geometry::cs::cartesian type
Definition: geometries_traits.h:76
boost::geometry::cs::geographic< radian > type
Definition: geometries_traits.h:212
double type
Definition: geometries_traits.h:71
double type
Definition: geometries_traits.h:207
static gis::Cartesian_linearring & get(gis::Cartesian_polygon &py)
Definition: geometries_traits.h:148
static gis::Cartesian_linearring const & get(gis::Cartesian_polygon const &py)
Definition: geometries_traits.h:152
static gis::Geographic_linearring const & get(gis::Geographic_polygon const &py)
Definition: geometries_traits.h:288
static gis::Geographic_linearring & get(gis::Geographic_polygon &py)
Definition: geometries_traits.h:284
std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > const & type
Definition: geometries_traits.h:137
std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > const & type
Definition: geometries_traits.h:273
std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > & type
Definition: geometries_traits.h:143
std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > & type
Definition: geometries_traits.h:279
static std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > & get(gis::Cartesian_polygon &py)
Definition: geometries_traits.h:162
static std::vector< gis::Cartesian_linearring, Malloc_allocator< gis::Cartesian_linearring > > const & get(gis::Cartesian_polygon const &py)
Definition: geometries_traits.h:168
static std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > const & get(gis::Geographic_polygon const &py)
Definition: geometries_traits.h:305
static std::vector< gis::Geographic_linearring, Malloc_allocator< gis::Geographic_linearring > > & get(gis::Geographic_polygon &py)
Definition: geometries_traits.h:298
gis::Cartesian_linearring const & type
Definition: geometries_traits.h:126
gis::Geographic_linearring const & type
Definition: geometries_traits.h:262
gis::Cartesian_linearring & type
Definition: geometries_traits.h:131
gis::Geographic_linearring & type
Definition: geometries_traits.h:267
boost::geometry::ring_tag type
Definition: geometries_traits.h:104
boost::geometry::linestring_tag type
Definition: geometries_traits.h:97
boost::geometry::multi_linestring_tag type
Definition: geometries_traits.h:184
boost::geometry::multi_point_tag type
Definition: geometries_traits.h:177
boost::geometry::multi_polygon_tag type
Definition: geometries_traits.h:191
boost::geometry::point_tag type
Definition: geometries_traits.h:66
boost::geometry::polygon_tag type
Definition: geometries_traits.h:121
boost::geometry::ring_tag type
Definition: geometries_traits.h:240
boost::geometry::linestring_tag type
Definition: geometries_traits.h:233
boost::geometry::multi_linestring_tag type
Definition: geometries_traits.h:321
boost::geometry::multi_point_tag type
Definition: geometries_traits.h:314
boost::geometry::multi_polygon_tag type
Definition: geometries_traits.h:328
boost::geometry::point_tag type
Definition: geometries_traits.h:202
boost::geometry::polygon_tag type
Definition: geometries_traits.h:257