Updated paths

Added ccw test for area

[SVN r61707]
This commit is contained in:
Barend Gehrels 2010-04-30 14:58:07 +00:00
parent 64f3bdb447
commit da5e753d62
3 changed files with 15 additions and 5 deletions

View File

@ -19,9 +19,9 @@
#include <boost/geometry/core/point_type.hpp>
#include <boost/geometry/strategies/buffer_side.hpp>
#include <boost/geometry/algorithms/detail/buffer/intersecting_inserter.hpp>
#include <boost/geometry/algorithms/detail/buffer/linestring_buffer.hpp>
#include <boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp>
#include <boost/geometry/extensions/algorithms/buffer/intersecting_inserter.hpp>
#include <boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp>
#include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
#include <boost/geometry/algorithms/detail/sections/get_section.hpp>
#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>

View File

@ -13,7 +13,7 @@
#include <boost/range/metafunctions.hpp>
#include <boost/geometry/core/point_type.hpp>
#include <boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp>
#include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
#include <boost/geometry/algorithms/detail/disjoint.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>

View File

@ -22,7 +22,6 @@
template <typename P>
void test_all()
{
//test_area_circle<P, double>();
test_geometry<boost::geometry::box<P> >("POLYGON((0 0,2 2))", 4.0);
test_geometry<boost::geometry::box<P> >("POLYGON((2 2,0 0))", 4.0);
@ -66,6 +65,15 @@ void test_spherical()
BOOST_CHECK_CLOSE(area, 2.0 * 2.0 * expected, 0.0001);
}
template <typename P>
void test_ccw()
{
typedef boost::geometry::polygon<P, std::vector, std::vector, false> ccw_polygon;
// counterclockwise rings (second is wrongly ordered)
test_geometry<ccw_polygon>("POLYGON((0 0,0 7,4 2,2 0,0 0))", -16.0);
test_geometry<ccw_polygon>("POLYGON((0 0,2 0,4 2,0 7,0 0))", 16.0);
}
int test_main(int, char* [])
{
@ -75,6 +83,8 @@ int test_main(int, char* [])
test_spherical<boost::geometry::point<double, 2, boost::geometry::cs::spherical<boost::geometry::degree> > >();
test_ccw<boost::geometry::point<double, 2, boost::geometry::cs::cartesian> >();
#if defined(HAVE_CLN)
test_all<boost::geometry::point_xy<boost::numeric_adaptor::cln_value_type> >();
#endif