// mapnik #include #include MAPNIK_DISABLE_WARNING_PUSH #include #include #include MAPNIK_DISABLE_WARNING_POP namespace mapnik { using simplify_algorithm_lookup_type = boost::bimap; static simplify_algorithm_lookup_type const simplify_lookup = boost::assign::list_of(radial_distance, "radial-distance")( douglas_peucker, "douglas-peucker")(visvalingam_whyatt, "visvalingam-whyatt")(zhao_saalfeld, "zhao-saalfeld"); std::optional simplify_algorithm_from_string(std::string const& name) { simplify_algorithm_lookup_type::right_const_iterator right_iter = simplify_lookup.right.find(name); if (right_iter != simplify_lookup.right.end()) { return right_iter->second; } return std::nullopt; } std::optional simplify_algorithm_to_string(simplify_algorithm_e value) { simplify_algorithm_lookup_type::left_const_iterator left_iter = simplify_lookup.left.find(value); if (left_iter != simplify_lookup.left.end()) { return left_iter->second; } return std::nullopt; } } // namespace mapnik