xmsgrid  1.0
GmBoostTypes.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------
9 
10 //----- Included files ---------------------------------------------------------
11 
12 #include <xmscore/points/ptsfwd.h>
13 #pragma warning(push)
14 #pragma warning(disable : 4512) // Boost code: no assignment operator
15 #include <boost/geometry/core/cs.hpp>
16 #include <boost/geometry/geometry.hpp>
17 #include <boost/geometry/geometries/point_xy.hpp>
18 #include <boost/geometry/geometries/polygon.hpp>
19 #include <boost/geometry/geometries/register/point.hpp>
20 #pragma warning(pop)
21 
22 //----- Constants / Enumerations -----------------------------------------------
23 
24 BOOST_GEOMETRY_REGISTER_POINT_2D(xms::Pt3d, double, cs::cartesian, x, y)
25 // It causes problems if you sprinkle this in different locations in the code.
26 // Especially if you try to use the 3D version of this macro with Pt3d then
27 // it is not clear which version will be used. So we only want this code in
28 // one place.
29 
30 //----- Namespace declaration --------------------------------------------------
31 
32 namespace xms
33 {
35 typedef boost::geometry::model::d2::point_xy<double> GmBstPt2d;
37 typedef boost::geometry::model::polygon<GmBstPt2d> GmBstPoly2d;
39 typedef boost::geometry::model::polygon<Pt3d> GmBstPoly3d;
41 typedef boost::geometry::model::box<Pt3d> GmBstBox3d;
43 typedef boost::geometry::model::linestring<Pt3d> GmBstLine3d;
45 typedef boost::geometry::ring_type<GmBstPoly3d>::type GmBstRing3d;
46 
47 } // namespace xms
boost::geometry::model::polygon< GmBstPt2d > GmBstPoly2d
Boost polygon 2d.
Definition: GmBoostTypes.h:37
boost::geometry::model::linestring< Pt3d > GmBstLine3d
Boost line 3d.
Definition: GmBoostTypes.h:43
boost::geometry::ring_type< GmBstPoly3d >::type GmBstRing3d
Boost ring 3d.
Definition: GmBoostTypes.h:45
boost::geometry::model::polygon< Pt3d > GmBstPoly3d
Boost polygon 3d.
Definition: GmBoostTypes.h:39
boost::geometry::model::box< Pt3d > GmBstBox3d
Boost box 3d.
Definition: GmBoostTypes.h:41
XMS Namespace.
Definition: geoms.cpp:34
boost::geometry::model::d2::point_xy< double > GmBstPt2d
Boost geometry 2d point.
Definition: GmBoostTypes.h:35