mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
Reflects renaming things
[SVN r70854]
This commit is contained in:
parent
fbaa12058e
commit
2c0378bccb
@ -153,10 +153,10 @@ namespace units
|
||||
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
inline typename quantity<Geometry1, typename distance_result<Geometry1, Geometry2>::type>::type
|
||||
inline typename quantity<Geometry1, typename default_distance_result<Geometry1, Geometry2>::type>::type
|
||||
distance(Geometry1 const& g1, Geometry2 const& g2)
|
||||
{
|
||||
typedef typename quantity<Geometry1, typename distance_result<Geometry1, Geometry2>::type>::type q;
|
||||
typedef typename quantity<Geometry1, typename default_distance_result<Geometry1, Geometry2>::type>::type q;
|
||||
return q::from_value(geometry::distance(g1, g2));
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
template <typename P>
|
||||
void test_distance_result()
|
||||
{
|
||||
typedef typename bg::distance_result<P, P>::type distance_type;
|
||||
typedef typename bg::default_distance_result<P, P>::type distance_type;
|
||||
|
||||
P p1 = bg::make<P>(0, 0);
|
||||
P p2 = bg::make<P>(3, 0);
|
||||
|
@ -61,7 +61,7 @@ template <typename Box>
|
||||
struct box_visitor
|
||||
{
|
||||
int count;
|
||||
typename bg::area_result<Box>::type area;
|
||||
typename bg::default_area_result<Box>::type area;
|
||||
|
||||
box_visitor()
|
||||
: count(0)
|
||||
|
@ -28,7 +28,7 @@ template <typename P>
|
||||
void test_distance_point()
|
||||
{
|
||||
namespace services = bg::strategy::distance::services;
|
||||
typedef typename bg::distance_result<P>::type return_type;
|
||||
typedef typename bg::default_distance_result<P>::type return_type;
|
||||
|
||||
// Basic, trivial test
|
||||
|
||||
@ -79,7 +79,7 @@ void test_distance_point()
|
||||
template <typename P>
|
||||
void test_distance_segment()
|
||||
{
|
||||
typedef typename bg::distance_result<P>::type return_type;
|
||||
typedef typename bg::default_distance_result<P>::type return_type;
|
||||
typedef typename bg::coordinate_type<P>::type coordinate_type;
|
||||
|
||||
P s1; bg::set<0>(s1, 1); bg::set<1>(s1, 1);
|
||||
@ -134,7 +134,7 @@ void test_distance_segment()
|
||||
template <typename P>
|
||||
void test_distance_array_as_linestring()
|
||||
{
|
||||
typedef typename bg::distance_result<P>::type return_type;
|
||||
typedef typename bg::default_distance_result<P>::type return_type;
|
||||
|
||||
// Normal array does not have
|
||||
boost::array<P, 2> points;
|
||||
|
@ -217,7 +217,7 @@ void test_boxes(std::string const& wkt1, std::string const& wkt2, double expecte
|
||||
|
||||
Box box_out;
|
||||
bool detected = bg::intersection(box1, box2, box_out);
|
||||
typename bg::area_result<Box>::type area = bg::area(box_out);
|
||||
typename bg::default_area_result<Box>::type area = bg::area(box_out);
|
||||
|
||||
BOOST_CHECK_EQUAL(detected, expected_result);
|
||||
if (detected && expected_result)
|
||||
|
@ -46,7 +46,7 @@ inline void test_assemble(std::string const& id, Geometry const& p, Geometry con
|
||||
|
||||
if (operation == 'i')
|
||||
{
|
||||
typedef typename bg::area_result<Geometry>::type type;
|
||||
typedef typename bg::default_area_result<Geometry>::type type;
|
||||
type area_p = bg::area(p);
|
||||
type area_q = bg::area(q);
|
||||
|
||||
|
@ -168,7 +168,7 @@ struct test_traverse
|
||||
);
|
||||
|
||||
// Check total area of resulting rings
|
||||
typename bg::area_result<G1>::type total_area = 0;
|
||||
typename bg::default_area_result<G1>::type total_area = 0;
|
||||
BOOST_FOREACH(ring_type const& ring, v)
|
||||
{
|
||||
total_area += bg::area(ring);
|
||||
|
@ -19,15 +19,15 @@
|
||||
|
||||
template <typename Geometry>
|
||||
void test_area(Geometry const& geometry,
|
||||
typename bg::area_result<Geometry>::type expected_area)
|
||||
typename bg::default_area_result<Geometry>::type expected_area)
|
||||
{
|
||||
typename bg::area_result<Geometry>::type area = bg::area(geometry);
|
||||
typename bg::default_area_result<Geometry>::type area = bg::area(geometry);
|
||||
|
||||
#ifdef GEOMETRY_TEST_DEBUG
|
||||
std::ostringstream out;
|
||||
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
|
||||
<< " "
|
||||
<< typeid(typename bg::area_result<Geometry>::type).name()
|
||||
<< typeid(typename bg::default_area_result<Geometry>::type).name()
|
||||
<< " "
|
||||
<< "area : " << bg::area(geometry)
|
||||
<< std::endl;
|
||||
@ -56,7 +56,7 @@ void test_area(Geometry const& geometry,
|
||||
|
||||
template <typename Geometry>
|
||||
void test_geometry(std::string const& wkt,
|
||||
typename bg::area_result<Geometry>::type expected_area)
|
||||
typename bg::default_area_result<Geometry>::type expected_area)
|
||||
{
|
||||
Geometry geometry;
|
||||
bg::read_wkt(wkt, geometry);
|
||||
|
@ -41,7 +41,7 @@ void test_convex_hull(Geometry const& geometry, Hull const& hull,
|
||||
|
||||
BOOST_CHECK(bg::num_points(geometry) == size_original);
|
||||
|
||||
typename bg::area_result<Geometry>::type ah = bg::area(hull);
|
||||
typename bg::default_area_result<Geometry>::type ah = bg::area(hull);
|
||||
if (reverse)
|
||||
{
|
||||
ah = -ah;
|
||||
|
@ -64,7 +64,7 @@ void test_difference(std::string const& caseid, G1 const& g1, G2 const& g2,
|
||||
bg::difference(g1, g2, clip);
|
||||
}
|
||||
|
||||
typename bg::area_result<G1>::type area = 0;
|
||||
typename bg::default_area_result<G1>::type area = 0;
|
||||
std::size_t n = 0;
|
||||
for (typename std::vector<OutputType>::iterator it = clip.begin();
|
||||
it != clip.end();
|
||||
|
@ -111,13 +111,13 @@ void test_distance(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
long double expected_distance)
|
||||
{
|
||||
typename bg::distance_result<Geometry1>::type distance = bg::distance(geometry1, geometry2);
|
||||
typename bg::default_distance_result<Geometry1>::type distance = bg::distance(geometry1, geometry2);
|
||||
|
||||
#ifdef GEOMETRY_TEST_DEBUG
|
||||
std::ostringstream out;
|
||||
out << typeid(typename bg::coordinate_type<Geometry1>::type).name()
|
||||
<< std::endl
|
||||
<< typeid(typename bg::distance_result<Geometry1>::type).name()
|
||||
<< typeid(typename bg::default_distance_result<Geometry1>::type).name()
|
||||
<< std::endl
|
||||
<< "distance : " << bg::distance(geometry1, geometry2)
|
||||
<< std::endl;
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
template <typename OutputType, typename CalculationType, typename G1, typename G2>
|
||||
typename bg::area_result<G1>::type test_intersection(std::string const& caseid,
|
||||
typename bg::default_area_result<G1>::type test_intersection(std::string const& caseid,
|
||||
G1 const& g1, G2 const& g2,
|
||||
std::size_t expected_count = 0, std::size_t expected_point_count = 0,
|
||||
double expected_length_or_area = 0,
|
||||
@ -69,7 +69,7 @@ typename bg::area_result<G1>::type test_intersection(std::string const& caseid,
|
||||
bg::detail::intersection::intersection_insert<OutputType>(g1, g2, std::back_inserter(clip), strategy());
|
||||
|
||||
|
||||
typename bg::area_result<G1>::type length_or_area = 0;
|
||||
typename bg::default_area_result<G1>::type length_or_area = 0;
|
||||
std::size_t n = 0;
|
||||
for (typename std::vector<OutputType>::iterator it = clip.begin();
|
||||
it != clip.end();
|
||||
@ -174,7 +174,7 @@ typename bg::area_result<G1>::type test_intersection(std::string const& caseid,
|
||||
}
|
||||
|
||||
template <typename OutputType, typename G1, typename G2>
|
||||
typename bg::area_result<G1>::type test_one(std::string const& caseid,
|
||||
typename bg::default_area_result<G1>::type test_one(std::string const& caseid,
|
||||
std::string const& wkt1, std::string const& wkt2,
|
||||
std::size_t expected_count = 0, std::size_t expected_point_count = 0,
|
||||
double expected_length_or_area = 0,
|
||||
|
@ -18,13 +18,13 @@
|
||||
template <typename Geometry>
|
||||
void test_length(Geometry const& geometry, long double expected_length)
|
||||
{
|
||||
typename bg::length_result<Geometry>::type length = bg::length(geometry);
|
||||
typename bg::default_length_result<Geometry>::type length = bg::length(geometry);
|
||||
|
||||
#ifdef GEOMETRY_TEST_DEBUG
|
||||
std::ostringstream out;
|
||||
out << typeid(typename bg::coordinate_type<Geometry>::type).name()
|
||||
<< std::endl
|
||||
<< typeid(typename bg::length_result<Geometry>::type).name()
|
||||
<< typeid(typename bg::default_length_result<Geometry>::type).name()
|
||||
<< std::endl
|
||||
<< "length : " << bg::length(geometry)
|
||||
<< std::endl;
|
||||
|
@ -21,7 +21,7 @@
|
||||
template <typename Geometry>
|
||||
void test_perimeter(Geometry const& geometry, long double expected_perimeter)
|
||||
{
|
||||
typename bg::distance_result<Geometry>::type perimeter = bg::perimeter(geometry);
|
||||
typename bg::default_distance_result<Geometry>::type perimeter = bg::perimeter(geometry);
|
||||
|
||||
#ifdef GEOMETRY_TEST_DEBUG
|
||||
std::ostringstream out;
|
||||
|
@ -45,7 +45,7 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
|
||||
std::vector<OutputType> clip;
|
||||
bg::union_(g1, g2, clip);
|
||||
|
||||
typename bg::area_result<G1>::type area = 0;
|
||||
typename bg::default_area_result<G1>::type area = 0;
|
||||
std::size_t n = 0;
|
||||
std::size_t holes = 0;
|
||||
for (typename std::vector<OutputType>::iterator it = clip.begin();
|
||||
@ -68,7 +68,7 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
|
||||
array_with_one_empty_geometry.push_back(OutputType());
|
||||
boost::copy(array_with_one_empty_geometry, bg::detail::union_::union_insert<OutputType>(g1, g2, std::back_inserter(inserted)));
|
||||
|
||||
typename bg::area_result<G1>::type area_inserted = 0;
|
||||
typename bg::default_area_result<G1>::type area_inserted = 0;
|
||||
for (typename std::vector<OutputType>::iterator it = inserted.begin();
|
||||
it != inserted.end(); ++it)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ void test_connect(std::string const& caseid, Geometry const& geometry,
|
||||
bg::connect(geometry, connected_vector);
|
||||
}
|
||||
|
||||
typename bg::length_result<Geometry>::type length = 0;
|
||||
typename bg::default_length_result<Geometry>::type length = 0;
|
||||
std::size_t count = boost::size(connected_vector);
|
||||
std::size_t point_count = 0;
|
||||
|
||||
|
@ -83,7 +83,7 @@ void test_dissolve(std::string const& caseid, Geometry const& geometry,
|
||||
std::vector<GeometryOut> dissolved_vector;
|
||||
bg::dissolve_inserter<GeometryOut>(geometry, std::back_inserter(dissolved_vector));
|
||||
|
||||
typename bg::area_result<Geometry>::type length_or_area = 0;
|
||||
typename bg::default_area_result<Geometry>::type length_or_area = 0;
|
||||
//std::size_t holes = 0;
|
||||
std::size_t count = 0;
|
||||
|
||||
|
@ -47,7 +47,7 @@ void test_offset(std::string const& caseid, Geometry const& geometry,
|
||||
GeometryOut moved_by_offset;
|
||||
bg::offset(geometry, moved_by_offset, join_strategy(2), distance);
|
||||
|
||||
typename bg::length_result<Geometry>::type length
|
||||
typename bg::default_length_result<Geometry>::type length
|
||||
= bg::length(moved_by_offset);
|
||||
|
||||
/*
|
||||
|
@ -35,7 +35,7 @@ void test_distance(std::string const& wkt1, std::string const& wkt2, double expe
|
||||
Geometry2 g2;
|
||||
bg::read_wkt(wkt1, g1);
|
||||
bg::read_wkt(wkt2, g2);
|
||||
typename bg::distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2);
|
||||
typename bg::default_distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2);
|
||||
|
||||
BOOST_CHECK_CLOSE(d, expected, 0.0001);
|
||||
}
|
||||
@ -48,7 +48,7 @@ void test_distance(Strategy const& strategy, std::string const& wkt1,
|
||||
Geometry2 g2;
|
||||
bg::read_wkt(wkt1, g1);
|
||||
bg::read_wkt(wkt2, g2);
|
||||
typename bg::distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2, strategy);
|
||||
typename bg::default_distance_result<Geometry1, Geometry2>::type d = bg::distance(g1, g2, strategy);
|
||||
|
||||
BOOST_CHECK_CLOSE(d, expected, 0.0001);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user