diff --git a/test/algorithms/area/area_geo.cpp b/test/algorithms/area/area_geo.cpp index 284d179cd..5a380653d 100644 --- a/test/algorithms/area/area_geo.cpp +++ b/test/algorithms/area/area_geo.cpp @@ -1,6 +1,8 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test +// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. + // This file was modified by Oracle on 2015, 2016, 2017. // Modifications copyright (c) 2015-2017, Oracle and/or its affiliates. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle @@ -26,46 +28,46 @@ void test_geo_strategies() typedef bg::model::point > pt_geo; - bg::strategy::area::geographic geographic_default; + bg::strategy::area::geographic<> geographic_default; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_andoyer1; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_andoyer2; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_andoyer3; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_andoyer4; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_andoyer5; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_thomas1; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_thomas2; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_thomas3; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_thomas4; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_thomas5; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_vincenty1; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_vincenty2; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_vincenty3; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_vincenty4; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_vincenty5; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_andoyer_default; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_thomas_default; - bg::strategy::area::geographic + bg::strategy::area::geographic geographic_vincenty_default; bg::model::polygon geometry_geo; diff --git a/test/algorithms/area/area_sph_geo.cpp b/test/algorithms/area/area_sph_geo.cpp index d6d3e6fee..dc7d9f628 100644 --- a/test/algorithms/area/area_sph_geo.cpp +++ b/test/algorithms/area/area_sph_geo.cpp @@ -4,6 +4,7 @@ // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. // This file was modified by Oracle on 2015, 2016, 2017. // Modifications copyright (c) 2015-2017, Oracle and/or its affiliates. @@ -36,11 +37,8 @@ void test_spherical_geo() ct, 2, bg::cs::geographic > pt_geo; - typedef typename bg::point_type::type pt_geo_type; - bg::strategy::area::geographic < - pt_geo_type, bg::strategy::vincenty, 5 > area_geographic; @@ -61,7 +59,7 @@ void test_spherical_geo() bg::strategy::area::spherical < - typename bg::point_type::type + ct > strategy_unary(1.0); ct const four = 4.0; @@ -74,7 +72,7 @@ void test_spherical_geo() // With strategy, radius 2 -> 4 pi r^2 bg::strategy::area::spherical < - typename bg::point_type::type + ct > strategy(2.0); area = bg::area(geometry, strategy); @@ -96,7 +94,7 @@ void test_spherical_geo() bg::strategy::area::spherical < - typename bg::point_type::type + ct > spherical_earth(6373); bg::read_wkt(poly, geometry); area = bg::area(geometry, spherical_earth); @@ -376,7 +374,7 @@ void test_spherical_geo() }*/ bg::strategy::area::spherical < - typename bg::point_type::type + ct > area_spherical(6372.795); area = bg::area(aurha, area_spherical); BOOST_CHECK_CLOSE(area, 1476.645675, 0.0001); @@ -395,13 +393,13 @@ void test_spherical_geo() std::string wkt = "POLYGON((0 0, 5 0, 5 5, 0 5, 0 0))"; bg::read_wkt(wkt, geometry_sph); - area = bg::area(geometry_sph, bg::strategy::area::spherical(6371228.0)); + area = bg::area(geometry_sph, bg::strategy::area::spherical<>(6371228.0)); BOOST_CHECK_CLOSE(area, 308932296103.83051, 0.0001); bg::model::polygon geometry_geo; bg::read_wkt(wkt, geometry_geo); - area = bg::area(geometry_geo, bg::strategy::area::geographic(bg::srs::spheroid(6371228.0, 6371228.0))); + area = bg::area(geometry_geo, bg::strategy::area::geographic<>(bg::srs::spheroid(6371228.0, 6371228.0))); BOOST_CHECK_CLOSE(area, 308932296103.82574, 0.001); } } diff --git a/test/algorithms/area/test_area.hpp b/test/algorithms/area/test_area.hpp index 51bbfddf8..bf8b41c88 100644 --- a/test/algorithms/area/test_area.hpp +++ b/test/algorithms/area/test_area.hpp @@ -2,6 +2,7 @@ // Unit Test // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -40,16 +41,12 @@ void test_area(Geometry const& geometry, BOOST_CHECK_CLOSE(area, expected_area, 0.0001); // Test with explicitly defined strategies - bg::strategy::area::surveyor - < - typename bg::point_type::type - > strategy1; + bg::strategy::area::cartesian<> strategy1; area = bg::area(geometry, strategy1); - bg::strategy::area::surveyor + bg::strategy::area::cartesian < - typename bg::point_type::type, typename bg::coordinate_type::type > strategy2; diff --git a/test/algorithms/is_valid_geo.cpp b/test/algorithms/is_valid_geo.cpp index 875073727..b5f547b9c 100644 --- a/test/algorithms/is_valid_geo.cpp +++ b/test/algorithms/is_valid_geo.cpp @@ -1,6 +1,8 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test +// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. + // Copyright (c) 2014-2017, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle @@ -46,7 +48,7 @@ void test_valid_s(std::string const& wkt, typedef typename bg::point_type::type pt; bg::strategy::intersection::geographic_segments<> is(sph); - bg::strategy::area::geographic as(sph); + bg::strategy::area::geographic<> as(sph); Poly p; bg::read_wkt(wkt, p); diff --git a/test/algorithms/set_operations/union/union_aa_geo.cpp b/test/algorithms/set_operations/union/union_aa_geo.cpp index 674d55dc2..00587e91c 100644 --- a/test/algorithms/set_operations/union/union_aa_geo.cpp +++ b/test/algorithms/set_operations/union/union_aa_geo.cpp @@ -1,6 +1,8 @@ // Boost.Geometry // Unit Test +// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland. + // Copyright (c) 2017, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -50,7 +52,7 @@ void test_geographic_one(std::string const& wkt1, std::string const& wkt2, bg::srs::spheroid sph(6378137.0000000000, 6356752.3142451793); bg::strategy::intersection::geographic_segments<> is(sph); - bg::strategy::area::geographic as(sph); + bg::strategy::area::geographic<> as(sph); polygon p1, p2; @@ -98,8 +100,8 @@ void test_geographic_one(std::string const& wkt1, std::string const& wkt2, } else { - BOOST_CHECK_EQUAL(result_count, 0); - BOOST_CHECK_EQUAL(result_area, 0); + BOOST_CHECK_EQUAL(result_count, 0u); + BOOST_CHECK_EQUAL(result_area, 0.0); } } }