diff --git a/example/c03_custom_linestring_example.cpp b/example/c03_custom_linestring_example.cpp index 118bbaced..e0722c4a5 100644 --- a/example/c03_custom_linestring_example.cpp +++ b/example/c03_custom_linestring_example.cpp @@ -16,7 +16,6 @@ #include #include -#include // To register the 'geographic' distance function to calculate distance over the earth: #include @@ -61,7 +60,9 @@ BOOST_GEOMETRY_REGISTER_POINT_2D(gps_point, double, cs::geographic, long // Register the track as well, as being a "linestring" -BOOST_GEOMETRY_REGISTER_LINESTRING(gps_track) +namespace boost { namespace geometry { namespace traits { +template <> struct tag { typedef ring_tag type; }; +}}} int main() diff --git a/example/c04_a_custom_triangle_example.cpp b/example/c04_a_custom_triangle_example.cpp index a8084a98c..8c4b7d6d8 100644 --- a/example/c04_a_custom_triangle_example.cpp +++ b/example/c04_a_custom_triangle_example.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include @@ -30,7 +29,10 @@ struct triangle : public boost::array struct tag { typedef ring_tag type; }; +}}} // Specializations of algorithms, where useful. If not specialized the default ones diff --git a/example/c04_b_custom_triangle_example.cpp b/example/c04_b_custom_triangle_example.cpp index 6721593d4..1e41c5f9b 100644 --- a/example/c04_b_custom_triangle_example.cpp +++ b/example/c04_b_custom_triangle_example.cpp @@ -18,11 +18,10 @@ #include #include #include -#include #include #include -BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian); +BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian) template @@ -30,11 +29,12 @@ struct triangle : public boost::array { }; -// Register triangle

as a ring -namespace boost { namespace geometry { -template struct tag > { typedef ring_tag type; } -}} +// Register triangle

as a ring +namespace boost { namespace geometry { namespace traits { +template struct tag > { typedef ring_tag type; }; +}}} + namespace boost { namespace geometry { namespace dispatch { diff --git a/example/c06_custom_polygon_example.cpp b/example/c06_custom_polygon_example.cpp index 6067a7358..da4a978de 100644 --- a/example/c06_custom_polygon_example.cpp +++ b/example/c06_custom_polygon_example.cpp @@ -14,7 +14,6 @@ #include #include -#include struct my_point @@ -49,7 +48,11 @@ struct my_polygon // We can conveniently use macro's to register point and ring BOOST_GEOMETRY_REGISTER_POINT_2D(my_point, double, cs::cartesian, x, y) -BOOST_GEOMETRY_REGISTER_RING(my_ring) + +// Register my_ring as a ring +namespace boost { namespace geometry { namespace traits { +template <> struct tag { typedef ring_tag type; }; +}}} diff --git a/example/c08_custom_non_std_example.cpp b/example/c08_custom_non_std_example.cpp index 2a8460ecf..874917d8e 100644 --- a/example/c08_custom_non_std_example.cpp +++ b/example/c08_custom_non_std_example.cpp @@ -20,7 +20,6 @@ #include #include -#include #include // Sample point, having x/y @@ -215,7 +214,10 @@ template<> struct resize // 4) register with Boost.Geometry BOOST_GEOMETRY_REGISTER_POINT_2D(my_point, double, cs::cartesian, x, y) -BOOST_GEOMETRY_REGISTER_RING(my_polygon) + +namespace boost { namespace geometry { namespace traits { +template <> struct tag { typedef ring_tag type; }; +}}} // end adaption