Skip to content

Commit

Permalink
Merge pull request #7 from boostorg/develop
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Siddharth-coder13 committed Feb 9, 2021
2 parents 6ae8e07 + 602790a commit d0e6a99
Show file tree
Hide file tree
Showing 53 changed files with 1,942 additions and 789 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![Boost.Geometry](doc/other/logo/logo_bkg.png)

Boost.Geometry, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), defines concepts, primitives and algorithms for solving geometry problems.
Boost.Geometry, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), defines concepts, primitives and algorithms for solving geometry problems. Boost.Geometry is a C++14 header-only library.

[![Licence](https://img.shields.io/badge/license-boost-4480cc.png)](http://www.boost.org/LICENSE_1_0.txt)
[![Documentation](https://img.shields.io/badge/-documentation-4480cc.png)](http://boost.org/libs/geometry)
Expand Down
5 changes: 3 additions & 2 deletions example/05_b_overlay_linestring_polygon_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ int main(void)
#endif

// Calculate intersection points (turn points)
typedef bg::segment_ratio_type<point_2d, bg::detail::no_rescale_policy>::type segment_ratio;
typedef bg::detail::segment_ratio_type<point_2d, bg::detail::no_rescale_policy>::type segment_ratio;
typedef bg::detail::overlay::turn_info<point_2d, segment_ratio> turn_info;
std::vector<turn_info> turns;
bg::detail::get_turns::no_interrupt_policy policy;
bg::detail::no_rescale_policy rescale_policy;
bg::get_turns<false, false, bg::detail::overlay::assign_null_policy>(ls, p, rescale_policy, turns, policy);
bg::strategy::intersection::services::default_strategy<typename bg::cs_tag<point_2d>::type>::type intersection_strategy;
bg::get_turns<false, false, bg::detail::overlay::assign_null_policy>(ls, p, intersection_strategy, rescale_policy, turns, policy);

std::cout << "Intersection of linestring/polygon" << std::endl;
BOOST_FOREACH(turn_info const& turn, turns)
Expand Down
3 changes: 2 additions & 1 deletion example/c05_custom_point_pointer_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ int main()

// This works because outputs to a normal struct point, no point*
typedef boost::geometry::model::linestring<point_2d> linestring_2d;
boost::geometry::detail::no_rescale_policy rescale_policy;
std::vector<linestring_2d> clipped;
boost::geometry::strategy::intersection::liang_barsky<box_2d, point_2d> strategy;
boost::geometry::detail::intersection::clip_range_with_box<linestring_2d>(cb,
myline, std::back_inserter(clipped), strategy);
myline, rescale_policy, std::back_inserter(clipped), strategy);


std::cout << boost::geometry::length(clipped.front()) << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion example/c08_custom_non_std_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ int main()

// Create (as an example) a regular polygon
const int n = 5;
const double d = (360 / n) * boost::geometry::math::d2r;
const double d = (360 / n) * boost::geometry::math::d2r<double>();
double a = 0;
for (int i = 0; i < n + 1; i++, a += d)
{
Expand Down
2 changes: 1 addition & 1 deletion extensions/test/triangulation/side_robust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <geometry_test_common.hpp>

#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/extensions/triangulation/strategies/cartesian/side_robust.hpp>
#include <boost/geometry/strategy/cartesian/side_robust.hpp>

template <typename P>
void test_all()
Expand Down
Loading

0 comments on commit d0e6a99

Please sign in to comment.