From 52b3cd46c76fd4be18aeb8422a08a073484b9fad Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Sat, 29 Aug 2026 12:01:42 +0200 Subject: More module implementation partition units --- server/src/geo.cppm | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'server/src/geo.cppm') diff --git a/server/src/geo.cppm b/server/src/geo.cppm index b599ad4..4f8b840 100644 --- a/server/src/geo.cppm +++ b/server/src/geo.cppm @@ -17,33 +17,6 @@ using vincenty_strategy = bgeo::strategy::distance::vincenty; auto split_linestring_with_overlap_segments( linestring const& ls, double max_split_distance_m, - std::vector& append_to) -> void -{ - if (bgeo::is_empty(ls)) - return; - - auto current_ls = linestring{}; - auto current_ls_length = 0.0; - auto previous = std::optional{}; - bgeo::for_each_point( - ls, - [&](point p) -> void - { - bgeo::append(current_ls, p); - if (previous) - { - auto d = bgeo::distance(*previous, p, vincenty_strategy()); - current_ls_length += d; - if (current_ls_length > max_split_distance_m) - { - append_to.push_back(std::move(current_ls)); - current_ls = linestring{*previous, p}; - current_ls_length = d; - } - } - previous = p; - }); - append_to.emplace_back(std::move(current_ls)); -} + std::vector& append_to) -> void; } // namespace routemon::geo -- cgit v1.3