|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66812 - in sandbox/geometry/libs/geometry/doc: doxygen_input/sourcecode qbk/snippets
From: barend.gehrels_at_[hidden]
Date: 2010-11-28 08:35:54
Author: barendgehrels
Date: 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
New Revision: 66812
URL: http://svn.boost.org/trac/boost/changeset/66812
Log:
Major update:
Adaptions to snippets with respect to new namespace model
Text files modified:
sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_1.cpp | 2
sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_2.cpp | 2
sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_3.cpp | 2
sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_4.cpp | 2
sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_5.cpp | 2
sandbox/geometry/libs/geometry/doc/qbk/snippets/boost.vsprops | 2
sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_1.cpp | 114 ++++++++++++++++++++--------------------
sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_2.cpp | 9 +-
sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_4.cpp | 38 ++++++------
9 files changed, 92 insertions(+), 81 deletions(-)
Modified: sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_1.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_1.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_1.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -1,3 +1,5 @@
+OBSOLETE
+
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
Modified: sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_2.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_2.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_2.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -1,3 +1,5 @@
+OBSOLETE
+
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
Modified: sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_3.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_3.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_3.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -1,3 +1,5 @@
+OBSOLETE
+
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
Modified: sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_4.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_4.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_4.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -1,3 +1,5 @@
+OBSOLETE
+
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
Modified: sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_5.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_5.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/doxygen_input/sourcecode/doxygen_5.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -1,3 +1,5 @@
+OBSOLETE
+
// Boost.Geometry (aka GGL, Generic Geometry Library)
//
// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands
Modified: sandbox/geometry/libs/geometry/doc/qbk/snippets/boost.vsprops
==============================================================================
--- sandbox/geometry/libs/geometry/doc/qbk/snippets/boost.vsprops (original)
+++ sandbox/geometry/libs/geometry/doc/qbk/snippets/boost.vsprops 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -15,6 +15,6 @@
/>
<UserMacro
Name="BOOST_ROOT"
- Value="C:\Program Files\boost\boost_1_39"
+ Value="c:\software\boost_1_45_0"
/>
</VisualStudioPropertySheet>
Modified: sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_1.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_1.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_1.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -31,9 +31,9 @@
//[point
//` Declaration and use of the basic Boost.Geometry point
namespace bg = boost::geometry;
- bg::point<double, 2, bg::cs::cartesian> point1;
- bg::point<double, 3, bg::cs::cartesian> point2(1.0, 2.0, 3.0); /*< Construct, assigning three coordinates >*/
- bg::point<int, 4, custom_cs> point3;
+ bg::model::point<double, 2, bg::cs::cartesian> point1;
+ bg::model::point<double, 3, bg::cs::cartesian> point2(1.0, 2.0, 3.0); /*< Construct, assigning three coordinates >*/
+ bg::model::point<int, 4, custom_cs> point3;
point1.set<0>(1.0); /*< Set a coordinate. [*Note]: prefer using `bg::set<0>(point1, 1.0);` >*/
point1.set<1>(2.0);
@@ -70,7 +70,7 @@
//[area_polygon
//` Calculate the area of a polygon
namespace bg = boost::geometry;
- bg::polygon<bg::point_xy<double> > poly; /*< Declare >*/
+ bg::model::polygon<bg::model::point_xy<double> > poly; /*< Declare >*/
bg::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly); /*< Fill, in this case with WKT >*/
double area = bg::area(poly); /*< Calculate area >*/
//]
@@ -81,7 +81,7 @@
//[area_polygon_spherical
//` Calculate the area of a [*spherical] polygon
namespace bg = boost::geometry;
- bg::polygon<bg::point<float, 2, bg::cs::spherical<bg::degree> > > sph_poly;
+ bg::model::polygon<bg::model::point<float, 2, bg::cs::spherical<bg::degree> > > sph_poly;
bg::read_wkt("POLYGON((0 0,0 45,45 0,0 0))", sph_poly);
double area = bg::area(sph_poly);
//]
@@ -92,14 +92,14 @@
//[area_polygon_strategy
//` Calculate the area of a polygon specifying a strategy
namespace bg = boost::geometry;
- typedef bg::point<float, 2, bg::cs::spherical<bg::degree> > pnt_type;
- bg::polygon<pnt_type> hawaii;
+ typedef bg::model::point<float, 2, bg::cs::spherical<bg::degree> > pnt_type;
+ bg::model::polygon<pnt_type> hawaii;
bg::read_wkt("POLYGON((-155.86 18.93,-155.84 20.30,-154.80 19.52,-155.86 18.93))" /*< [@http://en.wikipedia.org/wiki/Hawaii_%28island%29 Rough appromation of Hawaii Island] >*/
- , hawaii);
+ , hawaii);
double const mean_radius = 6371.0; /*< [@http://en.wikipedia.org/wiki/Earth_radius Wiki] >*/
bg::strategy::area::huiller<pnt_type> in_square_kilometers(mean_radius);
double area = bg::area(hawaii, in_square_kilometers);
-
+
//]
}
@@ -107,7 +107,7 @@
void example_as_wkt_point()
{
- typedef boost::geometry::point_xy<double> P;
+ typedef boost::geometry::model::point_xy<double> P;
P p(5.12, 6.34);
// Points can be streamed like this:
std::cout << boost::geometry::dsv<P>(p) << std::endl;
@@ -121,8 +121,8 @@
void example_as_wkt_vector()
{
- std::vector<boost::geometry::point_xy<int> > v;
- boost::geometry::read_wkt<boost::geometry::point_xy<int> >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v));
+ std::vector<boost::geometry::model::point_xy<int> > v;
+ boost::geometry::read_wkt<boost::geometry::model::point_xy<int> >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v));
std::cout << boost::geometry::dsv(std::make_pair(v.begin(), v.end())) << std::endl;
}
@@ -130,10 +130,10 @@
void example_centroid_polygon()
{
- boost::geometry::polygon<boost::geometry::point_xy<double> > poly;
+ boost::geometry::model::polygon<boost::geometry::model::point_xy<double> > poly;
boost::geometry::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly);
// Center of polygon might have different type than points of polygon
- boost::geometry::point_xy<float> center;
+ boost::geometry::model::point_xy<float> center;
boost::geometry::centroid(poly, center);
std::cout << "Centroid: " << boost::geometry::dsv(center) << std::endl;
}
@@ -141,8 +141,8 @@
void example_distance_point_point()
{
- boost::geometry::point_xy<double> p1(1, 1);
- boost::geometry::point_xy<double> p2(2, 3);
+ boost::geometry::model::point_xy<double> p1(1, 1);
+ boost::geometry::model::point_xy<double> p2(2, 3);
std::cout << "Distance p1-p2 is "
<< boost::geometry::distance(p1, p2)
<< " units" << std::endl;
@@ -179,28 +179,28 @@
void example_from_wkt_point()
{
- boost::geometry::point_xy<int> point;
+ boost::geometry::model::point_xy<int> point;
boost::geometry::read_wkt("Point(1 2)", point);
std::cout << point.x() << "," << point.y() << std::endl;
}
void example_from_wkt_output_iterator()
{
- std::vector<boost::geometry::point_xy<int> > v;
- boost::geometry::read_wkt<boost::geometry::point_xy<int> >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v));
+ std::vector<boost::geometry::model::point_xy<int> > v;
+ boost::geometry::read_wkt<boost::geometry::model::point_xy<int> >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v));
std::cout << "vector has " << v.size() << " coordinates" << std::endl;
}
void example_from_wkt_linestring()
{
- boost::geometry::linestring<boost::geometry::point_xy<double> > line;
+ boost::geometry::model::linestring<boost::geometry::model::point_xy<double> > line;
boost::geometry::read_wkt("linestring(1 1,2 2,3 3,4 4)", line);
std::cout << "linestring has " << line.size() << " coordinates" << std::endl;
}
void example_from_wkt_polygon()
{
- boost::geometry::polygon<boost::geometry::point_xy<double> > poly;
+ boost::geometry::model::polygon<boost::geometry::model::point_xy<double> > poly;
boost::geometry::read_wkt("POLYGON((0 0,0 1,1 1,1 0,0 0))", poly);
std::cout << "Polygon has " << poly.outer().size() << " coordinates in outer ring" << std::endl;
}
@@ -220,7 +220,7 @@
void example_intersection_linestring()
{
//[intersection_linestring
- typedef boost::geometry::point_xy<double> P;
+ typedef boost::geometry::model::point_xy<double> P;
std::vector<P> line1, line2;
boost::geometry::read_wkt("linestring(1 1,2 2)", line1);
boost::geometry::read_wkt("linestring(2 1,1 2)", line2);
@@ -234,7 +234,7 @@
{
//[intersects_linestring
//` Check if two linestrings (here: vectors) intersect each other
- typedef boost::geometry::point_xy<double> P;
+ typedef boost::geometry::model::point_xy<double> P;
std::vector<P> line1, line2;
boost::geometry::read_wkt("linestring(1 1,2 2)", line1);
boost::geometry::read_wkt("linestring(2 1,1 2)", line2);
@@ -248,7 +248,7 @@
void example_intersection_segment()
{
//[intersection_segment
- typedef boost::geometry::point_xy<double> P;
+ typedef boost::geometry::model::point_xy<double> P;
boost::geometry::model::segment<P> segment1, segment2;
boost::geometry::read_wkt("linestring(1 1,2 2)", segment1);
boost::geometry::read_wkt("linestring(2 1,1 2)", segment2);
@@ -262,7 +262,7 @@
{
//[intersection_segment_inserter
- typedef boost::geometry::point_xy<double> P;
+ typedef boost::geometry::model::point_xy<double> P;
boost::geometry::model::segment<P> segment1, segment2;
boost::geometry::read_wkt("linestring(1 1,2 2)", segment1);
boost::geometry::read_wkt("linestring(2 1,1 2)", segment2);
@@ -280,7 +280,7 @@
{
//[intersects_segment
//` Check if two segments intersect each other
- typedef boost::geometry::point_xy<double> P;
+ typedef boost::geometry::model::point_xy<double> P;
boost::geometry::model::segment<P> line1, line2;
boost::geometry::read_wkt("linestring(1 1,2 2)", line1);
boost::geometry::read_wkt("linestring(2 1,1 2)", line2);
@@ -292,24 +292,24 @@
void example_clip_linestring1()
{
- typedef boost::geometry::point_xy<double> P;
- boost::geometry::linestring<P> line;
+ typedef boost::geometry::model::point_xy<double> P;
+ boost::geometry::model::linestring<P> 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);
- boost::geometry::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
+ boost::geometry::model::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
std::cout << "Clipped linestring(s) " << std::endl;
- std::vector<boost::geometry::linestring<P> > intersection;
- boost::geometry::intersection_inserter<boost::geometry::linestring<P> >(cb, line, std::back_inserter(intersection));
+ std::vector<boost::geometry::model::linestring<P> > intersection;
+ boost::geometry::intersection_inserter<boost::geometry::model::linestring<P> >(cb, line, std::back_inserter(intersection));
}
void example_clip_linestring2()
{
- typedef boost::geometry::point_xy<double> P;
+ typedef boost::geometry::model::point_xy<double> P;
std::vector<P> vector_in;
boost::geometry::read_wkt<P>("linestring(1.1 1.1, 2.5 2.1, 3.1 3.1, 4.9 1.1, 3.1 1.9)",
std::back_inserter(vector_in));
- boost::geometry::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
+ boost::geometry::model::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
typedef std::vector<std::vector<P> > VV;
VV vector_out;
boost::geometry::intersection_inserter<std::vector<P> >(cb, vector_in, std::back_inserter(vector_out));
@@ -317,7 +317,7 @@
std::cout << "Clipped vector(s) " << std::endl;
for (VV::const_iterator it = vector_out.begin(); it != vector_out.end(); it++)
{
- std::copy(it->begin(), it->end(), std::ostream_iterator<P>(std::cout, " "));
+ // TODO FIX THIS std::copy(it->begin(), it->end(), std::ostream_iterator<P>(std::cout, " "));
std::cout << std::endl;
}
}
@@ -328,16 +328,16 @@
void example_intersection_polygon1()
{
- typedef boost::geometry::point_xy<double> P;
- typedef std::vector<boost::geometry::polygon<P> > PV;
+ typedef boost::geometry::model::point_xy<double> P;
+ typedef std::vector<boost::geometry::model::polygon<P> > PV;
- boost::geometry::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
- boost::geometry::polygon<P> poly;
+ boost::geometry::model::box<P> cb(P(1.5, 1.5), P(4.5, 2.5));
+ boost::geometry::model::polygon<P> poly;
boost::geometry::read_wkt("POLYGON((2 1.3,2.4 1.7,2.8 1.8,3.4 1.2,3.7 1.6,3.4 2,4.1 3,5.3 2.6,5.4 1.2,4.9 0.8,2.9 0.7,2 1.3)"
",(4 2,4.2 1.4,4.8 1.9,4.4 2.2,4 2))", poly);
PV v;
- boost::geometry::intersection_inserter<boost::geometry::polygon<P> >(cb, poly, std::back_inserter(v));
+ boost::geometry::intersection_inserter<boost::geometry::model::polygon<P> >(cb, poly, std::back_inserter(v));
std::cout << "Clipped polygon(s) " << std::endl;
for (PV::const_iterator it = v.begin(); it != v.end(); it++)
@@ -350,7 +350,7 @@
{
//[simplify
//` Simplify a linestring
- boost::geometry::linestring<boost::geometry::point_xy<double> > line, simplified;
+ boost::geometry::model::linestring<boost::geometry::model::point_xy<double> > line, simplified;
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);
boost::geometry::simplify(line, simplified, 0.5); /*< Simplify it, using distance of 0.5 units >*/
std::cout
@@ -363,15 +363,15 @@
{
//[simplify_inserter
//` Simplify a linestring using an output iterator
- typedef boost::geometry::point_xy<double> P;
- typedef boost::geometry::linestring<P> L;
+ typedef boost::geometry::model::point_xy<double> P;
+ typedef boost::geometry::model::linestring<P> 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<P, P> DS;
typedef boost::geometry::strategy::simplify::douglas_peucker<P, DS> simplification;
- boost::geometry::simplify_inserter(line, std::ostream_iterator<P>(std::cout, "\n"), 0.5, simplification());
+ // TODO FIX THIS boost::geometry::simplify_inserter(line, std::ostream_iterator<P>(std::cout, "\n"), 0.5, simplification());
//]
}
@@ -379,9 +379,9 @@
void example_within()
{
- boost::geometry::polygon<boost::geometry::point_xy<double> > poly;
+ boost::geometry::model::polygon<boost::geometry::model::point_xy<double> > poly;
boost::geometry::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly);
- boost::geometry::point_xy<float> point(3, 3);
+ boost::geometry::model::point_xy<float> point(3, 3);
std::cout << "Point is "
<< (boost::geometry::within(point, poly) ? "IN" : "NOT in")
<< " polygon"
@@ -392,8 +392,8 @@
void example_within_strategy()
{
// TO BE UPDATED/FINISHED
- typedef boost::geometry::point_xy<double> P;
- typedef boost::geometry::polygon<P> POLY;
+ typedef boost::geometry::model::point_xy<double> P;
+ typedef boost::geometry::model::polygon<P> POLY;
P p;
std::cout << within(p, poly, strategy::within::cross_count<P>) << std::endl;
}
@@ -404,7 +404,7 @@
//[length
//` The following simple example shows the calculation of the length of a linestring containing three points
using namespace boost::geometry;
- linestring<point_xy<double> > line;
+ model::linestring<model::point_xy<double> > line;
read_wkt("linestring(0 0,1 1,4 8,3 2)", line);
std::cout << "linestring length is "
<< length(line)
@@ -434,8 +434,8 @@
void example_length_linestring_iterators2()
{
- std::vector<boost::geometry::point_xy<double> > line;
- boost::geometry::read_wkt<boost::geometry::point_xy<double> >("linestring(0 0,1 1,4 8,3 2)", std::back_inserter(line));
+ std::vector<boost::geometry::model::point_xy<double> > line;
+ boost::geometry::read_wkt<boost::geometry::model::point_xy<double> >("linestring(0 0,1 1,4 8,3 2)", std::back_inserter(line));
std::cout << "linestring length is "
<< boost::geometry::length(line)
<< " units" << std::endl;
@@ -462,8 +462,8 @@
//`The following example shows the length measured over a sphere, expressed in kilometers. To do that the radius of the sphere must be specified in the constructor of the strategy.
using namespace boost::geometry;
- typedef point<float, 2, boost::geometry::cs::spherical<boost::geometry::degree> > P;
- linestring<P> line;
+ typedef model::point<float, 2, cs::spherical<degree> > P;
+ model::linestring<P> line;
line.push_back(P(2, 41));
line.push_back(P(2, 48));
line.push_back(P(5, 52));
@@ -477,9 +477,9 @@
void example_envelope_linestring()
{
- boost::geometry::linestring<boost::geometry::point_xy<double> > line;
+ boost::geometry::model::linestring<boost::geometry::model::point_xy<double> > line;
boost::geometry::read_wkt("linestring(0 0,1 1,4 8,3 2)", line);
- boost::geometry::box<boost::geometry::point_xy<double> > box;
+ boost::geometry::model::box<boost::geometry::model::point_xy<double> > box;
boost::geometry::envelope(line, box);
std::cout << "envelope is " << boost::geometry::dsv(box) << std::endl;
@@ -490,17 +490,17 @@
/*
Extension, other coordinate system:
using namespace boost::geometry;
- typedef point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > LL;
+ typedef model::point_ll<double, boost::geometry::cs::geographic<boost::geometry::degree> > LL;
// Wrangel island, 180 meridian crossing island above Siberia.
- polygon<LL> wrangel;
+ model::polygon<LL> wrangel;
wrangel.outer().push_back(LL(latitude<>(dms<north>(70, 47, 7)), longitude<>(dms<west>(178, 47, 9))));
wrangel.outer().push_back(LL(latitude<>(dms<north>(71, 14, 0)), longitude<>(dms<east>(177, 28, 33))));
wrangel.outer().push_back(LL(latitude<>(dms<north>(71, 34, 24)), longitude<>(dms<east>(179, 44, 37))));
// Close it
wrangel.outer().push_back(wrangel.outer().front());
- boost::geometry::box<LL> box;
+ boost::geometry::model::box<LL> box;
boost::geometry::envelope(wrangel, box);
dms<cd_lat> minlat(box.min_corner().lat());
Modified: sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_2.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_2.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_2.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -98,6 +98,7 @@
//` Other often used algorithms are point-in-polygon:
double points[][2] = {{2.0, 1.3}, {4.1, 3.0}, {5.3, 2.6}, {2.9, 0.7}, {2.0, 1.3}};
+ model::polygon_2d poly;
append(poly, points);
boost::tuple<double, double> p = boost::make_tuple(3.7, 2.0);
std::cout << "Point p is in polygon? " << (within(p, poly) ? "YES" : "NO") << std::endl;
@@ -134,8 +135,8 @@
{
using namespace boost::geometry;
- typedef point<double, 3, cs::cartesian> XYZ;
- typedef point<double, 3, cs::spherical<degree> > SPH;
+ typedef model::point<double, 3, cs::cartesian> XYZ;
+ typedef model::point<double, 3, cs::spherical<degree> > SPH;
XYZ p;
SPH sph1, sph2;
@@ -147,8 +148,8 @@
std::cout << dsv(p) << " <-> " << dsv(sph2) << std::endl;
- typedef point_xy<double> XY;
- typedef point_xy<int> PIXEL;
+ typedef model::point_xy<double> XY;
+ typedef model::point_xy<int> PIXEL;
XY xy(50, 50);
strategy::transform::map_transformer<XY, PIXEL, false> map(0, 0, 100, 100, 1024, 768);
PIXEL pix;
Modified: sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_4.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_4.cpp (original)
+++ sandbox/geometry/libs/geometry/doc/qbk/snippets/qbk_4.cpp 2010-11-28 08:35:52 EST (Sun, 28 Nov 2010)
@@ -87,12 +87,12 @@
//"LINESTRING(-122.193 47.5075,-122.192 47.5108,-122.192 47.5147,-122.192 47.5184,-122.192 47.5224,-122.192 47.5265,-122.192 47.5307,-122.192 47.5327,-122.191 47.5348,-122.19 47.5395,-122.189 47.5443,-122.188 47.549,-122.187 47.5538,-122.185 47.5584,-122.183 47.5609,-122.182 47.563,-122.18 47.5667,-122.179 47.5676,-122.178 47.5711,-122.177 47.5726,-122.177 47.5742,-122.177 47.5762,-122.176 47.5781,-122.176 47.5801)"
};
- typedef boost::geometry::point_xy<double> point_type;
+ typedef boost::geometry::model::point_xy<double> point_type;
std::ofstream svg("simplify_road.svg");
boost::geometry::svg_mapper<point_type> mapper(svg, 300, 300);
- boost::geometry::linestring<point_type> original[n], simplified[n];
+ boost::geometry::model::linestring<point_type> original[n], simplified[n];
for (int i = 0; i < n; i++)
{
@@ -119,12 +119,12 @@
void svg_simplify_country()
{
- typedef boost::geometry::point_xy<double> point_type;
+ typedef boost::geometry::model::point_xy<double> point_type;
std::ofstream svg("simplify_country.svg");
boost::geometry::svg_mapper<point_type> mapper(svg, 300, 300);
- boost::geometry::multi_polygon<boost::geometry::polygon<point_type> > original[wkt_countries_count]
+ boost::geometry::model::multi_polygon<boost::geometry::model::polygon<point_type> > original[wkt_countries_count]
, simplified[wkt_countries_count];
for (int i = 0; i < wkt_countries_count; i++)
@@ -150,13 +150,13 @@
void svg_convex_hull_country()
{
- typedef boost::geometry::point_xy<double> point_type;
+ typedef boost::geometry::model::point_xy<double> point_type;
std::ofstream svg("convex_hull_country.svg");
boost::geometry::svg_mapper<point_type> mapper(svg, 300, 300);
- boost::geometry::multi_polygon<boost::geometry::polygon<point_type> > original[wkt_countries_count];
- boost::geometry::linear_ring<point_type> hull[wkt_countries_count];
+ boost::geometry::model::multi_polygon<boost::geometry::model::polygon<point_type> > original[wkt_countries_count];
+ boost::geometry::model::linear_ring<point_type> hull[wkt_countries_count];
for (int i = 0; i < wkt_countries_count; i++)
{
@@ -183,14 +183,14 @@
void svg_convex_hull_cities()
{
- typedef boost::geometry::point_xy<double> point_type;
+ typedef boost::geometry::model::point_xy<double> point_type;
std::ofstream svg("convex_hull_cities.svg");
boost::geometry::svg_mapper<point_type> mapper(svg, 300, 300);
- boost::geometry::multi_point<point_type> original[wkt_cities_count];
+ boost::geometry::model::multi_point<point_type> original[wkt_cities_count];
- boost::geometry::linear_ring<point_type> hull[wkt_cities_count];
+ boost::geometry::model::linear_ring<point_type> hull[wkt_cities_count];
for (int i = 0; i < wkt_cities_count; i++)
{
@@ -215,19 +215,19 @@
void svg_intersection_roads()
{
// Read the road network
- typedef boost::geometry::point_xy<double> point_type;
- typedef boost::geometry::linestring<point_type> line_type;
+ typedef boost::geometry::model::point_xy<double> point_type;
+ typedef boost::geometry::model::linestring<point_type> line_type;
typedef boost::tuple<line_type, std::string> road_type;
- boost::geometry::box<point_type> bbox;
+ boost::geometry::model::box<point_type> bbox;
boost::geometry::assign_inverse(bbox);
std::vector<road_type> roads;
read_wkt<line_type>("../../../example/data/roads.wkt", roads, bbox);
// intersect
- boost::geometry::box<point_type> clip;
+ boost::geometry::model::box<point_type> clip;
std::vector<line_type> intersected;
boost::geometry::assign(clip, -100, 25, -90, 50);
@@ -262,20 +262,20 @@
void svg_intersection_countries()
{
// Read the road network
- typedef boost::geometry::point_xy<double> point_type;
- typedef boost::geometry::polygon<point_type> poly_type;
- typedef boost::geometry::multi_polygon<poly_type> mp_type;
+ typedef boost::geometry::model::point_xy<double> point_type;
+ typedef boost::geometry::model::polygon<point_type> poly_type;
+ typedef boost::geometry::model::multi_polygon<poly_type> mp_type;
typedef boost::tuple<mp_type, std::string> country_type;
- boost::geometry::box<point_type> bbox;
+ boost::geometry::model::box<point_type> bbox;
boost::geometry::assign_inverse(bbox);
std::vector<country_type> countries;
read_wkt<mp_type>("../../../example/data/world.wkt", countries, bbox);
// intersect
- boost::geometry::box<point_type> clip;
+ boost::geometry::model::box<point_type> clip;
std::vector<poly_type> intersected;
boost::geometry::assign(clip, -100, -50, 100, 50);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk