// mapnik #include // boost #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-local-typedef" #pragma GCC diagnostic ignored "-Wredeclared-class-member" #include #include #pragma GCC diagnostic pop namespace mapnik { using simplify_algorithm_lookup_type = boost::bimap; static const simplify_algorithm_lookup_type simplify_lookup = boost::assign::list_of (radial_distance,"radial-distance") (douglas_peucker,"douglas-peucker") (visvalingam_whyatt,"visvalingam-whyatt") (zhao_saalfeld,"zhao-saalfeld") ; boost::optional simplify_algorithm_from_string(std::string const& name) { boost::optional algo; simplify_algorithm_lookup_type::right_const_iterator right_iter = simplify_lookup.right.find(name); if (right_iter != simplify_lookup.right.end()) { algo.reset(right_iter->second); } return algo; } boost::optional simplify_algorithm_to_string(simplify_algorithm_e value) { boost::optional algo; simplify_algorithm_lookup_type::left_const_iterator left_iter = simplify_lookup.left.find(value); if (left_iter != simplify_lookup.left.end()) { algo.reset(left_iter->second); } return algo; } }