3 #include <lanelet2_core/geometry/Lanelet.h>
7 #include <boost/geometry/algorithms/perimeter.hpp>
12 Velocity speedLimit(
const traffic_rules::TrafficRules& trafficRules,
const ConstLaneletOrArea& la) {
13 auto limit = la.applyVisitor([&](
auto& la) {
return trafficRules.speedLimit(la); });
14 if (limit.speedLimit.value() == 0.) {
15 limit.speedLimit = std::numeric_limits<double>::max() *
Velocity();
17 if (std::isinf(limit.speedLimit.value())) {
20 return limit.speedLimit;
25 auto limit = speedLimit(trafficRules,
ll);
30 auto limit = speedLimit(trafficRules, ar);
38 return double(boost::geometry::perimeter(utils::to2D(ar.outerBoundPolygon())));