Skip to content

Commit

Permalink
Merge branch 'develop' into test/add-more-cmake-lists
Browse files Browse the repository at this point in the history
  • Loading branch information
vissarion authored Jul 24, 2024
2 parents 6a2e439 + 931d432 commit aa42b99
Show file tree
Hide file tree
Showing 124 changed files with 806 additions and 3,189 deletions.
5 changes: 2 additions & 3 deletions example/05_b_overlay_linestring_polygon_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ int main(void)
#endif

// Calculate intersection points (turn points)
using segment_ratio = bg::detail::segment_ratio_type<point_2d, bg::detail::no_rescale_policy>::type;
using segment_ratio = bg::segment_ratio_type<point_2d>::type;
using turn_info = bg::detail::overlay::turn_info<point_2d, segment_ratio>;
std::vector<turn_info> turns;
bg::detail::get_turns::no_interrupt_policy policy;
bg::detail::no_rescale_policy rescale_policy;
bg::strategies::relate::services::default_strategy<bg::model::linestring<point_2d>, bg::model::polygon<point_2d>>::type strategy;
bg::get_turns<false, false, bg::detail::overlay::assign_null_policy>(ls, p, strategy, rescale_policy, turns, policy);
bg::get_turns<false, false, bg::detail::overlay::assign_null_policy>(ls, p, strategy, turns, policy);

std::cout << "Intersection of linestring/polygon" << std::endl;
for (turn_info const& turn : turns)
Expand Down
3 changes: 1 addition & 2 deletions example/c05_custom_point_pointer_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ 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, rescale_policy, std::back_inserter(clipped), strategy);
myline, std::back_inserter(clipped), strategy);


std::cout << boost::geometry::length(clipped.front()) << std::endl;
Expand Down
Loading

0 comments on commit aa42b99

Please sign in to comment.