diff options
Diffstat (limited to 'server/src/api.cpp')
| -rw-r--r-- | server/src/api.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/server/src/api.cpp b/server/src/api.cpp index fb1d228..18fbc91 100644 --- a/server/src/api.cpp +++ b/server/src/api.cpp | |||
| @@ -154,10 +154,16 @@ auto handler::process_gpx(gpx::file&& gpx_file) | |||
| 154 | // Note: thomas strategy does not work for geographic_join_round; | 154 | // Note: thomas strategy does not work for geographic_join_round; |
| 155 | // need to use andoyer for that. | 155 | // need to use andoyer for that. |
| 156 | using formula = bgeo::strategy::thomas; | 156 | using formula = bgeo::strategy::thomas; |
| 157 | bgeo::strategy::buffer::distance_symmetric<double> distance_strategy{buffer_distance}; | 157 | bgeo::strategy::buffer::distance_symmetric<double> distance_strategy{ |
| 158 | bgeo::strategy::buffer::geographic_join_miter<formula> join_strategy{buffer_distance}; | 158 | buffer_distance |
| 159 | }; | ||
| 160 | bgeo::strategy::buffer::geographic_join_miter<formula> join_strategy{ | ||
| 161 | buffer_distance | ||
| 162 | }; | ||
| 159 | bgeo::strategy::buffer::geographic_end_round<formula> end_strategy{4}; | 163 | bgeo::strategy::buffer::geographic_end_round<formula> end_strategy{4}; |
| 160 | bgeo::strategy::buffer::geographic_point_circle<formula> circle_strategy{points_per_circle}; | 164 | bgeo::strategy::buffer::geographic_point_circle<formula> circle_strategy{ |
| 165 | points_per_circle | ||
| 166 | }; | ||
| 161 | bgeo::strategy::buffer::geographic_side_straight<formula> side_strategy; | 167 | bgeo::strategy::buffer::geographic_side_straight<formula> side_strategy; |
| 162 | 168 | ||
| 163 | using polygon = bgeo::model::polygon<geo::point>; | 169 | using polygon = bgeo::model::polygon<geo::point>; |
| @@ -192,7 +198,9 @@ auto handler::process_gpx(gpx::file&& gpx_file) | |||
| 192 | if (rc->validity | 198 | if (rc->validity |
| 193 | && rc->validity->intersect(check_periods).periods().empty()) | 199 | && rc->validity->intersect(check_periods).periods().empty()) |
| 194 | continue; | 200 | continue; |
| 195 | bgeo::buffer(*ls, buffered_ls, distance_strategy, side_strategy, join_strategy, end_strategy, circle_strategy); | 201 | bgeo::buffer( |
| 202 | *ls, buffered_ls, distance_strategy, side_strategy, join_strategy, | ||
| 203 | end_strategy, circle_strategy); | ||
| 196 | if (bgeo::intersects(buffered_ls, part)) | 204 | if (bgeo::intersects(buffered_ls, part)) |
| 197 | relevant_road_closures.emplace(rc); | 205 | relevant_road_closures.emplace(rc); |
| 198 | ls_checked++; | 206 | ls_checked++; |