update geometry_adapters
This commit is contained in:
parent
b669115b2c
commit
5d4a12f744
1 changed files with 9 additions and 15 deletions
|
@ -49,8 +49,6 @@ BOOST_GEOMETRY_REGISTER_POINT_2D (mapnik::geometry::point<double>, double, boost
|
||||||
BOOST_GEOMETRY_REGISTER_POINT_2D (mapnik::geometry::point<std::int64_t>, std::int64_t, boost::geometry::cs::cartesian, x, y)
|
BOOST_GEOMETRY_REGISTER_POINT_2D (mapnik::geometry::point<std::int64_t>, std::int64_t, boost::geometry::cs::cartesian, x, y)
|
||||||
// ring
|
// ring
|
||||||
BOOST_GEOMETRY_REGISTER_RING_TEMPLATED(mapnik::geometry::linear_ring)
|
BOOST_GEOMETRY_REGISTER_RING_TEMPLATED(mapnik::geometry::linear_ring)
|
||||||
// needed by box2d<double>
|
|
||||||
BOOST_GEOMETRY_REGISTER_POINT_2D(mapnik::coord2d, double, boost::geometry::cs::cartesian, x, y)
|
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
|
@ -86,38 +84,34 @@ namespace geometry { namespace traits {
|
||||||
|
|
||||||
// register mapnik::box2d<double>
|
// register mapnik::box2d<double>
|
||||||
template<> struct tag<mapnik::box2d<double> > { using type = box_tag; };
|
template<> struct tag<mapnik::box2d<double> > { using type = box_tag; };
|
||||||
template<> struct point_type<mapnik::box2d<double> > { using type = mapnik::coord2d; };
|
template<> struct point_type<mapnik::box2d<double> > { using type = mapnik::geometry::point<double>; };
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct indexed_access<mapnik::box2d<double>, min_corner, 0>
|
struct indexed_access<mapnik::box2d<double>, min_corner, 0>
|
||||||
{
|
{
|
||||||
using ct = coordinate_type<mapnik::coord2d>::type;
|
static inline double get(mapnik::box2d<double> const& b) { return b.minx();}
|
||||||
static inline ct get(mapnik::box2d<double> const& b) { return b.minx();}
|
static inline void set(mapnik::box2d<double> &b, double const& value) { b.set_minx(value); }
|
||||||
static inline void set(mapnik::box2d<double> &b, ct const& value) { b.set_minx(value); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct indexed_access<mapnik::box2d<double>, min_corner, 1>
|
struct indexed_access<mapnik::box2d<double>, min_corner, 1>
|
||||||
{
|
{
|
||||||
using ct = coordinate_type<mapnik::coord2d>::type;
|
static inline double get(mapnik::box2d<double> const& b) { return b.miny();}
|
||||||
static inline ct get(mapnik::box2d<double> const& b) { return b.miny();}
|
static inline void set(mapnik::box2d<double> &b, double const& value) { b.set_miny(value); }
|
||||||
static inline void set(mapnik::box2d<double> &b, ct const& value) { b.set_miny(value); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct indexed_access<mapnik::box2d<double>, max_corner, 0>
|
struct indexed_access<mapnik::box2d<double>, max_corner, 0>
|
||||||
{
|
{
|
||||||
using ct = coordinate_type<mapnik::coord2d>::type;
|
static inline double get(mapnik::box2d<double> const& b) { return b.maxx();}
|
||||||
static inline ct get(mapnik::box2d<double> const& b) { return b.maxx();}
|
static inline void set(mapnik::box2d<double> &b, double const& value) { b.set_maxx(value); }
|
||||||
static inline void set(mapnik::box2d<double> &b, ct const& value) { b.set_maxx(value); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct indexed_access<mapnik::box2d<double>, max_corner, 1>
|
struct indexed_access<mapnik::box2d<double>, max_corner, 1>
|
||||||
{
|
{
|
||||||
using ct = coordinate_type<mapnik::coord2d>::type;
|
static inline double get(mapnik::box2d<double> const& b) { return b.maxy();}
|
||||||
static inline ct get(mapnik::box2d<double> const& b) { return b.maxy();}
|
static inline void set(mapnik::box2d<double> &b , double const& value) { b.set_maxy(value); }
|
||||||
static inline void set(mapnik::box2d<double> &b , ct const& value) { b.set_maxy(value); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// mapnik::geometry::line_string
|
// mapnik::geometry::line_string
|
||||||
|
|
Loading…
Reference in a new issue