1 #pragma once
2 
3 #include <mapbox/geometry/wagyu/build_edges.hpp>
4 #include <mapbox/geometry/wagyu/config.hpp>
5 #include <mapbox/geometry/wagyu/local_minimum.hpp>
6 #include <mapbox/geometry/wagyu/local_minimum_util.hpp>
7 
8 namespace mapbox {
9 namespace geometry {
10 namespace wagyu {
11 
12 template <typename T1, typename T2>
add_linear_ring(mapbox::geometry::linear_ring<T2> const & path_geometry,local_minimum_list<T1> & minima_list,polygon_type p_type)13 bool add_linear_ring(mapbox::geometry::linear_ring<T2> const& path_geometry,
14                      local_minimum_list<T1>& minima_list,
15                      polygon_type p_type) {
16     edge_list<T1> new_edges;
17     new_edges.reserve(path_geometry.size());
18     if (!build_edge_list<T1, T2>(path_geometry, new_edges) || new_edges.empty()) {
19         return false;
20     }
21     add_ring_to_local_minima_list(new_edges, minima_list, p_type);
22     return true;
23 }
24 }
25 }
26 }
27