diff --git a/doc/qbk/snippets/qbk_1.cpp b/doc/qbk/snippets/qbk_1.cpp index e08a6ae57..21225c815 100644 --- a/doc/qbk/snippets/qbk_1.cpp +++ b/doc/qbk/snippets/qbk_1.cpp @@ -70,7 +70,7 @@ void example_area_polygon() //[area_polygon //` Calculate the area of a polygon namespace bg = boost::geometry; - bg::model::polygon > poly; /*< Declare >*/ + bg::model::polygon > 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 >*/ //] @@ -107,7 +107,7 @@ void example_area_polygon_strategy() void example_as_wkt_point() { - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; P p(5.12, 6.34); // Points can be streamed like this: std::cout << boost::geometry::dsv

(p) << std::endl; @@ -121,8 +121,8 @@ void example_as_wkt_point() void example_as_wkt_vector() { - std::vector > v; - boost::geometry::read_wkt >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v)); + std::vector > v; + boost::geometry::read_wkt >("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_as_wkt_vector() void example_centroid_polygon() { - boost::geometry::model::polygon > poly; + boost::geometry::model::polygon > 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::model::point_xy center; + boost::geometry::model::d2::point_xy center; boost::geometry::centroid(poly, center); std::cout << "Centroid: " << boost::geometry::dsv(center) << std::endl; } @@ -141,8 +141,8 @@ void example_centroid_polygon() void example_distance_point_point() { - boost::geometry::model::point_xy p1(1, 1); - boost::geometry::model::point_xy p2(2, 3); + boost::geometry::model::d2::point_xy p1(1, 1); + boost::geometry::model::d2::point_xy p2(2, 3); std::cout << "Distance p1-p2 is " << boost::geometry::distance(p1, p2) << " units" << std::endl; @@ -179,28 +179,28 @@ void example_distance_point_point_strategy() void example_from_wkt_point() { - boost::geometry::model::point_xy point; + boost::geometry::model::d2::point_xy 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 > v; - boost::geometry::read_wkt >("linestring(1 1,2 2,3 3,4 4)", std::back_inserter(v)); + std::vector > v; + boost::geometry::read_wkt >("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::model::linestring > line; + boost::geometry::model::linestring > 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::model::polygon > poly; + boost::geometry::model::polygon > 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_point_ll_convert() void example_intersection_linestring() { //[intersection_linestring - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; std::vector

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 @@ void example_intersects_linestring() { //[intersects_linestring //` Check if two linestrings (here: vectors) intersect each other - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; std::vector

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_intersects_linestring() void example_intersection_segment() { //[intersection_segment - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; boost::geometry::model::segment

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 @@ void example_intersection_inserter_segment() { //[intersection_segment_inserter - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; boost::geometry::model::segment

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 @@ void example_intersects_segment() { //[intersects_segment //` Check if two segments intersect each other - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; boost::geometry::model::segment

line1, line2; boost::geometry::read_wkt("linestring(1 1,2 2)", line1); boost::geometry::read_wkt("linestring(2 1,1 2)", line2); @@ -292,7 +292,7 @@ void example_intersects_segment() void example_clip_linestring1() { - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; boost::geometry::model::linestring

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::model::box

cb(P(1.5, 1.5), P(4.5, 2.5)); @@ -304,7 +304,7 @@ void example_clip_linestring1() void example_clip_linestring2() { - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; std::vector

vector_in; 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)", std::back_inserter(vector_in)); @@ -328,7 +328,7 @@ void example_clip_linestring2() void example_intersection_polygon1() { - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; typedef std::vector > PV; boost::geometry::model::box

cb(P(1.5, 1.5), P(4.5, 2.5)); @@ -350,7 +350,7 @@ void example_simplify_linestring1() { //[simplify //` Simplify a linestring - boost::geometry::model::linestring > line, simplified; + boost::geometry::model::linestring > 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,7 +363,7 @@ void example_simplify_linestring2() { //[simplify_inserter //` Simplify a linestring using an output iterator - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; typedef boost::geometry::model::linestring

L; L line; @@ -379,9 +379,9 @@ void example_simplify_linestring2() void example_within() { - boost::geometry::model::polygon > poly; + boost::geometry::model::polygon > poly; boost::geometry::read_wkt("POLYGON((0 0,0 7,4 2,2 0,0 0))", poly); - boost::geometry::model::point_xy point(3, 3); + boost::geometry::model::d2::point_xy point(3, 3); std::cout << "Point is " << (boost::geometry::within(point, poly) ? "IN" : "NOT in") << " polygon" @@ -392,7 +392,7 @@ void example_within() void example_within_strategy() { // TO BE UPDATED/FINISHED - typedef boost::geometry::model::point_xy P; + typedef boost::geometry::model::d2::point_xy P; typedef boost::geometry::model::polygon

POLY; P p; std::cout << within(p, poly, strategy::within::cross_count

) << std::endl; @@ -404,7 +404,7 @@ void example_length_linestring() //[length //` The following simple example shows the calculation of the length of a linestring containing three points using namespace boost::geometry; - model::linestring > line; + model::linestring > 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() void example_length_linestring_iterators2() { - std::vector > line; - boost::geometry::read_wkt >("linestring(0 0,1 1,4 8,3 2)", std::back_inserter(line)); + std::vector > line; + boost::geometry::read_wkt >("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; @@ -477,9 +477,9 @@ void example_length_linestring_strategy() void example_envelope_linestring() { - boost::geometry::model::linestring > line; + boost::geometry::model::linestring > line; boost::geometry::read_wkt("linestring(0 0,1 1,4 8,3 2)", line); - boost::geometry::model::box > box; + boost::geometry::model::box > box; boost::geometry::envelope(line, box); std::cout << "envelope is " << boost::geometry::dsv(box) << std::endl; diff --git a/doc/qbk/snippets/qbk_2.cpp b/doc/qbk/snippets/qbk_2.cpp index 6c1fc4731..9859ff13d 100644 --- a/doc/qbk/snippets/qbk_2.cpp +++ b/doc/qbk/snippets/qbk_2.cpp @@ -90,7 +90,7 @@ void example_for_main_page() //` Snippets below assume the namespace boost::geometry is known using namespace boost::geometry; - //` It should be possible to use a very small part of the library, for example only the distance between two points. + //` It should be possible to use a very small part of the library, for example only the distance between two points. int a[2] = {1,1}; int b[2] = {2,3}; double d = distance(a, b); @@ -98,15 +98,15 @@ void example_for_main_page() //` 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; + model::d2::polygon poly; append(poly, points); boost::tuple p = boost::make_tuple(3.7, 2.0); std::cout << "Point p is in polygon? " << (within(p, poly) ? "YES" : "NO") << std::endl; - //` or area: + //` or area: std::cout << "Area: " << area(poly) << std::endl; - //` It is possible, by the nature of a template library, to mix the point types declared above: + //` It is possible, by the nature of a template library, to mix the point types declared above: double d2 = distance(a, p); std::cout << "Distance a-p is:" << d2 << std::endl; @@ -148,8 +148,8 @@ void example_for_transform() std::cout << dsv(p) << " <-> " << dsv(sph2) << std::endl; - typedef model::point_xy XY; - typedef model::point_xy PIXEL; + typedef model::d2::point_xy XY; + typedef model::d2::point_xy PIXEL; XY xy(50, 50); strategy::transform::map_transformer map(0, 0, 100, 100, 1024, 768); PIXEL pix; diff --git a/doc/qbk/snippets/qbk_4.cpp b/doc/qbk/snippets/qbk_4.cpp index c44bbf2d0..d8f0374de 100644 --- a/doc/qbk/snippets/qbk_4.cpp +++ b/doc/qbk/snippets/qbk_4.cpp @@ -87,7 +87,7 @@ void svg_simplify_road() //"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::model::point_xy point_type; + typedef boost::geometry::model::d2::point_xy point_type; std::ofstream svg("simplify_road.svg"); boost::geometry::svg_mapper mapper(svg, 300, 300); @@ -119,7 +119,7 @@ void svg_simplify_road() void svg_simplify_country() { - typedef boost::geometry::model::point_xy point_type; + typedef boost::geometry::model::d2::point_xy point_type; std::ofstream svg("simplify_country.svg"); boost::geometry::svg_mapper mapper(svg, 300, 300); @@ -150,7 +150,7 @@ void svg_simplify_country() void svg_convex_hull_country() { - typedef boost::geometry::model::point_xy point_type; + typedef boost::geometry::model::d2::point_xy point_type; std::ofstream svg("convex_hull_country.svg"); boost::geometry::svg_mapper mapper(svg, 300, 300); @@ -183,7 +183,7 @@ void svg_convex_hull_country() void svg_convex_hull_cities() { - typedef boost::geometry::model::point_xy point_type; + typedef boost::geometry::model::d2::point_xy point_type; std::ofstream svg("convex_hull_cities.svg"); boost::geometry::svg_mapper mapper(svg, 300, 300); @@ -215,7 +215,7 @@ void svg_convex_hull_cities() void svg_intersection_roads() { // Read the road network - typedef boost::geometry::model::point_xy point_type; + typedef boost::geometry::model::d2::point_xy point_type; typedef boost::geometry::model::linestring line_type; typedef boost::tuple road_type; @@ -262,7 +262,7 @@ void svg_intersection_roads() void svg_intersection_countries() { // Read the road network - typedef boost::geometry::model::point_xy point_type; + typedef boost::geometry::model::d2::point_xy point_type; typedef boost::geometry::model::polygon poly_type; typedef boost::geometry::model::multi_polygon mp_type; diff --git a/example/01_point_example.cpp b/example/01_point_example.cpp index c91e619e4..b2727c5e7 100644 --- a/example/01_point_example.cpp +++ b/example/01_point_example.cpp @@ -25,7 +25,7 @@ int main() model::point pt1; // 2: it's own type targetted to Cartesian (x,y) coordinates - model::point_2d pt2; + model::d2::point pt2; // 3: it supports Boost tuple's (by including the headerfile) boost::tuple pt3; @@ -53,16 +53,16 @@ int main() // Several ways of construction and setting point values // 1: default, empty constructor, causing no initialization at all - model::point_2d p1; + model::d2::point p1; // 2: as shown above, assign - model::point_2d p2; + model::d2::point p2; assign(p2, 1, 1); // 3: using "set" function // set uses the concepts behind, such that it can be applied for // every point-type (like assign) - model::point_2d p3; + model::d2::point p3; set<0>(p3, 1); set<1>(p3, 1); // set<2>(p3, 1); //will result in compile-error @@ -71,11 +71,11 @@ int main() // 3: for any point type, and other geometry objects: // there is the "make" object generator // (this one requires to specify the point-type). - model::point_2d p4 = make(1,1); + model::d2::point p4 = make(1,1); - // 5: for the point_2d type only: constructor with two values - model::point_2d p5(1,1); + // 5: for the d2::point type only: constructor with two values + model::d2::point p5(1,1); // 6: for boost tuples you can of course use make_tuple diff --git a/example/02_linestring_example.cpp b/example/02_linestring_example.cpp index d5e265fb9..45fca3162 100644 --- a/example/02_linestring_example.cpp +++ b/example/02_linestring_example.cpp @@ -71,13 +71,13 @@ int main(void) // Define a linestring, which is a vector of points, and add some points // (we add them deliberately in different ways) - model::linestring_2d ls; + model::d2::linestring ls; // points can be created using "make" and added to a linestring using the std:: "push_back" - ls.push_back(make(1.1, 1.1)); + ls.push_back(make(1.1, 1.1)); // points can also be assigned using "assign" and added to a linestring using "append" - model::point_2d lp; + model::d2::point lp; assign(lp, 2.5, 2.1); append(ls, lp); @@ -85,7 +85,7 @@ int main(void) std::cout << boost::geometry::dsv(ls) << std::endl; // The bounding box of linestrings can be calculated - model::box_2d b; + model::d2::box b; envelope(ls, b); std::cout << boost::geometry::dsv(b) << std::endl; @@ -102,13 +102,13 @@ int main(void) std::cout << "number of points 3: " << num_points(ls) << std::endl; // The distance from a point to a linestring can be calculated - model::point_2d p(1.9, 1.2); + model::d2::point p(1.9, 1.2); std::cout << "distance of " << boost::geometry::dsv(p) << " to line: " << distance(p, ls) << std::endl; // A linestring is a vector. However, some algorithms consider "segments", // which are the line pieces between two points of a linestring. - double d = distance(p, model::segment(ls.front(), ls.back())); + double d = distance(p, model::segment(ls.front(), ls.back())); std::cout << "distance: " << d << std::endl; // Add some three points more, let's do it using a classic array. @@ -119,7 +119,7 @@ int main(void) // Output as iterator-pair on a vector { - std::vector v; + std::vector v; std::copy(ls.begin(), ls.end(), std::back_inserter(v)); std::cout @@ -139,7 +139,7 @@ int main(void) std::reverse(boost::begin(ls), boost::end(ls)); // The other way, using a vector instead of a linestring, is also possible - std::vector pv(ls.begin(), ls.end()); + std::vector pv(ls.begin(), ls.end()); std::cout << "length: " << length(pv) << std::endl; // If there are double points in the line, you can use unique to remove them @@ -148,22 +148,22 @@ int main(void) // (sidenote, we have to make copies, because // ls.push_back(ls.back()) often succeeds but // IS dangerous and erroneous! - model::point_2d last = ls.back(), first = ls.front(); + model::d2::point last = ls.back(), first = ls.front(); ls.push_back(last); ls.insert(ls.begin(), first); } std::cout << "extra duplicate points: " << boost::geometry::dsv(ls) << std::endl; { - model::linestring_2d ls_copy; + model::d2::linestring ls_copy; std::unique_copy(ls.begin(), ls.end(), std::back_inserter(ls_copy), - boost::geometry::equal_to()); + boost::geometry::equal_to()); ls = ls_copy; std::cout << "uniquecopy: " << boost::geometry::dsv(ls) << std::endl; } // Lines can be simplified. This removes points, but preserves the shape - model::linestring_2d ls_simplified; + model::d2::linestring ls_simplified; simplify(ls, ls_simplified, 0.5); std::cout << "simplified: " << boost::geometry::dsv(ls_simplified) << std::endl; @@ -175,32 +175,32 @@ int main(void) // 4) loop is defined for geometries to visit segments // with state apart, and to be able to break out (not shown here) { - model::linestring_2d lscopy = ls; - std::for_each(lscopy.begin(), lscopy.end(), translate_function); - for_each_point(lscopy, scale_functor()); - for_each_point(lscopy, translate_function); + model::d2::linestring lscopy = ls; + std::for_each(lscopy.begin(), lscopy.end(), translate_function); + for_each_point(lscopy, scale_functor()); + for_each_point(lscopy, translate_function); std::cout << "modified line: " << boost::geometry::dsv(lscopy) << std::endl; } // Lines can be clipped using a clipping box. Clipped lines are added to the output iterator - model::box_2d cb(model::point_2d(1.5, 1.5), model::point_2d(4.5, 2.5)); + model::d2::box cb(model::d2::point(1.5, 1.5), model::d2::point(4.5, 2.5)); - std::vector clipped; - intersection_inserter (cb, ls, std::back_inserter(clipped)); + std::vector clipped; + intersection_inserter (cb, ls, std::back_inserter(clipped)); // Also possible: clip-output to a vector of vectors - std::vector > vector_out; - intersection_inserter >(cb, ls, std::back_inserter(vector_out)); + std::vector > vector_out; + intersection_inserter >(cb, ls, std::back_inserter(vector_out)); std::cout << "clipped output as vector:" << std::endl; - for (std::vector >::const_iterator it + for (std::vector >::const_iterator it = vector_out.begin(); it != vector_out.end(); ++it) { std::cout << boost::geometry::dsv(*it) << std::endl; } // Calculate the convex hull of the linestring - model::polygon_2d hull; + model::d2::polygon hull; convex_hull(ls, hull); std::cout << "Convex hull:" << boost::geometry::dsv(hull) << std::endl; diff --git a/example/03_polygon_example.cpp b/example/03_polygon_example.cpp index b6703ffb8..5478c27a1 100644 --- a/example/03_polygon_example.cpp +++ b/example/03_polygon_example.cpp @@ -29,7 +29,7 @@ int main(void) // Define a polygon and fill the outer ring. // In most cases you will read it from a file or database - model::polygon_2d poly; + model::d2::polygon poly; { const double coor[][2] = { {2.0, 1.3}, {2.4, 1.7}, {2.8, 1.8}, {3.4, 1.2}, {3.7, 1.6}, @@ -48,7 +48,7 @@ int main(void) std::cout << dsv(poly) << std::endl; // As with lines, bounding box of polygons can be calculated - model::box_2d b; + model::d2::box b; envelope(poly, b); std::cout << dsv(b) << std::endl; @@ -56,7 +56,7 @@ int main(void) std::cout << "area: " << area(poly) << std::endl; // And the centroid, which is the center of gravity - model::point_2d cent; + model::d2::point cent; centroid(poly, cent); std::cout << "centroid: " << dsv(cent) << std::endl; @@ -69,7 +69,7 @@ int main(void) // Let's add one { poly.inners().resize(1); - model::linear_ring& inner = poly.inners().back(); + model::linear_ring& inner = poly.inners().back(); const double coor[][2] = { {4.0, 2.0}, {4.2, 1.4}, {4.8, 1.9}, {4.4, 2.2}, {4.0, 2.0} }; assign(inner, coor); @@ -85,9 +85,9 @@ int main(void) // You can test whether points are within a polygon std::cout << "point in polygon:" - << " p1: " << boolstr(within(make(3.0, 2.0), poly)) - << " p2: " << boolstr(within(make(3.7, 2.0), poly)) - << " p3: " << boolstr(within(make(4.4, 2.0), poly)) + << " p1: " << boolstr(within(make(3.0, 2.0), poly)) + << " p2: " << boolstr(within(make(3.7, 2.0), poly)) + << " p3: " << boolstr(within(make(4.4, 2.0), poly)) << std::endl; // As with linestrings and points, you can derive from polygon to add, for example, @@ -95,8 +95,8 @@ int main(void) // We don't show this here. // Clip the polygon using a bounding box - model::box_2d cb(make(1.5, 1.5), make(4.5, 2.5)); - typedef std::vector polygon_list; + model::d2::box cb(make(1.5, 1.5), make(4.5, 2.5)); + typedef std::vector polygon_list; polygon_list v; intersection(cb, poly, v); @@ -106,11 +106,11 @@ int main(void) std::cout << dsv(*it) << std::endl; } - typedef model::multi_polygon polygon_set; + typedef model::multi_polygon polygon_set; polygon_set ps; union_(cb, poly, ps); - model::polygon_2d hull; + model::d2::polygon hull; convex_hull(poly, hull); std::cout << "Convex hull:" << dsv(hull) << std::endl; @@ -118,14 +118,14 @@ int main(void) // You don't have to use a vector, you can define a polygon with a deque // You can specify the container for the points and for the inner rings independantly - typedef model::polygon polygon_type; + typedef model::polygon polygon_type; polygon_type poly2; ring_type::type& ring = exterior_ring(poly2); - append(ring, make(2.8, 1.9)); - append(ring, make(2.9, 2.4)); - append(ring, make(3.3, 2.2)); - append(ring, make(3.2, 1.8)); - append(ring, make(2.8, 1.9)); + append(ring, make(2.8, 1.9)); + append(ring, make(2.9, 2.4)); + append(ring, make(3.3, 2.2)); + append(ring, make(3.2, 1.8)); + append(ring, make(2.8, 1.9)); std::cout << dsv(poly2) << std::endl; return 0; diff --git a/example/05_a_overlay_polygon_example.cpp b/example/05_a_overlay_polygon_example.cpp index 8bfbb2029..bb9d0d015 100644 --- a/example/05_a_overlay_polygon_example.cpp +++ b/example/05_a_overlay_polygon_example.cpp @@ -27,10 +27,10 @@ int main(void) namespace bg = boost::geometry; std::ofstream stream("05_a_intersection_polygon_example.svg"); - bg::svg_mapper svg(stream, 500, 500); + bg::svg_mapper svg(stream, 500, 500); // Define a polygons and fill the outer rings. - bg::model::polygon_2d a; + bg::model::d2::polygon a; { const double c[][2] = { {160, 330}, {60, 260}, {20, 150}, {60, 40}, {190, 20}, {270, 130}, {260, 250}, {160, 330} @@ -41,7 +41,7 @@ int main(void) std::cout << "A: " << bg::dsv(a) << std::endl; svg.add(a); - bg::model::polygon_2d b; + bg::model::d2::polygon b; { const double c[][2] = { {300, 330}, {190, 270}, {150, 170}, {150, 110}, {250, 30}, {380, 50}, {380, 250}, {300, 330} @@ -57,11 +57,11 @@ int main(void) // Calculate interesection(s) - std::vector intersection; - bg::intersection(a, b, intersection); + std::vector intersection; + bg::intersection(a, b, intersection); std::cout << "Intersection of polygons A and B" << std::endl; - BOOST_FOREACH(bg::model::polygon_2d const& polygon, intersection) + BOOST_FOREACH(bg::model::d2::polygon const& polygon, intersection) { std::cout << bg::dsv(polygon) << std::endl; svg.map(polygon, "opacity:0.5;fill:none;stroke:rgb(255,0,0);stroke-width:6"); diff --git a/example/05_b_overlay_linestring_polygon_example.cpp b/example/05_b_overlay_linestring_polygon_example.cpp index 0462b70b5..23489083f 100644 --- a/example/05_b_overlay_linestring_polygon_example.cpp +++ b/example/05_b_overlay_linestring_polygon_example.cpp @@ -27,13 +27,13 @@ int main(void) namespace bg = boost::geometry; // Define a polygons and fill the outer rings. - bg::model::linestring_2d ls; + bg::model::d2::linestring ls; { const double c[][2] = { {0, 1}, {2, 5}, {5, 3} }; bg::assign(ls, c); } - bg::model::polygon_2d p; + bg::model::d2::polygon p; { const double c[][2] = { {3, 0}, {0, 3}, {4, 5}, {3, 0} }; bg::assign(p, c); @@ -42,7 +42,7 @@ int main(void) // Create SVG-mapper std::ofstream stream("05_b_overlay_linestring_polygon_example.svg"); - bg::svg_mapper svg(stream, 500, 500); + bg::svg_mapper svg(stream, 500, 500); // Determine extend by adding geometries svg.add(p); svg.add(ls); @@ -52,7 +52,7 @@ int main(void) // Calculate intersection points (turn points) - typedef bg::detail::overlay::turn_info turn_info; + typedef bg::detail::overlay::turn_info turn_info; std::vector turns; bg::detail::get_turns::no_interrupt_policy policy; bg::get_turns(ls, p, turns, policy); diff --git a/example/06_a_transformation_example.cpp b/example/06_a_transformation_example.cpp index 8d3c43de8..d61425cdc 100644 --- a/example/06_a_transformation_example.cpp +++ b/example/06_a_transformation_example.cpp @@ -19,17 +19,17 @@ int main() { using namespace boost::geometry; - model::point_2d p(1, 1); - model::point_2d p2; + model::d2::point p(1, 1); + model::d2::point p2; // Example: translate a point over (5,5) - strategy::transform::translate_transformer translate(5, 5); + strategy::transform::translate_transformer translate(5, 5); transform(p, p2, translate); std::cout << "transformed point " << boost::geometry::dsv(p2) << std::endl; // Transform a polygon - model::polygon_2d poly, poly2; + model::d2::polygon poly, poly2; const double coor[][2] = { {0, 0}, {0, 7}, {2, 2}, {2, 0}, {0, 0} }; // note that for this syntax you have to include the two // include files above (c_array_cartesian.hpp, std_as_linestring.hpp) diff --git a/example/06_b_transformation_example.cpp b/example/06_b_transformation_example.cpp index a345d80f6..40b6307f4 100644 --- a/example/06_b_transformation_example.cpp +++ b/example/06_b_transformation_example.cpp @@ -113,36 +113,36 @@ int main() svg_output svg(ofs, 0.5); // G1 - create subject for affine transformations - model::polygon_2d g1; + model::d2::polygon g1; read_wkt("POLYGON((50 250, 400 250, 150 50, 50 250))", g1); std::clog << "source box:\t" << boost::geometry::dsv(g1) << std::endl; svg.put(g1, "g1"); // G1 - Translate -> G2 - translate_transformer translate(0, 250); - model::polygon_2d g2; + translate_transformer translate(0, 250); + model::d2::polygon g2; transform(g1, g2, translate); std::clog << "translated:\t" << boost::geometry::dsv(g2) << std::endl; svg.put(g2, "g2=g1.translate(0,250)"); // G2 - Scale -> G3 - scale_transformer scale(0.5, 0.5); - model::polygon_2d g3; + scale_transformer scale(0.5, 0.5); + model::d2::polygon g3; transform(g2, g3, scale); std::clog << "scaled:\t" << boost::geometry::dsv(g3) << std::endl; svg.put(g3, "g3=g2.scale(0.5,0.5)"); // G3 - Combine rotate and translate -> G4 - rotate_transformer rotate(45); + rotate_transformer rotate(45); // Compose matrix for the two transformation // Create transformer attached to the transformation matrix - ublas_transformer + ublas_transformer combined(boost::numeric::ublas::prod(rotate.matrix(), translate.matrix())); //combined(rotate.matrix()); // Apply transformation to subject geometry point-by-point - model::polygon_2d g4; + model::d2::polygon g4; transform(g3, g4, combined); std::clog << "rotated & translated:\t" << boost::geometry::dsv(g4) << std::endl; diff --git a/example/07_a_graph_route_example.cpp b/example/07_a_graph_route_example.cpp index bafe9679d..aa82ef973 100644 --- a/example/07_a_graph_route_example.cpp +++ b/example/07_a_graph_route_example.cpp @@ -264,7 +264,7 @@ int main() // Define a point in the Geographic coordinate system typedef boost::geometry::model::point < - double, 2, boost::geometry::cs::geographic + double, 2, boost::geometry::cs::geographic > point_type; typedef boost::geometry::model::linestring line_type; @@ -281,7 +281,7 @@ int main() // Init a bounding box, lateron used to define SVG map - boost::geometry::model::box_2d box; + boost::geometry::model::d2::box box; boost::geometry::assign_inverse(box); // Read the cities @@ -364,19 +364,19 @@ int main() BOOST_FOREACH(road_type const& road, roads) { - mapper.map(road.get<0>(), + mapper.map(road.get<0>(), "stroke:rgb(128,128,128);stroke-width:1"); } - mapper.map(route, + mapper.map(route, "stroke:rgb(0, 255, 0);stroke-width:6;opacity:0.5"); // Map cities BOOST_FOREACH(city_type const& city, cities) { - mapper.map(city.get<0>(), + mapper.map(city.get<0>(), "fill:rgb(255,255,0);stroke:rgb(0,0,0);stroke-width:1"); - mapper.text(city.get<0>(), city.get<1>(), + mapper.text(city.get<0>(), city.get<1>(), "fill:rgb(0,0,0);font-family:Arial;font-size:10px", 5, 5); } diff --git a/example/07_b_graph_route_example.cpp b/example/07_b_graph_route_example.cpp index feefe5060..3dc491a4c 100644 --- a/example/07_b_graph_route_example.cpp +++ b/example/07_b_graph_route_example.cpp @@ -250,7 +250,7 @@ int main() // Define a point in the Geographic coordinate system typedef boost::geometry::model::point < - double, 2, boost::geometry::cs::geographic + double, 2, boost::geometry::cs::geographic > point_type; typedef boost::geometry::model::linestring line_type; @@ -269,7 +269,7 @@ int main() // Init a bounding box, lateron used to define SVG map - boost::geometry::model::box_2d box; + boost::geometry::model::d2::box box; boost::geometry::assign_inverse(box); graph_type graph; @@ -352,19 +352,19 @@ int main() BOOST_FOREACH(road_type const& road, roads) { - mapper.map(road.get<0>(), + mapper.map(road.get<0>(), "stroke:rgb(128,128,128);stroke-width:1"); } - mapper.map(route, + mapper.map(route, "stroke:rgb(0, 255, 0);stroke-width:6;opacity:0.5"); // Map cities BOOST_FOREACH(city_type const& city, cities) { - mapper.map(city.get<0>(), + mapper.map(city.get<0>(), "fill:rgb(255,255,0);stroke:rgb(0,0,0);stroke-width:1"); - mapper.text(city.get<0>(), city.get<1>(), + mapper.text(city.get<0>(), city.get<1>(), "fill:rgb(0,0,0);font-family:Arial;font-size:10px", 5, 5); } diff --git a/example/c04_a_custom_triangle_example.cpp b/example/c04_a_custom_triangle_example.cpp index 6b323ec61..f90eb5ffb 100644 --- a/example/c04_a_custom_triangle_example.cpp +++ b/example/c04_a_custom_triangle_example.cpp @@ -19,7 +19,7 @@ #include -struct triangle : public boost::array, 4> +struct triangle : public boost::array, 4> { inline void close() { @@ -71,7 +71,7 @@ int main() std::cout << "Triangle: " << boost::geometry::dsv(t) << std::endl; std::cout << "Area: " << boost::geometry::area(t) << std::endl; - boost::geometry::model::point_xy c; + boost::geometry::model::d2::point_xy c; boost::geometry::centroid(t, c); std::cout << "Centroid: " << boost::geometry::dsv(c) << std::endl; diff --git a/example/c05_custom_point_pointer_example.cpp b/example/c05_custom_point_pointer_example.cpp index f73fedf4b..c85804f14 100644 --- a/example/c05_custom_point_pointer_example.cpp +++ b/example/c05_custom_point_pointer_example.cpp @@ -86,16 +86,16 @@ int main() std::cout << boost::geometry::length(myline) << std::endl; - boost::geometry::model::box_2d cb(boost::geometry::model::point_2d(1.5, 1.5), boost::geometry::model::point_2d(4.5, 4.5)); + boost::geometry::model::d2::box cb(boost::geometry::model::d2::point(1.5, 1.5), boost::geometry::model::d2::point(4.5, 4.5)); // This will NOT work because would need dynamicly allocating memory for point* in algorithms: // std::vector clipped; //boost::geometry::intersection(cb, myline, std::back_inserter(clipped)); // This works because outputs to a normal struct point, no point* - std::vector clipped; - boost::geometry::strategy::intersection::liang_barsky strategy; - boost::geometry::detail::intersection::clip_range_with_box(cb, + std::vector clipped; + boost::geometry::strategy::intersection::liang_barsky strategy; + boost::geometry::detail::intersection::clip_range_with_box(cb, myline, std::back_inserter(clipped), strategy); diff --git a/example/c07_custom_ring_pointer_example.cpp b/example/c07_custom_ring_pointer_example.cpp index db57cdc70..35b2ef1d7 100644 --- a/example/c07_custom_ring_pointer_example.cpp +++ b/example/c07_custom_ring_pointer_example.cpp @@ -97,20 +97,20 @@ int main() //std::vector unioned; //boost::geometry::union(a, b, std::back_inserter(unioned)); - std::vector unioned; - std::vector intersected; + std::vector unioned; + std::vector intersected; // Temporarily not working /* - boost::geometry::intersection_inserter(a, b, std::back_inserter(intersected)); - boost::geometry::union_inserter(a, b, std::back_inserter(unioned)); + boost::geometry::intersection_inserter(a, b, std::back_inserter(intersected)); + boost::geometry::union_inserter(a, b, std::back_inserter(unioned)); double ai = 0, au = 0; - BOOST_FOREACH(boost::geometry::ring_2d const& ring, intersected) + BOOST_FOREACH(boost::geometry::d2::ring const& ring, intersected) { ai += boost::geometry::area(ring); } - BOOST_FOREACH(boost::geometry::ring_2d const& ring, unioned) + BOOST_FOREACH(boost::geometry::d2::ring const& ring, unioned) { au += boost::geometry::area(ring); } diff --git a/example/extensions/gis/latlong/distance_example.cpp b/example/extensions/gis/latlong/distance_example.cpp index 8d31ca002..834163a2e 100644 --- a/example/extensions/gis/latlong/distance_example.cpp +++ b/example/extensions/gis/latlong/distance_example.cpp @@ -28,7 +28,7 @@ #endif // BSG 28-10-2010 -// TODO: celar up this test +// TODO: clear up this test // it is more a test than an example // the results are sometimes WRONG @@ -37,7 +37,7 @@ int main() using namespace boost::geometry; - typedef model::point_ll_deg latlon_point; + typedef model::ll::point latlon_point; latlon_point city1; // Amsterdam 52 22'23"N 4 53'32"E @@ -58,30 +58,30 @@ int main() latlon_point city3(longitude<>(dms(2, 11, 0)), latitude<>(dms(41, 23, 0))); - model::point_ll_rad a_rad, r_rad, h_rad; - transform(city1, a_rad); - transform(city2, r_rad); - transform(city3, h_rad); + model::ll::point city1_rad, city2_rad, city3_rad; + transform(city1, city1_rad); + transform(city2, city2_rad); + transform(city3, city3_rad); #ifndef NO_PROJECTION /* - projection::sterea_ellipsoid proj + projection::sterea_ellipsoid, model::d2::point> proj (projection::init( "+lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m")); */ - projection::laea_ellipsoid proj + projection::laea_ellipsoid, model::d2::point> proj (projection::init( " +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m")); - model::point_2d a_rd, r_rd, h_rd; - proj.forward(a_rad, a_rd); - proj.forward(h_rad, h_rd); - proj.forward(r_rad, r_rd); + model::d2::point city1_prj, city2_prj, city3_prj; + proj.forward(city1_rad, city1_prj); + proj.forward(city3_rad, city3_prj); + proj.forward(city2_rad, city2_prj); #else - model::point_2d a_rd(121267, 487245); - model::point_2d r_rd(92526.2, 438324); - model::point_2d h_rd(80454.2, 455086); + model::d2::point city1_prj(121267, 487245); + model::d2::point city2_prj(92526.2, 438324); + model::d2::point city3_prj(80454.2, 455086); #endif // ------------------------------------------------------------------------------------------ @@ -90,12 +90,12 @@ int main() std::cout << "Distance " << city1_name << "-" << city2_name << ": " << std::endl; std::cout << "haversine: " << 0.001 * distance(city1, city2) << " km" << std::endl; - std::cout << "haversine rad: " << 0.001 * distance(a_rad, r_rad) << " km" << std::endl; + std::cout << "haversine rad: " << 0.001 * distance(city1_rad, city2_rad) << " km" << std::endl; std::cout << "haversine other radius: " << distance(city1, city2, strategy::distance::haversine(6371.0) ) << " km" << std::endl; std::cout << "andoyer: " << 0.001 * distance(city1, city2, strategy::distance::andoyer() ) << " km" << std::endl; std::cout << "vincenty: " << 0.001 * distance(city1, city2, strategy::distance::vincenty() ) << " km" << std::endl; - std::cout << "vincenty rad: " << 0.001 * distance(a_rad, r_rad, strategy::distance::vincenty() ) << " km" << std::endl; - std::cout << "Projected, pythagoras: " << 0.001 * distance(a_rd, r_rd) << " km" << std::endl; + std::cout << "vincenty rad: " << 0.001 * distance(city1_rad, city2_rad, strategy::distance::vincenty>() ) << " km" << std::endl; + std::cout << "Projected, pythagoras: " << 0.001 * distance(city1_prj, city2_prj) << " km" << std::endl; std::cout << std::endl; std::cout << "Distance " << city1_name << "-" << city3_name << ": " << std::endl; @@ -108,35 +108,35 @@ int main() // ------------------------------------------------------------------------------------------ std::cout << std::endl << city3_name << " - line " << city1_name << "," << city2_name << std::endl; - model::segment_2d ar_xy(a_rd, r_rd); + model::d2::segment ar_xy(city1_prj, city2_prj); - double dr = distance(h_rd, ar_xy); - std::cout << "in RD: " << 0.001 * dr << std::endl; + double dr = distance(city3_prj, ar_xy); + std::cout << "projected: " << 0.001 * dr << std::endl; double const radius = 6378137.0; - dr = distance(city3, model::segment_ll_deg(city1, city2)); + dr = distance(city3, model::segment(city1, city2)); std::cout << "in LL: " << 0.001 * dr << std::endl; std::cout << std::endl << city2_name << " - line " << city1_name << "," << city3_name << std::endl; - dr = distance(r_rd, model::segment_2d(a_rd, h_rd)); - std::cout << "in RD: " << 0.001 * dr << std::endl; - dr = distance(city2, model::segment_ll_deg(city1, city3)); + dr = distance(city2_prj, model::d2::segment(city1_prj, city3_prj)); + std::cout << "projected: " << 0.001 * dr << std::endl; + dr = distance(city2, model::segment(city1, city3)); std::cout << "in LL: " << 0.001 * dr << std::endl; std::cout << std::endl; - + // ------------------------------------------------------------------------------------------ // Compilation // ------------------------------------------------------------------------------------------ // Next line does not compile because Vincenty cannot work on xy-points - //std::cout << "vincenty on xy: " << 0.001 * distance(a_rd, r_rd, formulae::distance::vincenty<>() ) << " km" << std::endl; + //std::cout << "vincenty on xy: " << 0.001 * distance(city1_prj, city2_prj, formulae::distance::vincenty<>() ) << " km" << std::endl; // Next line does not compile because you cannot (yet) assign degree to radian directly - //point_ll_rad a_rad2 = city1; + //ll::point a_rad2 = city1; // Next line does not compile because you cannot assign latlong to xy - // point_2d axy = city1; + // d2::point axy = city1; // ------------------------------------------------------------------------------------------ // Length @@ -144,15 +144,15 @@ int main() // Length calculations use distances internally. The lines below take automatically the default // formulae for distance. However, you can also specify city1 formula explicitly. - model::linestring_ll_deg line1; + model::linestring line1; append(line1, city1); append(line1, city2); std::cout << "length: " << length(line1) << std::endl; std::cout << "length using Vincenty: " << length(line1, strategy::distance::vincenty()) << std::endl; - model::linestring_2d line2; - append(line2, a_rd); - append(line2, r_rd); + model::d2::linestring line2; + append(line2, city1_prj); + append(line2, city2_prj); std::cout << "length: " << length(line2) << std::endl; return 0; diff --git a/example/extensions/gis/latlong/point_ll_example.cpp b/example/extensions/gis/latlong/point_ll_example.cpp index f4b5c154f..4477c3f38 100644 --- a/example/extensions/gis/latlong/point_ll_example.cpp +++ b/example/extensions/gis/latlong/point_ll_example.cpp @@ -62,8 +62,7 @@ int main() { using namespace boost::geometry; - // Declare a latlong point, using doubles and degrees (= default) - typedef model::point_ll_deg latlon_point; + typedef model::ll::point latlon_point; latlon_point paris; @@ -104,11 +103,11 @@ int main() // Convert a latlong point to radians. This might be convenient, although algorithms // are transparent on degree/radians - model::point_ll_rad paris_rad; + model::ll::point paris_rad; transform(paris, paris_rad); std::cout << "Paris in radians: " << boost::geometry::dsv(paris_rad) << std::endl; - model::point_ll_rad amsterdam_rad; + model::ll::point amsterdam_rad; transform(amsterdam, amsterdam_rad); std::cout << "Amsterdam in radians: " << boost::geometry::dsv(amsterdam_rad) << std::endl; diff --git a/example/extensions/gis/projections/p01_projection_example.cpp b/example/extensions/gis/projections/p01_projection_example.cpp index bd3e756c2..3b3a43ad1 100644 --- a/example/extensions/gis/projections/p01_projection_example.cpp +++ b/example/extensions/gis/projections/p01_projection_example.cpp @@ -26,13 +26,13 @@ int main() // Construct a Robinson projection, using specified point types // (This delivers a projection without virtual methods. Note that in p02 example // the projection is created using a factory, which delivers a projection with virtual methods) - projection::robin_spheroid prj(par); + projection::robin_spheroid prj(par); // Define Amsterdam / Barcelona in decimal degrees / degrees/minutes model::point_ll_deg amsterdam = parse("52.4N", "5.9E"); model::point_ll_deg barcelona = parse("41 23'N", "2 11'E"); - model::point_2d pa, pb; + model::d2::point pa, pb; // Now do the projection. "Forward" means from latlong to meters. // (Note that a map projection might fail. This is not 'exceptional'. diff --git a/example/extensions/gis/projections/p02_projfactory_example.cpp b/example/extensions/gis/projections/p02_projfactory_example.cpp index c6a38b60f..b0cee8790 100644 --- a/example/extensions/gis/projections/p02_projfactory_example.cpp +++ b/example/extensions/gis/projections/p02_projfactory_example.cpp @@ -28,8 +28,8 @@ int main() // Note that this is the only difference from p01_projection_example. It constructs a projection // with virtual methods, which can be used polymorphically. Therefore it is a pointer. For // convenience we use a boost shared pointer here. - projection::factory fac; - boost::shared_ptr > prj(fac.create_new(par)); + projection::factory fac; + boost::shared_ptr > prj(fac.create_new(par)); // Define Amsterdam / Barcelona in decimal degrees / degrees/minutes model::point_ll_deg amsterdam(longitude<>(5.9), latitude<>(52.4)); @@ -38,7 +38,7 @@ int main() longitude<>(dms(2, 11)) ); - model::point_2d pa, pb; + model::d2::point pa, pb; // Do the forward projection if (prj->forward(amsterdam, pa) && prj->forward(barcelona, pb)) diff --git a/example/extensions/gis/projections/p03_projmap_example.cpp b/example/extensions/gis/projections/p03_projmap_example.cpp index 7aa48d9ae..da2d13a2d 100644 --- a/example/extensions/gis/projections/p03_projmap_example.cpp +++ b/example/extensions/gis/projections/p03_projmap_example.cpp @@ -55,28 +55,28 @@ void read_wkt_and_project_and_write_svg(std::string const& wkt_filename, // Our latlong polygon collection will be projected into this vector // (Of course it is also possible to do this while reading and have one vector) - std::vector xy_polygons; + std::vector xy_polygons; // Declare transformation strategy which contains a projection projection::project_transformer < model::point_ll_deg, - model::point_2d + model::d2::point > projection(projection_parameters); // Project the polygons, and at the same time get the bounding box (in xy) - model::box_2d bbox; + model::d2::box bbox; assign_inverse(bbox); for (std::vector::const_iterator it = ll_polygons.begin(); it != ll_polygons.end(); ++it) { - model::polygon_2d xy_polygon; + model::d2::polygon xy_polygon; if (transform(*it, xy_polygon, projection)) { // Update bbox with box of this projected polygon - combine(bbox, make_envelope(xy_polygon)); + combine(bbox, make_envelope(xy_polygon)); // Add projected polygon xy_polygons.push_back(xy_polygon); @@ -95,10 +95,10 @@ void read_wkt_and_project_and_write_svg(std::string const& wkt_filename, // Setup the transformation to SVG // (alternatively this could be skipped because SVG can transform itself, // but this example shows it like this) - typedef boost::geometry::model::point_xy svg_point; + typedef boost::geometry::model::d2::point_xy svg_point; boost::geometry::strategy::transform::map_transformer < - model::point_2d, + model::d2::point, svg_point, true, true @@ -110,7 +110,7 @@ void read_wkt_and_project_and_write_svg(std::string const& wkt_filename, boost::geometry::assign(box, 0, 0, 800, 600); out << boost::geometry::svg(box, "fill:rgb(0,0,255)") << std::endl; - for (std::vector::const_iterator it = xy_polygons.begin(); + for (std::vector::const_iterator it = xy_polygons.begin(); it != xy_polygons.end(); ++it) { diff --git a/example/with_external_libs/x03_d_soci_example.cpp b/example/with_external_libs/x03_d_soci_example.cpp index f0ccb6007..65f2afaf2 100644 --- a/example/with_external_libs/x03_d_soci_example.cpp +++ b/example/with_external_libs/x03_d_soci_example.cpp @@ -66,7 +66,7 @@ int main() if (!boost::geometry::hex2wkb(*it, std::back_inserter(wkb))) throw std::runtime_error("hex2wkb translation failed"); - boost::geometry::model::polygon_2d parcel; + boost::geometry::model::d2::polygon parcel; if (!boost::geometry::read_wkb(wkb.begin(), wkb.end(), parcel)) throw std::runtime_error("read_wkb failed"); diff --git a/example/with_external_libs/x04_wxwidgets_world_mapper.cpp b/example/with_external_libs/x04_wxwidgets_world_mapper.cpp index 33787ccb6..bfeb580f4 100644 --- a/example/with_external_libs/x04_wxwidgets_world_mapper.cpp +++ b/example/with_external_libs/x04_wxwidgets_world_mapper.cpp @@ -41,7 +41,7 @@ typedef boost::geometry::model::multi_polygon - country_type; + country_type; // Adapt wxWidgets points to Boost.Geometry points such that they can be used // in e.g. transformations (see below) @@ -157,19 +157,19 @@ private: typedef boost::geometry::strategy::transform::map_transformer < - boost::geometry::model::point_2d, wxPoint, + boost::geometry::model::d2::point, wxPoint, true, true > map_transformer_type; typedef boost::geometry::strategy::transform::inverse_transformer < - wxPoint, boost::geometry::model::point_2d + wxPoint, boost::geometry::model::d2::point > inverse_transformer_type; boost::shared_ptr m_map_transformer; boost::shared_ptr m_inverse_transformer; - boost::geometry::model::box_2d m_box; + boost::geometry::model::d2::box m_box; std::vector m_countries; int m_focus; @@ -259,7 +259,7 @@ void HelloWorldCanvas::OnMouseMove(wxMouseEvent &event) m_owner->PrepareDC(dc); // Transform the point to Lon/Lat - bg::model::point_2d point; + bg::model::d2::point point; bg::transform(event.GetPosition(), point, *m_inverse_transformer); // Determine selected object @@ -353,7 +353,7 @@ void HelloWorldCanvas::DrawCountry(wxDC& dc, country_type const& country) { namespace bg = boost::geometry; - BOOST_FOREACH(bg::model::polygon_2d const& poly, country) + BOOST_FOREACH(bg::model::d2::polygon const& poly, country) { // Use only outer, holes are (for the moment) ignored. This would need // a holey-polygon compatible wx object diff --git a/example/with_external_libs/x05_shapelib_example.cpp b/example/with_external_libs/x05_shapelib_example.cpp index 5d25ac367..e397ebcba 100644 --- a/example/with_external_libs/x05_shapelib_example.cpp +++ b/example/with_external_libs/x05_shapelib_example.cpp @@ -84,11 +84,11 @@ int main() { std::string filename = "c:/data/spatial/shape/world_free/world.shp"; - std::vector polygons; + std::vector polygons; try { - read_shapefile(filename, polygons, convert); + read_shapefile(filename, polygons, convert); } catch(const std::string& s) { @@ -97,9 +97,9 @@ int main() } // Do something with the polygons, for example simplify them - for (std::vector::iterator it = polygons.begin(); it != polygons.end(); it++) + for (std::vector::iterator it = polygons.begin(); it != polygons.end(); it++) { - model::polygon_2d p; + model::d2::polygon p; simplify(*it, p, 0.01); std::cout << it->outer().size() << "," << p.outer().size() << std::endl; *it = p; @@ -107,7 +107,7 @@ int main() std::cout << "Simplified " << polygons.size() << std::endl; double sum = 0; - for (std::vector::const_iterator it = polygons.begin(); it != polygons.end(); it++) + for (std::vector::const_iterator it = polygons.begin(); it != polygons.end(); it++) { sum += area(*it); } diff --git a/include/boost/geometry/extensions/gis/latlong/latlong.hpp b/include/boost/geometry/extensions/gis/latlong/latlong.hpp index 368dc82f5..a84b72d80 100644 --- a/include/boost/geometry/extensions/gis/latlong/latlong.hpp +++ b/include/boost/geometry/extensions/gis/latlong/latlong.hpp @@ -6,10 +6,9 @@ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_GEOMETRY_LATLONG_HPP -#define BOOST_GEOMETRY_LATLONG_HPP +#ifndef BOOST_GEOMETRY_EXTENSIONS_GIS_LATLONG_HPP +#define BOOST_GEOMETRY_EXTENSIONS_GIS_LATLONG_HPP -// Predeclare common latlong points for convenience #include #include @@ -22,6 +21,8 @@ namespace boost { namespace geometry { +/* +DEPRECATED namespace model { @@ -40,9 +41,9 @@ typedef box box_ll_rad; typedef segment segment_ll_rad; } // namespace model - +*/ }} // namespace boost::geometry -#endif // BOOST_GEOMETRY_LATLONG_HPP +#endif // BOOST_GEOMETRY_EXTENSIONS_GIS_LATLONG_HPP diff --git a/include/boost/geometry/extensions/gis/latlong/point_ll.hpp b/include/boost/geometry/extensions/gis/latlong/point_ll.hpp index 2f2aa23f2..7e39ff58f 100644 --- a/include/boost/geometry/extensions/gis/latlong/point_ll.hpp +++ b/include/boost/geometry/extensions/gis/latlong/point_ll.hpp @@ -1,13 +1,13 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) // -// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands. +// Copyright Barend Gehrels 2007-2010, Geodan, Amsterdam, the Netherlands. // Copyright Bruno Lalande 2008, 2009 // 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) -#ifndef BOOST_GEOMETRY_GEOMETRIES_POINT_LL_HPP -#define BOOST_GEOMETRY_GEOMETRIES_POINT_LL_HPP +#ifndef BOOST_GEOMETRY_EXTENSIONS_GIS_LATLONG_POINT_LL_HPP +#define BOOST_GEOMETRY_EXTENSIONS_GIS_LATLONG_POINT_LL_HPP #include #include @@ -26,7 +26,7 @@ namespace boost { namespace geometry { -namespace model +namespace model { namespace ll { /*! @@ -36,11 +36,12 @@ namespace model It can be constructed using latitude and longitude classes. The latlong class can be defined in degrees or in radians. There is a conversion method from degree to radian, and from radian to degree. - \tparam T coordinate type, double (the default) or float + \tparam Units units,defaults to degree + \tparam CoordinateType coordinate type, double (the default) or float (it might be int as well) - \tparam C coordinate system, optional, should includes degree/radian - indication, defaults to geographic - \tparam D dimensions, optional, defaults to 2 + \tparam CoordinateSystem coordinate system, optional, should include NOT degree/radian + indication, should be e.g. cs::geographic or cs::spherical + \tparam Dimensions dimensions, optional, defaults to 2 \note There is NO constructor with two values to avoid exchanging lat and long \note Construction with latitude and longitude can be done in both orders, @@ -56,57 +57,78 @@ namespace model */ template < - typename T = double, - typename C = cs::geographic, - std::size_t D = 2 + typename Units = degree, + typename CoordinateType = double, + template class CoordinateSystem = cs::geographic, + std::size_t Dimensions = 2 > -class point_ll : public point +class point : public model::point + < + CoordinateType, + Dimensions, + CoordinateSystem + > { + typedef model::point + < + CoordinateType, + Dimensions, + CoordinateSystem + > + base_type; public: /// Default constructor, does not initialize anything - inline point_ll() : point() {} + inline point() : base_type() {} /// Constructor with longitude/latitude - inline point_ll(longitude const& lo, latitude const& la) - : point(lo, la) {} + inline point(longitude const& lo, + latitude const& la) + : base_type(lo, la) {} /// Constructor with latitude/longitude - inline point_ll(latitude const& la, longitude const& lo) - : point(lo, la) {} + inline point(latitude const& la, + longitude const& lo) + : base_type(lo, la) {} /// Get longitude - inline T const& lon() const { return this->template get<0>(); } + inline CoordinateType const& lon() const + { return this->template get<0>(); } + /// Get latitude - inline T const& lat() const { return this->template get<1>(); } + inline CoordinateType const& lat() const + { return this->template get<1>(); } /// Set longitude - inline void lon(T const& v) { this->template set<0>(v); } + inline void lon(CoordinateType const& v) + { this->template set<0>(v); } + /// Set latitude - inline void lat(T const& v) { this->template set<1>(v); } + inline void lat(CoordinateType const& v) + { this->template set<1>(v); } /// Set longitude using dms class - inline void lon(dms const& v) + inline void lon(dms const& v) { this->template set<0>(v.as_value()); } - inline void lon(dms const& v) + inline void lon(dms const& v) { this->template set<0>(v.as_value()); } - inline void lat(dms const& v) + inline void lat(dms const& v) { this->template set<1>(v.as_value()); } - inline void lat(dms const& v) + inline void lat(dms const& v) { this->template set<1>(v.as_value()); } }; -} // namespace model +}} // namespace model::ll // Adapt the point_ll to the concept #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS @@ -115,77 +137,121 @@ namespace traits template < + typename Units, typename CoordinateType, - typename CoordinateSystem, + template class CoordinateSystem, std::size_t DimensionCount > -struct tag > +struct tag + < + model::ll::point + < + Units, + CoordinateType, + CoordinateSystem, + DimensionCount + > + > { typedef point_tag type; }; template < + typename Units, typename CoordinateType, - typename CoordinateSystem, + template class CoordinateSystem, std::size_t DimensionCount > struct coordinate_type - < - model::point_ll - > + < + model::ll::point + < + Units, + CoordinateType, + CoordinateSystem, + DimensionCount + > + > { typedef CoordinateType type; }; template < + typename Units, typename CoordinateType, - typename CoordinateSystem, + template class CoordinateSystem, std::size_t DimensionCount > struct coordinate_system - < - model::point_ll - > + < + model::ll::point + < + Units, + CoordinateType, + CoordinateSystem, + DimensionCount + > + > { - typedef CoordinateSystem type; + typedef CoordinateSystem type; }; template < + typename Units, typename CoordinateType, - typename CoordinateSystem, + template class CoordinateSystem, std::size_t DimensionCount > struct dimension - < - model::point_ll - > + < + model::ll::point + < + Units, + CoordinateType, + CoordinateSystem, + DimensionCount + > + > : boost::mpl::int_ {}; template < + typename Units, typename CoordinateType, - typename CoordinateSystem, + template class CoordinateSystem, std::size_t DimensionCount, std::size_t Dimension > struct access - < - model::point_ll, Dimension - > + < + model::ll::point + < + Units, + CoordinateType, + CoordinateSystem, + DimensionCount + >, + Dimension + > { - static inline CoordinateType get( - model::point_ll const& p) + typedef model::ll::point + < + Units, + CoordinateType, + CoordinateSystem, + DimensionCount + > type; + + static inline CoordinateType get(type const& p) { return p.template get(); } - static inline void set( - model::point_ll& p, - CoordinateType const& value) + static inline void set(type& p, CoordinateType const& value) { p.template set(value); } @@ -196,4 +262,4 @@ struct access }} // namespace boost::geometry -#endif // BOOST_GEOMETRY_GEOMETRIES_POINT_LL_HPP +#endif // BOOST_GEOMETRY_EXTENSIONS_GIS_LATLONG_POINT_LL_HPP diff --git a/include/boost/geometry/extensions/io/svg/svg_mapper.hpp b/include/boost/geometry/extensions/io/svg/svg_mapper.hpp index 104daa6a7..0dbf4fb9c 100644 --- a/include/boost/geometry/extensions/io/svg/svg_mapper.hpp +++ b/include/boost/geometry/extensions/io/svg/svg_mapper.hpp @@ -70,7 +70,7 @@ struct svg_map std::string const& style, int size, Point const& point, TransformStrategy const& strategy) { - model::point_xy ipoint; + model::d2::point_xy ipoint; geometry::transform(point, ipoint, strategy); stream << geometry::svg(ipoint, style, size) << std::endl; } @@ -84,7 +84,7 @@ struct svg_map std::string const& style, int size, Box const& box, TransformStrategy const& strategy) { - model::box > ibox; + model::box > ibox; geometry::transform(box, ibox, strategy); stream << geometry::svg(ibox, style, size) << std::endl; @@ -119,7 +119,7 @@ struct svg_map svg_map_range < range_type, - model::linestring > + model::linestring > >::apply(stream, style, size, range, strategy); } }; @@ -127,13 +127,13 @@ struct svg_map template struct svg_map - : svg_map_range > > + : svg_map_range > > {}; template struct svg_map - : svg_map_range > > + : svg_map_range > > {}; @@ -145,7 +145,7 @@ struct svg_map std::string const& style, int size, Polygon const& polygon, TransformStrategy const& strategy) { - model::polygon > ipoly; + model::polygon > ipoly; geometry::transform(polygon, ipoly, strategy); stream << geometry::svg(ipoly, style, size) << std::endl; } @@ -197,7 +197,7 @@ inline void svg_map(std::ostream& stream, template class svg_mapper : boost::noncopyable { - typedef model::point_xy map_point_type; + typedef model::d2::point_xy map_point_type; typedef strategy::transform::map_transformer < Point, diff --git a/include/boost/geometry/extensions/nsphere/geometries/cartesian2d.hpp b/include/boost/geometry/extensions/nsphere/geometries/cartesian2d.hpp index a1a236582..b78204e16 100644 --- a/include/boost/geometry/extensions/nsphere/geometries/cartesian2d.hpp +++ b/include/boost/geometry/extensions/nsphere/geometries/cartesian2d.hpp @@ -15,12 +15,12 @@ namespace boost { namespace geometry { -namespace model +namespace model { namespace d2 { -typedef nsphere circle; +typedef model::nsphere circle; -} +}} // namespace model::d2 }} // namespace boost::geometry diff --git a/include/boost/geometry/extensions/nsphere/geometries/cartesian3d.hpp b/include/boost/geometry/extensions/nsphere/geometries/cartesian3d.hpp index a95659c20..71497cad5 100644 --- a/include/boost/geometry/extensions/nsphere/geometries/cartesian3d.hpp +++ b/include/boost/geometry/extensions/nsphere/geometries/cartesian3d.hpp @@ -5,8 +5,8 @@ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_GEOMETRY_EXTENSION_NSPHERE_CARTESIAN3D_HPP -#define BOOST_GEOMETRY_EXTENSION_NSPHERE_CARTESIAN3D_HPP +#ifndef BOOST_GEOMETRY_EXTENSION_NSPHERE_GEOMETRIES_CARTESIAN3D_HPP +#define BOOST_GEOMETRY_EXTENSION_NSPHERE_GEOMETRIES_CARTESIAN3D_HPP #include @@ -15,13 +15,13 @@ namespace boost { namespace geometry { -namespace model +namespace model { namespace d3 { -typedef nsphere sphere; +typedef model::nsphere sphere; -} +}} // namespace model::d3 }} // namespace boost::geometry -#endif // BOOST_GEOMETRY_EXTENSION_NSPHERE_CARTESIAN3D_HPP +#endif // BOOST_GEOMETRY_EXTENSION_NSPHERE_GEOMETRIES_CARTESIAN3D_HPP diff --git a/include/boost/geometry/geometries/cartesian2d.hpp b/include/boost/geometry/geometries/cartesian2d.hpp index 15b5341ce..db686604a 100644 --- a/include/boost/geometry/geometries/cartesian2d.hpp +++ b/include/boost/geometry/geometries/cartesian2d.hpp @@ -10,23 +10,25 @@ #define BOOST_GEOMETRY_GEOMETRIES_CARTESIAN2D_HPP // Predeclare common Cartesian 2D points for convenience +// Note that they are always "double" #include namespace boost { namespace geometry { -namespace model +namespace model { namespace d2 { -typedef point_xy point_2d; -typedef linestring linestring_2d; -typedef linear_ring ring_2d; -typedef polygon polygon_2d; -typedef box box_2d; -typedef segment segment_2d; +typedef model::d2::point_xy point; +typedef model::linestring linestring; +typedef model::linear_ring ring; +typedef model::polygon polygon; +typedef model::box box; +typedef model::segment segment; -} // namespace model + +}} // namespace model::d2 }} // namespace boost::geometry diff --git a/include/boost/geometry/geometries/cartesian3d.hpp b/include/boost/geometry/geometries/cartesian3d.hpp index 07e4f8ae8..256222a58 100644 --- a/include/boost/geometry/geometries/cartesian3d.hpp +++ b/include/boost/geometry/geometries/cartesian3d.hpp @@ -6,8 +6,8 @@ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_GEOMETRY_CARTESIAN3D_HPP -#define BOOST_GEOMETRY_CARTESIAN3D_HPP +#ifndef BOOST_GEOMETRY_GEOMETRIES_CARTESIAN3D_HPP +#define BOOST_GEOMETRY_GEOMETRIES_CARTESIAN3D_HPP // Predeclare common Cartesian 3D points for convenience @@ -16,19 +16,22 @@ namespace boost { namespace geometry { -namespace model +namespace model { namespace d3 { -typedef point point_3d; -typedef linestring linestring_3d; -typedef linear_ring ring_3d; -typedef polygon polygon_3d; -typedef box box_3d; +// Todo: create point_xyz in between to enable methods .x(), .y(), .z() +// the same way as d2::point has -} // namespace model +typedef model::point point; +typedef model::linestring linestring; +typedef model::linear_ring ring; +typedef model::polygon polygon; +typedef model::box box; + +}} // namespace model::d3 }} // namespace boost::geometry -#endif // BOOST_GEOMETRY_CARTESIAN3D_HPP +#endif // BOOST_GEOMETRY_GEOMETRIES_CARTESIAN3D_HPP diff --git a/include/boost/geometry/geometries/point_xy.hpp b/include/boost/geometry/geometries/point_xy.hpp index 4733bc319..11403afa4 100644 --- a/include/boost/geometry/geometries/point_xy.hpp +++ b/include/boost/geometry/geometries/point_xy.hpp @@ -19,7 +19,7 @@ namespace boost { namespace geometry { -namespace model +namespace model { namespace d2 { /*! @@ -27,36 +27,38 @@ namespace model \ingroup geometries \tparam T numeric type, arguments can be, for example, double, float, int */ -template -class point_xy : public point +template +class point_xy : public model::point { public: /// Default constructor, does not initialize anything - inline point_xy() : point() {} + inline point_xy() + : model::point() {} /// Constructor with x/y values - inline point_xy(T const& x, T const& y) : point(x, y) {} + inline point_xy(CoordinateType const& x, CoordinateType const& y) + : model::point(x, y) {} /// Get x-value - inline T const& x() const + inline CoordinateType const& x() const { return this->template get<0>(); } /// Get y-value - inline T const& y() const + inline CoordinateType const& y() const { return this->template get<1>(); } /// Set x-value - inline void x(T const& v) + inline void x(CoordinateType const& v) { this->template set<0>(v); } /// Set y-value - inline void y(T const& v) + inline void y(CoordinateType const& v) { this->template set<1>(v); } }; -} // namespace model +}} // namespace model::xy // Adapt the point_xy to the concept @@ -65,38 +67,38 @@ namespace traits { template -struct tag > +struct tag > { typedef point_tag type; }; template -struct coordinate_type > +struct coordinate_type > { typedef CoordinateType type; }; template -struct coordinate_system > +struct coordinate_system > { typedef CoordinateSystem type; }; template -struct dimension > +struct dimension > : boost::mpl::int_<2> {}; template -struct access, Dimension > +struct access, Dimension > { static inline CoordinateType get( - model::point_xy const& p) + model::d2::point_xy const& p) { return p.template get(); } - static inline void set(model::point_xy& p, + static inline void set(model::d2::point_xy& p, CoordinateType const& value) { p.template set(value); diff --git a/test/algorithms/area.cpp b/test/algorithms/area.cpp index f4a1be22e..0d027a932 100644 --- a/test/algorithms/area.cpp +++ b/test/algorithms/area.cpp @@ -106,7 +106,7 @@ int test_main(int, char* []) test_open_ccw >(); #ifdef HAVE_TTMATH - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/centroid.cpp b/test/algorithms/centroid.cpp index e7386dd01..c6b314de6 100644 --- a/test/algorithms/centroid.cpp +++ b/test/algorithms/centroid.cpp @@ -65,14 +65,14 @@ void test_3d() int test_main(int, char* []) { - test_2d >(); + test_2d >(); test_2d >(); - test_2d >(); + test_2d >(); test_3d >(); #if defined(HAVE_TTMATH) - test_2d >(); + test_2d >(); #endif return 0; diff --git a/test/algorithms/comparable_distance.cpp b/test/algorithms/comparable_distance.cpp index 3ee1dd633..811e01662 100644 --- a/test/algorithms/comparable_distance.cpp +++ b/test/algorithms/comparable_distance.cpp @@ -129,9 +129,9 @@ void test_all() int test_main(int, char* []) { - //test_all >(); - test_all >(); - test_all >(); + //test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/convex_hull.cpp b/test/algorithms/convex_hull.cpp index c6e6b90de..fb211c42a 100644 --- a/test/algorithms/convex_hull.cpp +++ b/test/algorithms/convex_hull.cpp @@ -39,12 +39,12 @@ void test_all(bool do_rectangular = true) int test_main(int, char* []) { - //test_all >(); - test_all >(); - test_all >(); + //test_all >(); + test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/correct.cpp b/test/algorithms/correct.cpp index b574d02a9..0aefb12b8 100644 --- a/test/algorithms/correct.cpp +++ b/test/algorithms/correct.cpp @@ -165,8 +165,8 @@ int test_main(int, char* []) //test_all(); //test_all >(); - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/detail/sections/sectionalize.cpp b/test/algorithms/detail/sections/sectionalize.cpp index 7fbe23a8b..f87a8428a 100644 --- a/test/algorithms/detail/sections/sectionalize.cpp +++ b/test/algorithms/detail/sections/sectionalize.cpp @@ -230,8 +230,8 @@ void test_all() int test_main(int, char* []) { - //test_all >(); - test_all >(); + //test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/difference.cpp b/test/algorithms/difference.cpp index 07c5e744b..538c0d7d3 100644 --- a/test/algorithms/difference.cpp +++ b/test/algorithms/difference.cpp @@ -106,6 +106,6 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/disjoint.cpp b/test/algorithms/disjoint.cpp index 3f6089aec..bbbf7fa12 100644 --- a/test/algorithms/disjoint.cpp +++ b/test/algorithms/disjoint.cpp @@ -114,8 +114,8 @@ void test_all() int test_main(int, char* []) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/dissolve.cpp b/test/algorithms/dissolve.cpp index 911432174..9e7e63e69 100644 --- a/test/algorithms/dissolve.cpp +++ b/test/algorithms/dissolve.cpp @@ -109,6 +109,6 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/distance.cpp b/test/algorithms/distance.cpp index 055344b1e..1778f7b32 100644 --- a/test/algorithms/distance.cpp +++ b/test/algorithms/distance.cpp @@ -165,8 +165,8 @@ void test_all() test_distance_segment

(); test_distance_array_as_linestring

(); - test_geometry("POINT(1 3)", "LINESTRING(1 1,4 4)", sqrt(2.0)); - test_geometry("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0)); + test_geometry >("POINT(1 3)", "LINESTRING(1 1,4 4)", sqrt(2.0)); + test_geometry >("POINT(3 1)", "LINESTRING(1 1,4 4)", sqrt(2.0)); test_geometry("POINT(1 1)", "POINT(2 2)", sqrt(2.0)); test_geometry("POINT(0 0)", "POINT(0 3)", 3.0); @@ -217,10 +217,10 @@ int test_main(int, char* []) //test_all(); // located here because of 3D #endif - test_all >(); + test_all >(); test_all >(); - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/envelope.cpp b/test/algorithms/envelope.cpp index fcda89cbe..d199d09bb 100644 --- a/test/algorithms/envelope.cpp +++ b/test/algorithms/envelope.cpp @@ -46,9 +46,9 @@ int test_main(int, char* []) //test_2d(); //test_2d(); test_2d >(); - test_2d >(); - test_2d >(); - test_2d >(); + test_2d >(); + test_2d >(); + test_2d >(); test_3d(); diff --git a/test/algorithms/equals.cpp b/test/algorithms/equals.cpp index ffd0278d1..415d166d9 100644 --- a/test/algorithms/equals.cpp +++ b/test/algorithms/equals.cpp @@ -99,11 +99,11 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/intersection.cpp b/test/algorithms/intersection.cpp index 61c3daa27..0f209c03e 100644 --- a/test/algorithms/intersection.cpp +++ b/test/algorithms/intersection.cpp @@ -274,10 +274,10 @@ void test_pointer_version() p = new test::test_point_xy; p->x = 0; p->y = 0; ln.push_back(p); p = new test::test_point_xy; p->x = 10; p->y = 10; ln.push_back(p); - bg::model::box > box; + bg::model::box > box; bg::assign(box, 2, 2, 8, 8); - typedef bg::model::linestring > output_type; + typedef bg::model::linestring > output_type; std::vector clip; bg::intersection_inserter(box, ln, std::back_inserter(clip)); @@ -306,11 +306,11 @@ void test_pointer_version() int test_main(int, char* []) { - //test_all >(); - test_all >(); + //test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif //test_pointer_version(); diff --git a/test/algorithms/intersects.cpp b/test/algorithms/intersects.cpp index 4e588e051..4c4ad7375 100644 --- a/test/algorithms/intersects.cpp +++ b/test/algorithms/intersects.cpp @@ -70,10 +70,10 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/is_convex.cpp b/test/algorithms/is_convex.cpp index 75ed256b5..71fb601ba 100644 --- a/test/algorithms/is_convex.cpp +++ b/test/algorithms/is_convex.cpp @@ -108,12 +108,12 @@ void test_all() int test_main(int, char* []) { - //test_all >(); - //test_all >(); - test_all >(); + //test_all >(); + //test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/length.cpp b/test/algorithms/length.cpp index 6c6077dc7..74266fdd5 100644 --- a/test/algorithms/length.cpp +++ b/test/algorithms/length.cpp @@ -27,12 +27,12 @@ void test_all() int test_main(int, char* []) { - test_all >(); - test_all >(); - test_all >(); + test_all >(); + test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/overlaps.cpp b/test/algorithms/overlaps.cpp index 301ba0397..af6c90c0f 100644 --- a/test/algorithms/overlaps.cpp +++ b/test/algorithms/overlaps.cpp @@ -51,11 +51,11 @@ void test_3d() int test_main( int , char* [] ) { - test_2d >(); - test_2d >(); + test_2d >(); + test_2d >(); #if defined(HAVE_TTMATH) - test_2d >(); + test_2d >(); #endif //test_3d >(); diff --git a/test/algorithms/overlay/assemble.cpp b/test/algorithms/overlay/assemble.cpp index c73e8de34..faf00701d 100644 --- a/test/algorithms/overlay/assemble.cpp +++ b/test/algorithms/overlay/assemble.cpp @@ -129,7 +129,7 @@ void generate() std::string ps = "POLYGON(" + exteriors[pe] + "," + interiors[pi] + ")"; std::string qs = "POLYGON(" + exteriors[qe] + "," + interiors[qi] + ")"; - bg::model::polygon_2d p, q; + bg::model::d2::polygon p, q; bg::read_wkt(ps, p); bg::read_wkt(qs, q); bg::correct(p); diff --git a/test/algorithms/overlay/ccw_traverse.cpp b/test/algorithms/overlay/ccw_traverse.cpp index 3bd32c490..1ed1ab5d0 100644 --- a/test/algorithms/overlay/ccw_traverse.cpp +++ b/test/algorithms/overlay/ccw_traverse.cpp @@ -188,7 +188,7 @@ inline typename bg::coordinate_type::type intersect(std::string const template inline void test_polygon(std::string const& wkt1, std::string const& wkt2, std::string const& name) { - typedef bg::model::point_xy point; + typedef bg::model::d2::point_xy point; typedef bg::model::polygon clock; typedef bg::model::polygon counter; @@ -205,7 +205,7 @@ inline void test_polygon(std::string const& wkt1, std::string const& wkt2, std:: template inline void test_box_polygon(std::string const& wkt1, std::string const& wkt2, std::string const& name) { - typedef bg::model::point_xy point; + typedef bg::model::d2::point_xy point; typedef bg::model::box box; typedef bg::model::polygon clock; typedef bg::model::polygon counter; diff --git a/test/algorithms/overlay/dissolver.cpp b/test/algorithms/overlay/dissolver.cpp index 1ceeaaaad..55c75fcc3 100644 --- a/test/algorithms/overlay/dissolver.cpp +++ b/test/algorithms/overlay/dissolver.cpp @@ -209,7 +209,7 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/overlay/enrich_intersection_points.cpp b/test/algorithms/overlay/enrich_intersection_points.cpp index 728bd121f..05359ef26 100644 --- a/test/algorithms/overlay/enrich_intersection_points.cpp +++ b/test/algorithms/overlay/enrich_intersection_points.cpp @@ -171,8 +171,8 @@ int test_main(int, char* []) // ticket#17 expected.push_back(boost::make_tuple(6, "LR,RL,LR,RL,RL,LR")); - //test_all, test_enrich_intersection_points>(expected); - test_all, test_enrich_intersection_points>(expected); + //test_all, test_enrich_intersection_points>(expected); + test_all, test_enrich_intersection_points>(expected); //test_all, test_enrich_intersection_points>(expected); */ diff --git a/test/algorithms/overlay/get_turn_info.cpp b/test/algorithms/overlay/get_turn_info.cpp index 636be6ed6..b7c417bdb 100644 --- a/test/algorithms/overlay/get_turn_info.cpp +++ b/test/algorithms/overlay/get_turn_info.cpp @@ -851,6 +851,6 @@ void test_f3() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/overlay/relative_order.cpp b/test/algorithms/overlay/relative_order.cpp index 26fdb25e1..2c9d15a36 100644 --- a/test/algorithms/overlay/relative_order.cpp +++ b/test/algorithms/overlay/relative_order.cpp @@ -198,6 +198,6 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/overlay/robustness/intersection_pies.cpp b/test/algorithms/overlay/robustness/intersection_pies.cpp index a6044ae7a..aab0903ed 100644 --- a/test/algorithms/overlay/robustness/intersection_pies.cpp +++ b/test/algorithms/overlay/robustness/intersection_pies.cpp @@ -137,7 +137,7 @@ void test_pie(int total_segment_count, T factor_p, T factor_q, bool multi, bool multi_st, bool svg) { boost::timer t; - typedef bg::model::point_xy point_type; + typedef bg::model::d2::point_xy point_type; typedef bg::model::polygon polygon; typedef bg::model::multi_polygon multi_polygon; diff --git a/test/algorithms/overlay/robustness/intersection_stars.cpp b/test/algorithms/overlay/robustness/intersection_stars.cpp index 07f525fb7..a08a3bfcf 100644 --- a/test/algorithms/overlay/robustness/intersection_stars.cpp +++ b/test/algorithms/overlay/robustness/intersection_stars.cpp @@ -90,7 +90,7 @@ void test_star(std::string const& p_type, std::string const& c_type, << c_type << " (" << sizeof(CalculationType) << ")" << std::endl; boost::timer t; - typedef bg::model::point_xy point_type; + typedef bg::model::d2::point_xy point_type; typedef bg::model::polygon polygon; T area_i = 0; diff --git a/test/algorithms/overlay/robustness/random_ellipses_stars.cpp b/test/algorithms/overlay/robustness/random_ellipses_stars.cpp index 42fd7c28a..d25790a11 100644 --- a/test/algorithms/overlay/robustness/random_ellipses_stars.cpp +++ b/test/algorithms/overlay/robustness/random_ellipses_stars.cpp @@ -94,7 +94,7 @@ template void test_star_ellipse(int seed, int index, star_params const& par_p, star_params const& par_q, bool svg, double tolerance) { - typedef bg::model::point_xy point_type; + typedef bg::model::d2::point_xy point_type; typedef bg::model::polygon polygon; polygon p, q; diff --git a/test/algorithms/overlay/robustness/recursive_boxes.cpp b/test/algorithms/overlay/robustness/recursive_boxes.cpp index c80a7dd3c..29580b8c3 100644 --- a/test/algorithms/overlay/robustness/recursive_boxes.cpp +++ b/test/algorithms/overlay/robustness/recursive_boxes.cpp @@ -129,7 +129,7 @@ void test_all(int seed, int count, bool svg, int level) typedef bg::model::polygon < - bg::model::point_xy + bg::model::d2::point_xy > polygon; typedef bg::model::multi_polygon mp; diff --git a/test/algorithms/overlay/self_intersection_points.cpp b/test/algorithms/overlay/self_intersection_points.cpp index 3a9969273..263f9ed1c 100644 --- a/test/algorithms/overlay/self_intersection_points.cpp +++ b/test/algorithms/overlay/self_intersection_points.cpp @@ -227,7 +227,7 @@ void test_self_all() #if ! defined(GEOMETRY_TEST_MULTI) int test_main(int, char* []) { - test_self_all >(); + test_self_all >(); return 0; } #endif diff --git a/test/algorithms/overlay/split_rings.cpp b/test/algorithms/overlay/split_rings.cpp index a8d316879..59d509455 100644 --- a/test/algorithms/overlay/split_rings.cpp +++ b/test/algorithms/overlay/split_rings.cpp @@ -141,7 +141,7 @@ void test_self_all() #if ! defined(GEOMETRY_TEST_MULTI) int test_main(int, char* []) { - test_self_all >(); + test_self_all >(); return 0; } #endif diff --git a/test/algorithms/overlay/traverse_gmp.cpp b/test/algorithms/overlay/traverse_gmp.cpp index 627360e18..98689251e 100644 --- a/test/algorithms/overlay/traverse_gmp.cpp +++ b/test/algorithms/overlay/traverse_gmp.cpp @@ -96,7 +96,7 @@ void test_traverse(std::string const& caseid, G1 const& g1, G2 const& g2) std::ofstream svg(filename.str().c_str()); // Trick to have this always LongDouble - //typedef bg::model::point_xy P; + //typedef bg::model::d2::point_xy P; typedef typename bg::point_type::type P; //typename bg::replace_point_type::type rg1; //typename bg::replace_point_type::type rg2; @@ -184,17 +184,17 @@ int main(int argc, char** argv) switch(mode) { case 1 : - test_traverse_gmp >("float"); + test_traverse_gmp >("float"); break; case 2 : - test_traverse_gmp >("double"); + test_traverse_gmp >("double"); break; case 3 : - test_traverse_gmp >("long double"); + test_traverse_gmp >("long double"); break; case 4 : #if defined(HAVE_TTMATH) - test_traverse_gmp >("ttmath_big"); + test_traverse_gmp >("ttmath_big"); #endif break; } diff --git a/test/algorithms/perimeter.cpp b/test/algorithms/perimeter.cpp index 9700752d3..685b8751e 100644 --- a/test/algorithms/perimeter.cpp +++ b/test/algorithms/perimeter.cpp @@ -35,14 +35,14 @@ void test_open() int test_main(int, char* []) { - //test_all >(); - test_all >(); - test_all >(); + //test_all >(); + test_all >(); + test_all >(); - test_open >(); + test_open >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/reverse.cpp b/test/algorithms/reverse.cpp index 74ef5d4cc..db48c0619 100644 --- a/test/algorithms/reverse.cpp +++ b/test/algorithms/reverse.cpp @@ -45,8 +45,8 @@ void test_all() int test_main(int, char* []) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/simplify.cpp b/test/algorithms/simplify.cpp index b2f67f11c..1a7a44e94 100644 --- a/test/algorithms/simplify.cpp +++ b/test/algorithms/simplify.cpp @@ -83,10 +83,10 @@ void test_spherical() int test_main(int, char* []) { // Integer compiles, but simplify-process fails (due to distances) - //test_all >(); + //test_all >(); - test_all >(); - test_all >(); + test_all >(); + test_all >(); test_spherical > >(); diff --git a/test/algorithms/transform.cpp b/test/algorithms/transform.cpp index 0ec5aa8f9..3c58c1089 100644 --- a/test/algorithms/transform.cpp +++ b/test/algorithms/transform.cpp @@ -99,9 +99,9 @@ void test_transformations(double phi, double theta, double r) int test_main(int, char* []) { - typedef bg::model::point_xy P; + typedef bg::model::d2::point_xy P; test_all(); - test_all, bg::model::point_xy >(); + test_all, bg::model::d2::point_xy >(); test_all >, bg::model::point > >(bg::math::d2r); diff --git a/test/algorithms/union.cpp b/test/algorithms/union.cpp index 20b24eac0..fa57c0b36 100644 --- a/test/algorithms/union.cpp +++ b/test/algorithms/union.cpp @@ -271,12 +271,12 @@ TODO: ccw has one new error in 'wrapped' due to new approach, SOLVE THIS int test_main(int, char* []) { - test_all >(); - test_all >(); - //test_all >(); + test_all >(); + test_all >(); + //test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/algorithms/unique.cpp b/test/algorithms/unique.cpp index e55bd3426..c7a8dae41 100644 --- a/test/algorithms/unique.cpp +++ b/test/algorithms/unique.cpp @@ -46,8 +46,8 @@ void test_all() int test_main(int, char* []) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/algorithms/within.cpp b/test/algorithms/within.cpp index dc13b2f74..d17d48108 100644 --- a/test/algorithms/within.cpp +++ b/test/algorithms/within.cpp @@ -45,7 +45,7 @@ void test_all() // Mixed point types test_geometry < - bg::model::point_xy, + bg::model::d2::point_xy, bg::model::polygon

>("POINT(1 1)", "POLYGON((0 0,0 2,2 2,2 0,0 0))", true); @@ -67,11 +67,11 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/compile_test.cpp b/test/compile_test.cpp index d45f97505..36daf89a0 100644 --- a/test/compile_test.cpp +++ b/test/compile_test.cpp @@ -59,7 +59,7 @@ struct const_functor template class V> void check_linestring() { - typedef bg::model::point_xy P; + typedef bg::model::d2::point_xy P; typedef bg::model::linestring line_type; line_type line; line.push_back(P(0,0)); @@ -124,7 +124,7 @@ template > void check_polygon() { - typedef bg::model::point_xy P; + typedef bg::model::d2::point_xy P; typedef bg::model::polygon Y; Y poly; poly.outer().push_back(P(0,0)); @@ -159,7 +159,7 @@ void check_polygon() bg::centroid(poly, ctr); // within - bg::model::point_2d circ_centre(10,10); + bg::model::d2::point circ_centre(10,10); bool w = bg::within(P(1, 1), poly); //w = bg::within(poly, b); tbd diff --git a/test/extensions/algorithms/connect.cpp b/test/extensions/algorithms/connect.cpp index c921320af..6755c21dd 100644 --- a/test/extensions/algorithms/connect.cpp +++ b/test/extensions/algorithms/connect.cpp @@ -203,7 +203,7 @@ disconnected: int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/algorithms/midpoints.cpp b/test/extensions/algorithms/midpoints.cpp index b22c17eb5..6c41412b5 100644 --- a/test/extensions/algorithms/midpoints.cpp +++ b/test/extensions/algorithms/midpoints.cpp @@ -50,8 +50,8 @@ void test_all() int test_main(int, char* []) { - //test_all >(); - test_all >(); + //test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/algorithms/offset.cpp b/test/extensions/algorithms/offset.cpp index a77b3a1cb..0fc36f91b 100644 --- a/test/extensions/algorithms/offset.cpp +++ b/test/extensions/algorithms/offset.cpp @@ -127,7 +127,7 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/algorithms/remove_holes_if.cpp b/test/extensions/algorithms/remove_holes_if.cpp index 3d5dec835..6c837ee45 100644 --- a/test/extensions/algorithms/remove_holes_if.cpp +++ b/test/extensions/algorithms/remove_holes_if.cpp @@ -62,8 +62,8 @@ void test_all() int test_main(int, char* []) { - //test_all >(); - test_all >(); + //test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/algorithms/remove_spikes.cpp b/test/extensions/algorithms/remove_spikes.cpp index e95a15026..59b63ad7a 100644 --- a/test/extensions/algorithms/remove_spikes.cpp +++ b/test/extensions/algorithms/remove_spikes.cpp @@ -95,7 +95,7 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } #endif diff --git a/test/extensions/algorithms/selected.cpp b/test/extensions/algorithms/selected.cpp index 9411d599d..d3fe801f5 100644 --- a/test/extensions/algorithms/selected.cpp +++ b/test/extensions/algorithms/selected.cpp @@ -80,10 +80,10 @@ void test_all() int test_main(int, char* []) { // Integer not applicable here, just because of the tests using floating point - // test_all >(); + // test_all >(); - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/gis/latlong/area_ll.cpp b/test/extensions/gis/latlong/area_ll.cpp index 312e85141..94933f103 100644 --- a/test/extensions/gis/latlong/area_ll.cpp +++ b/test/extensions/gis/latlong/area_ll.cpp @@ -84,7 +84,7 @@ void test_area_polygon_ll(bool concave, bool hole, double perc) // Add the city "Alphen" to create a concave case // Alphen 52 7' 48" N, 4 39' 0" E LL alphen( - bg::latitude(bg::dms(52, 7, 48)), + bg::latitude(bg::dms(52, 7, 48)), bg::longitude(bg::dms(4, 39))); add_to_ring(dutch_prj, alphen, randstad.outer(), randstad_xy.outer()); } @@ -98,19 +98,19 @@ void test_area_polygon_ll(bool concave, bool hole, double perc) { // Gouda 52 1' 12" N, 4 42' 0" E LL gouda( - bg::latitude(bg::dms(52, 1, 12)), + bg::latitude(bg::dms(52, 1, 12)), bg::longitude(bg::dms(4, 42))); // Woerden 52 5' 9" N, 4 53' 0" E LL woerden( - bg::latitude(bg::dms(52, 5, 9)), + bg::latitude(bg::dms(52, 5, 9)), bg::longitude(bg::dms(4, 53, 0))); // Uithoorn 52 13' 48" N, 4 49' 48" E LL uithoorn(bg::latitude - (bg::dms(52, 13, 48)), + (bg::dms(52, 13, 48)), bg::longitude(bg::dms(4, 49, 48))); // Alphen 52 7' 48" N, 4 39' 0" E LL alphen(bg::latitude( - bg::dms(52, 7, 48)), + bg::dms(52, 7, 48)), bg::longitude(bg::dms(4, 39))); randstad.inners().resize(1); @@ -164,13 +164,13 @@ void test_area_polygon_ll(bool concave, bool hole, double perc) template void test_latlong(double perc) { - test_area_polygon_ll, bg::model::point_ll > >(false, false, perc); + test_area_polygon_ll, bg::model::ll::point >(false, false, perc); // with concavities - test_area_polygon_ll, bg::model::point_ll > >(true, false, perc); + test_area_polygon_ll, bg::model::ll::point >(true, false, perc); // with holes - test_area_polygon_ll, bg::model::point_ll > >(false, true, perc); + test_area_polygon_ll, bg::model::ll::point >(false, true, perc); } int test_main(int, char* []) diff --git a/test/extensions/gis/latlong/distance_mixed.cpp b/test/extensions/gis/latlong/distance_mixed.cpp index ab3e8373b..c169511a9 100644 --- a/test/extensions/gis/latlong/distance_mixed.cpp +++ b/test/extensions/gis/latlong/distance_mixed.cpp @@ -23,15 +23,15 @@ int test_main(int, char* []) { using namespace bg::strategy::distance; - bg::model::point_ll_deg paris; + bg::model::ll::point paris; paris.lat(bg::dms(48, 52, 0)); paris.lon(bg::dms(2, 19, 59)); - bg::model::point_ll_deg amsterdam; + bg::model::ll::point amsterdam; amsterdam.lat(bg::dms(52, 22, 23)); amsterdam.lon(bg::dms(4, 53, 32)); - bg::model::point_ll_rad paris_rad, amsterdam_rad; + bg::model::ll::point paris_rad, amsterdam_rad; transform(amsterdam, amsterdam_rad); transform(paris, paris_rad); @@ -42,31 +42,31 @@ int test_main(int, char* []) double d4 = 0.001 * distance(paris_rad, amsterdam); std::cout << "Distances: " << d1 << " == " << d2 << " == " << d3 << " == " << d4 << std::endl; - double d5 = 0.001 * distance(paris, amsterdam, vincenty()); - double d6 = 0.001 * distance(paris_rad, amsterdam_rad, vincenty()); - double d7 = 0.001 * distance(paris, amsterdam_rad, vincenty()); - double d8 = 0.001 * bg::distance(paris_rad, amsterdam, vincenty()); + double d5 = 0.001 * distance(paris, amsterdam, vincenty, bg::model::ll::point >()); + double d6 = 0.001 * distance(paris_rad, amsterdam_rad, vincenty, bg::model::ll::point >()); + double d7 = 0.001 * distance(paris, amsterdam_rad, vincenty, bg::model::ll::point >()); + double d8 = 0.001 * bg::distance(paris_rad, amsterdam, vincenty, bg::model::ll::point >()); std::cout << "Distances: " << d5 << " == " << d6 << " == " << d7 << " == " << d8 << std::endl; - bg::model::point_ll_deg barcelona( + bg::model::ll::point barcelona( bg::latitude<>(bg::dms(41, 23)), bg::longitude<>(bg::dms(2, 11)) ); // Now declare a line in latlong and calculate the distance, this MUST reverse... - bg::model::linestring_ll_deg ab; + bg::model::linestring > ab; ab.push_back(amsterdam); ab.push_back(barcelona); double d9 = 0.001 * distance(ab, paris); double d10 = 0.001 * distance(paris, ab); - double d11 = 0.001 * distance(paris, ab, vincenty()); - double d12 = 0.001 * distance(ab, paris, vincenty()); + double d11 = 0.001 * distance(paris, ab, vincenty, bg::model::ll::point >()); + double d12 = 0.001 * distance(ab, paris, vincenty, bg::model::ll::point >()); std::cout << "Distances: " << d9 << " == " << d10 << " == " << d11 << " == " << d12 << std::endl; // TODO: solve this case, it is reversed -> strategy should be reversed as well // For this, first implement that linestring can have other coor.sys then point type... - //double d13 = 0.001 * distance(ab, paris_rad, vincenty()); + //double d13 = 0.001 * distance(ab, paris_rad, vincenty, ll::point >()); return 0; } diff --git a/test/extensions/gis/latlong/distance_mixed.vcproj b/test/extensions/gis/latlong/distance_mixed.vcproj index b0bb79aa1..61aae4ad0 100644 --- a/test/extensions/gis/latlong/distance_mixed.vcproj +++ b/test/extensions/gis/latlong/distance_mixed.vcproj @@ -20,6 +20,7 @@ OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)\distance_mixed" ConfigurationType="1" + InheritedPropertySheets="..\..\..\boost.vsprops" CharacterSet="1" > diff --git a/test/extensions/gis/latlong/point_ll.cpp b/test/extensions/gis/latlong/point_ll.cpp index a56b60b34..ef3eaa8e1 100644 --- a/test/extensions/gis/latlong/point_ll.cpp +++ b/test/extensions/gis/latlong/point_ll.cpp @@ -31,7 +31,7 @@ void test_all() BOOST_CHECK_CLOSE(bg::get<1>(p1), type(-12.0433), 0.001); // Check degree/radian conversion - bg::model::point_ll > p2; + bg::model::ll::point p2; bg::transform(p1, p2); BOOST_CHECK_CLOSE(bg::get<0>(p2), type(-1.3444), 0.001); @@ -69,8 +69,8 @@ void test_all() int test_main(int, char* []) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/gis/projections/projection.cpp b/test/extensions/gis/projections/projection.cpp index ce03cf7f3..331cd9352 100644 --- a/test/extensions/gis/projections/projection.cpp +++ b/test/extensions/gis/projections/projection.cpp @@ -53,7 +53,7 @@ template void test_all() { typedef typename bg::coordinate_type

::type coord_type; - typedef bg::model::point_ll > point_type; + typedef bg::model::ll::point point_type; // aea test_one, point_type, P> @@ -67,10 +67,10 @@ int test_main(int, char* []) test_all(); test_all(); test_all(); - //test_all >(); - test_all >(); - test_all >(); - test_all >(); + //test_all >(); + test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/gis/projections/projection_epsg.cpp b/test/extensions/gis/projections/projection_epsg.cpp index 59bdac998..2d81b4a3d 100644 --- a/test/extensions/gis/projections/projection_epsg.cpp +++ b/test/extensions/gis/projections/projection_epsg.cpp @@ -58,7 +58,7 @@ template void test_deg_rad(double factor) { typedef typename bg::coordinate_type

::type coord_type; - typedef bg::model::point_ll > point_type; + typedef bg::model::ll::point point_type; test_one<28992, point_type, P>(4.897000 * factor, 52.371000 * factor, 121590.388077, 487013.903377); test_one<29118, point_type, P>(4.897000 * factor, 52.371000 * factor, 4852882, 9129373); @@ -77,10 +77,10 @@ int test_main(int, char* []) test_all(); test_all(); test_all(); - //test_all >(); - test_all >(); - test_all >(); - test_all >(); + //test_all >(); + test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/gis/projections/projections.cpp b/test/extensions/gis/projections/projections.cpp index 9ea76e77b..27b599b3c 100644 --- a/test/extensions/gis/projections/projections.cpp +++ b/test/extensions/gis/projections/projections.cpp @@ -56,7 +56,7 @@ void test_forward(std::string const& name, std::string const& parameters) { typedef typename bg::coordinate_type

::type coord_type; - typedef bg::model::point_ll > lonlat_type; + typedef bg::model::ll::point lonlat_type; lonlat_type ll; ll.lon(lon); @@ -84,7 +84,7 @@ void test_inverse(std::string const& name, std::string const& parameters) { typedef typename bg::coordinate_type

::type coord_type; - typedef bg::model::point_ll > lonlat_type; + typedef bg::model::ll::point lonlat_type; P xy; bg::set<0>(xy, x); @@ -353,12 +353,12 @@ int test_main(int, char* []) //test_all(); //test_all(); //test_all(); - //test_all >(); - //test_all >(); - //test_all >(); + //test_all >(); + //test_all >(); + //test_all >(); // Leave only one here, because this divides compilation time with 6 or 7 - test_all >(); + test_all >(); return 0; } diff --git a/test/extensions/index/rtree.cpp b/test/extensions/index/rtree.cpp index 2f31ec82a..5f4d01dbc 100644 --- a/test/extensions/index/rtree.cpp +++ b/test/extensions/index/rtree.cpp @@ -23,6 +23,6 @@ int test_main(int, char* []) // TODO: mloskot - This is ONLY compilation test and // placeholder to implement real test. - bg::index::rtree si(1, 6); + bg::index::rtree si(1, 6); x return 0; } diff --git a/test/extensions/nsphere/multi_within.cpp b/test/extensions/nsphere/multi_within.cpp index cf726af74..664a351f8 100644 --- a/test/extensions/nsphere/multi_within.cpp +++ b/test/extensions/nsphere/multi_within.cpp @@ -22,7 +22,7 @@ int test_main( int , char* [] ) { - typedef bg::model::point_xy gl_point; + typedef bg::model::d2::point_xy gl_point; typedef bg::circle gl_circle; typedef bg::model::linear_ring gl_ring; typedef bg::model::polygon gl_polygon; diff --git a/test/extensions/nsphere/within.cpp b/test/extensions/nsphere/within.cpp index 5f390b204..bcd74c688 100644 --- a/test/extensions/nsphere/within.cpp +++ b/test/extensions/nsphere/within.cpp @@ -18,7 +18,7 @@ template void test_circle(std::string const& wkt_geometry, bool expected) { - bg::model::circle circle; + bg::model::d2::circle circle; bg::assign(circle, 1.0, 1.0, 3.0); Geometry geometry; @@ -49,7 +49,7 @@ void test_circles() int test_main( int , char* [] ) { - test_circles >(); + test_circles >(); return 0; } diff --git a/test/iterators/box_iterator.cpp b/test/iterators/box_iterator.cpp index 48f015718..0f3b39a52 100644 --- a/test/iterators/box_iterator.cpp +++ b/test/iterators/box_iterator.cpp @@ -48,7 +48,7 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); return 0; } diff --git a/test/iterators/circular_iterator.cpp b/test/iterators/circular_iterator.cpp index f006288f6..d35ce5c12 100644 --- a/test/iterators/circular_iterator.cpp +++ b/test/iterators/circular_iterator.cpp @@ -101,7 +101,7 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); return 0; } diff --git a/test/iterators/closing_iterator.cpp b/test/iterators/closing_iterator.cpp index b8787759b..34046e678 100644 --- a/test/iterators/closing_iterator.cpp +++ b/test/iterators/closing_iterator.cpp @@ -106,7 +106,7 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); return 0; } diff --git a/test/iterators/ever_circling_iterator.cpp b/test/iterators/ever_circling_iterator.cpp index f44e469a6..dc1ee0b08 100644 --- a/test/iterators/ever_circling_iterator.cpp +++ b/test/iterators/ever_circling_iterator.cpp @@ -84,7 +84,7 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); return 0; } diff --git a/test/iterators/segment_range_iterator.cpp b/test/iterators/segment_range_iterator.cpp index 879f025e9..32b99ab6a 100644 --- a/test/iterators/segment_range_iterator.cpp +++ b/test/iterators/segment_range_iterator.cpp @@ -46,7 +46,7 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); return 0; } diff --git a/test/iterators/segment_returning_iterator.cpp b/test/iterators/segment_returning_iterator.cpp index 575f97768..63a17fb6b 100644 --- a/test/iterators/segment_returning_iterator.cpp +++ b/test/iterators/segment_returning_iterator.cpp @@ -56,7 +56,7 @@ void test_linestring(std::string const& wkt, std::string const& expected) int test_main(int, char* []) { // Test std::vector - typedef std::vector points_v; + typedef std::vector points_v; test_linestring("linestring empty", ""); test_linestring("linestring ()", ""); test_linestring("linestring (1 1)", ""); @@ -65,7 +65,7 @@ int test_main(int, char* []) test_linestring("linestring (1 1, 2 2, 3 3, 4 4, 5 5, 6 6)", "11222233334444555566"); // Test std::list - typedef std::list points_l; + typedef std::list points_l; test_linestring("linestring empty", ""); test_linestring("linestring ()", ""); test_linestring("linestring (1 1)", ""); diff --git a/test/multi/algorithms/multi_area.cpp b/test/multi/algorithms/multi_area.cpp index 0bf3b1c3c..099117809 100644 --- a/test/multi/algorithms/multi_area.cpp +++ b/test/multi/algorithms/multi_area.cpp @@ -26,7 +26,7 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_centroid.cpp b/test/multi/algorithms/multi_centroid.cpp index 5db72b9cb..92799d3af 100644 --- a/test/multi/algorithms/multi_centroid.cpp +++ b/test/multi/algorithms/multi_centroid.cpp @@ -96,11 +96,11 @@ void test_2d(bool is_integer = false) int test_main(int, char* []) { - //test_2d >(); - test_2d >(); - test_2d >(true); - //test_2d >(true); - test_2d >(); + //test_2d >(); + test_2d >(); + test_2d >(true); + //test_2d >(true); + test_2d >(); return 0; } diff --git a/test/multi/algorithms/multi_convex_hull.cpp b/test/multi/algorithms/multi_convex_hull.cpp index 766b1713c..6b5e34a38 100644 --- a/test/multi/algorithms/multi_convex_hull.cpp +++ b/test/multi/algorithms/multi_convex_hull.cpp @@ -46,9 +46,9 @@ void test_all() int test_main(int, char* []) { - //test_all >(); - //test_all >(); - test_all >(); + //test_all >(); + //test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_correct.cpp b/test/multi/algorithms/multi_correct.cpp index 9b41adec1..793ee25c2 100644 --- a/test/multi/algorithms/multi_correct.cpp +++ b/test/multi/algorithms/multi_correct.cpp @@ -52,7 +52,7 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_dissolve.cpp b/test/multi/algorithms/multi_dissolve.cpp index 5f0ba177a..04cb91256 100644 --- a/test/multi/algorithms/multi_dissolve.cpp +++ b/test/multi/algorithms/multi_dissolve.cpp @@ -62,7 +62,7 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_distance.cpp b/test/multi/algorithms/multi_distance.cpp index 0e26e23f5..0258de45d 100644 --- a/test/multi/algorithms/multi_distance.cpp +++ b/test/multi/algorithms/multi_distance.cpp @@ -129,13 +129,13 @@ void test_mixed() int test_main( int , char* [] ) { test_2d >(); - test_2d >(); - test_2d >(); + test_2d >(); + test_2d >(); test_3d >(); test_3d >(); - test_mixed, bg::model::point_xy >(); + test_mixed, bg::model::d2::point_xy >(); return 0; } diff --git a/test/multi/algorithms/multi_envelope.cpp b/test/multi/algorithms/multi_envelope.cpp index 4061bd0b9..f9a8f3383 100644 --- a/test/multi/algorithms/multi_envelope.cpp +++ b/test/multi/algorithms/multi_envelope.cpp @@ -48,8 +48,8 @@ void test_3d() int test_main( int , char* [] ) { test_2d >(); - test_2d >(); - test_2d >(); + test_2d >(); + test_2d >(); test_3d >(); test_3d >(); diff --git a/test/multi/algorithms/multi_equals.cpp b/test/multi/algorithms/multi_equals.cpp index 4e3b83888..537a982c1 100644 --- a/test/multi/algorithms/multi_equals.cpp +++ b/test/multi/algorithms/multi_equals.cpp @@ -45,7 +45,7 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_for_each.cpp b/test/multi/algorithms/multi_for_each.cpp index 135c9a472..94e33d046 100644 --- a/test/multi/algorithms/multi_for_each.cpp +++ b/test/multi/algorithms/multi_for_each.cpp @@ -72,7 +72,7 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_intersection.cpp b/test/multi/algorithms/multi_intersection.cpp index 11a1da1f4..328bc9827 100644 --- a/test/multi/algorithms/multi_intersection.cpp +++ b/test/multi/algorithms/multi_intersection.cpp @@ -159,7 +159,7 @@ return; int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_length.cpp b/test/multi/algorithms/multi_length.cpp index 7d0e20177..b20e1ee57 100644 --- a/test/multi/algorithms/multi_length.cpp +++ b/test/multi/algorithms/multi_length.cpp @@ -25,7 +25,7 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_perimeter.cpp b/test/multi/algorithms/multi_perimeter.cpp index 6abb51853..0bf863fc6 100644 --- a/test/multi/algorithms/multi_perimeter.cpp +++ b/test/multi/algorithms/multi_perimeter.cpp @@ -27,7 +27,7 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_reverse.cpp b/test/multi/algorithms/multi_reverse.cpp index 06abcdd96..8ba5a2663 100644 --- a/test/multi/algorithms/multi_reverse.cpp +++ b/test/multi/algorithms/multi_reverse.cpp @@ -44,8 +44,8 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_simplify.cpp b/test/multi/algorithms/multi_simplify.cpp index daeabc222..022d7435d 100644 --- a/test/multi/algorithms/multi_simplify.cpp +++ b/test/multi/algorithms/multi_simplify.cpp @@ -46,7 +46,7 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_union.cpp b/test/multi/algorithms/multi_union.cpp index 6e64d379e..5ae9681ce 100644 --- a/test/multi/algorithms/multi_union.cpp +++ b/test/multi/algorithms/multi_union.cpp @@ -128,7 +128,7 @@ void test_all() int test_main(int, char* []) { - test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_unique.cpp b/test/multi/algorithms/multi_unique.cpp index d77880a79..37af8bf9c 100644 --- a/test/multi/algorithms/multi_unique.cpp +++ b/test/multi/algorithms/multi_unique.cpp @@ -47,8 +47,8 @@ void test_all() int test_main( int , char* [] ) { - test_all >(); - test_all >(); + test_all >(); + test_all >(); return 0; } diff --git a/test/multi/algorithms/multi_within.cpp b/test/multi/algorithms/multi_within.cpp index 1b045ad77..a4a3c76ee 100644 --- a/test/multi/algorithms/multi_within.cpp +++ b/test/multi/algorithms/multi_within.cpp @@ -41,11 +41,11 @@ void test_all() int test_main( int , char* [] ) { - //test_all >(); - test_all >(); + //test_all >(); + test_all >(); #if defined(HAVE_TTMATH) - test_all >(); + test_all >(); #endif return 0; diff --git a/test/multi/algorithms/overlay/multi_svg_mapper.hpp b/test/multi/algorithms/overlay/multi_svg_mapper.hpp index 16b31251b..e07c66146 100644 --- a/test/multi/algorithms/overlay/multi_svg_mapper.hpp +++ b/test/multi/algorithms/overlay/multi_svg_mapper.hpp @@ -32,7 +32,7 @@ struct svg_map MultiPolygon const& multi_polygon, TransformStrategy const& strategy) { - bg::model::multi_polygon > > impoly; + bg::model::multi_polygon > > impoly; bg::transform(multi_polygon, impoly, strategy); stream << bg::svg(impoly, style, size) << std::endl; } diff --git a/test/ranges/box_range.cpp b/test/ranges/box_range.cpp index 377a3084b..032e9b518 100644 --- a/test/ranges/box_range.cpp +++ b/test/ranges/box_range.cpp @@ -64,6 +64,6 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); return 0; } diff --git a/test/ranges/segment_range.cpp b/test/ranges/segment_range.cpp index 2b83d5b8c..46ab1f088 100644 --- a/test/ranges/segment_range.cpp +++ b/test/ranges/segment_range.cpp @@ -70,6 +70,6 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); return 0; } diff --git a/test/util/closeable_view.cpp b/test/util/closeable_view.cpp index d5ff7abe9..3bf461054 100644 --- a/test/util/closeable_view.cpp +++ b/test/util/closeable_view.cpp @@ -122,7 +122,7 @@ int test_main(int, char* []) { test_non_geometry(); - test_all(); + test_all(); test_all >(); test_all >(); diff --git a/test/util/reversible_closeable.cpp b/test/util/reversible_closeable.cpp index 2167c68b4..6ab49fc28 100644 --- a/test/util/reversible_closeable.cpp +++ b/test/util/reversible_closeable.cpp @@ -166,7 +166,7 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); test_all >(); test_all >(); diff --git a/test/util/reversible_view.cpp b/test/util/reversible_view.cpp index dfb33a780..384fa125a 100644 --- a/test/util/reversible_view.cpp +++ b/test/util/reversible_view.cpp @@ -69,7 +69,7 @@ void test_all() int test_main(int, char* []) { - test_all(); + test_all(); test_all >(); test_all >();