P;
+ bg::model::linestring line1, line2;
+
+ boost::geometry::read_wkt("linestring(1 1,2 2)", line1);
+ boost::geometry::read_wkt("linestring(2 1,1 2)", line2);
+
+ bool b = boost::geometry::intersects(line1, line2);
+
+ std::cout << "Intersects: " << (b ? "YES" : "NO") << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[intersects_output
+/*`
+Output:
+[pre
+Intersects: YES
+]
+*/
+//]
diff --git a/doc/src/examples/algorithms/make_2d_point.cpp b/doc/src/examples/algorithms/make_2d_point.cpp
new file mode 100644
index 000000000..14798d564
--- /dev/null
+++ b/doc/src/examples/algorithms/make_2d_point.cpp
@@ -0,0 +1,61 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Quickbook Example
+
+//[make_2d_point
+//` Shows the usage of make as a generic constructor for different point types
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+struct mypoint { float _x, _y; };
+
+BOOST_GEOMETRY_REGISTER_POINT_2D(mypoint, float, cs::cartesian, _x, _y)
+
+template
+void construct_and_display()
+{
+ using boost::geometry::make;
+ using boost::geometry::get;
+
+ Point p = make(1, 2);
+
+ std::cout << "x=" << get<0>(p) << " y=" << get<1>(p)
+ << " (" << typeid(Point).name() << ")"
+ << std::endl;
+}
+
+int main()
+{
+ construct_and_display >();
+ construct_and_display >();
+ construct_and_display >();
+ construct_and_display >();
+ construct_and_display();
+ return 0;
+}
+
+//]
+
+//[make_2d_point_output
+/*`
+Output (compiled using gcc):
+[pre
+x=1 y=2 (N5boost8geometry5model2d28point_xyIdNS0_2cs9cartesianEEE)
+x=1 y=2 (N5boost8geometry5model2d28point_xyIiNS0_2cs9cartesianEEE)
+x=1 y=2 (N5boost6tuples5tupleIddNS0_9null_typeES2_S2_S2_S2_S2_S2_S2_EE)
+x=1 y=2 (N5boost7polygon10point_dataIiEE)
+x=1 y=2 (7mypoint)
+]
+*/
+//]
diff --git a/doc/src/examples/algorithms/make_3d_point.cpp b/doc/src/examples/algorithms/make_3d_point.cpp
new file mode 100644
index 000000000..983a6ecbb
--- /dev/null
+++ b/doc/src/examples/algorithms/make_3d_point.cpp
@@ -0,0 +1,36 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Quickbook Example
+
+//[make_3d_point
+//` Using make to construct a three dimensional point
+
+#include
+
+#include
+#include
+
+int main()
+{
+ typedef boost::geometry::model::point point_type;
+ point_type p = boost::geometry::make(1, 2, 3);
+ std::cout << boost::geometry::dsv(p) << std::endl;
+ return 0;
+}
+
+//]
+
+
+//[make_3d_point_output
+/*`
+Output:
+[pre
+(1, 2, 3)
+]
+*/
+//]
diff --git a/doc/src/examples/algorithms/make_inverse.cpp b/doc/src/examples/algorithms/make_inverse.cpp
new file mode 100644
index 000000000..81373f169
--- /dev/null
+++ b/doc/src/examples/algorithms/make_inverse.cpp
@@ -0,0 +1,46 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Quickbook Example
+
+//[make_inverse
+//` Usage of make_inverse and combine to conveniently determine bounding box of several objects
+
+#include
+
+#include
+#include
+
+using namespace boost::geometry;
+
+int main()
+{
+
+ typedef model::d2::point_xy point;
+ typedef model::box box;
+
+ box all = make_inverse();
+ std::cout << dsv(all) << std::endl;
+ combine(all, make(0, 0, 3, 4));
+ combine(all, make(2, 2, 5, 6));
+ std::cout << dsv(all) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[make_inverse_output
+/*`
+Output:
+[pre
+((1.79769e+308, 1.79769e+308), (-1.79769e+308, -1.79769e+308))
+((0, 0), (5, 6))
+]
+*/
+//]
diff --git a/doc/src/examples/algorithms/make_with_range.cpp b/doc/src/examples/algorithms/make_with_range.cpp
new file mode 100644
index 000000000..3efb664bd
--- /dev/null
+++ b/doc/src/examples/algorithms/make_with_range.cpp
@@ -0,0 +1,48 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Quickbook Example
+
+//[make_with_range
+//` Using make to construct a linestring with two different range types
+
+#include
+
+#include
+#include
+#include /*< Necessary to register a C array like {1,2} as a point >*/
+
+
+int main()
+{
+ using boost::geometry::make;
+
+ typedef boost::geometry::model::d2::point_xy point;
+ typedef boost::geometry::model::linestring linestring;
+
+ double coordinates[][2] = {{1,2}, {3,4}, {5, 6}}; /*< Initialize with C array points >*/
+ linestring ls = make(coordinates);
+ std::cout << boost::geometry::dsv(ls) << std::endl;
+
+ point points[3] = { make(9,8), make(7,6), make(5,4) }; /*< Construct array with points, using make which should work for any point type >*/
+ std::cout << boost::geometry::dsv(make(points)) << std::endl; /*< Construct linestring with point-array and output it as Delimiter Separated Values >*/
+
+ return 0;
+}
+
+//]
+
+
+//[make_with_range_output
+/*`
+Output:
+[pre
+((1, 2), (3, 4), (5, 6))
+((9, 8), (7, 6), (5, 4))
+]
+*/
+//]
diff --git a/doc/src/examples/algorithms/simplify_inserter_with_strategy.cpp b/doc/src/examples/algorithms/simplify_inserter_with_strategy.cpp
new file mode 100644
index 000000000..97e44aa88
--- /dev/null
+++ b/doc/src/examples/algorithms/simplify_inserter_with_strategy.cpp
@@ -0,0 +1,72 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+//
+// Copyright Barend Gehrels 2011, Geodan, Amsterdam, the Netherlands
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Quickbook Example
+
+//[simplify_inserter
+//` Simplify a linestring using an output iterator
+
+#include
+#include
+#include
+#include
+
+
+
+int main()
+{
+ typedef boost::geometry::model::d2::point_xy P;
+ typedef boost::geometry::model::linestring L;
+
+ L line;
+ boost::geometry::read_wkt("linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)", line);
+
+ typedef boost::geometry::strategy::distance::projected_point
DS;
+ typedef boost::geometry::strategy::simplify::douglas_peucker
simplification;
+
+ L simplified;
+ boost::geometry::simplify_inserter(line, std::back_inserter(simplified), 0.5, simplification()); //std::ostream_iterator
(std::cout, "\n"), 0.5);//);
+ //std::cout << simplified[0];
+ //boost::geometry::simplify_inserter(line, std::ostream_iterator
(std::cout, "\n"), 0.5);//, simplification());
+
+ std::ostream_iterator
out(std::cout, "\n");
+ std::copy(simplified.begin(), simplified.end(), out);
+
+ std::cout
+ << " original: " << boost::geometry::dsv(line) << std::endl
+ << "simplified: " << boost::geometry::dsv(simplified) << std::endl;
+
+ return 0;
+}
+
+//]
+
+
+//[simplify_inserter_output
+/*`
+Output:
+[pre
+simplify_inserter: 16
+simplify_inserter: 0.339837
+]
+*/
+//]
+/*
+OUTPUT
+POINT(1.1 1.1) original: ((1.1, 1.1), (2.5, 2.1), (3.1, 3.1), (4.9, 1.1), (3.1, 1.9))
+simplified: ((1.1, 1.1), (3.1, 3.1), (4.9, 1.1), (3.1, 1.9))
+*/
+/*
+OUTPUT
+POINT(1.1 1.1) original: ((1.1, 1.1), (2.5, 2.1), (3.1, 3.1), (4.9, 1.1), (3.1, 1.9))
+simplified: ((1.1, 1.1), (3.1, 3.1), (4.9, 1.1), (3.1, 1.9))
+*/
+/*
+OUTPUT
+POINT(1.1 1.1) original: ((1.1, 1.1), (2.5, 2.1), (3.1, 3.1), (4.9, 1.1), (3.1, 1.9))
+simplified: ((1.1, 1.1), (3.1, 3.1), (4.9, 1.1), (3.1, 1.9))
+*/