Skip to content

Commit

Permalink
Merge pull request #1514 from mapnik/conv_simplify
Browse files Browse the repository at this point in the history
Conv simplify
  • Loading branch information
artemp committed Oct 1, 2012
2 parents b9fed93 + 037c1a8 commit f298af6
Show file tree
Hide file tree
Showing 20 changed files with 622 additions and 11 deletions.
4 changes: 4 additions & 0 deletions bindings/python/mapnik_line_symbolizer.cpp
Expand Up @@ -48,6 +48,10 @@ void export_line_symbolizer()
(&line_symbolizer::get_stroke,
return_value_policy<reference_existing_object>()),
&line_symbolizer::set_stroke)
.add_property("simplify_tolerance",
&line_symbolizer::simplify_tolerance,
&line_symbolizer::set_simplify_tolerance,
"simplification tolerance measure")
.add_property("offset",
&line_symbolizer::offset,
&line_symbolizer::set_offset,
Expand Down
4 changes: 4 additions & 0 deletions bindings/python/mapnik_polygon_symbolizer.cpp
Expand Up @@ -60,6 +60,10 @@ void export_polygon_symbolizer()
&polygon_symbolizer::smooth,
&polygon_symbolizer::set_smooth,
"Set/get the polygon geometry's smooth value")
.add_property("simplify_tolerance",
&polygon_symbolizer::simplify_tolerance,
&polygon_symbolizer::set_simplify_tolerance,
"simplfication tolerance measure")
;

}
25 changes: 25 additions & 0 deletions include/mapnik/simplify.hpp
@@ -0,0 +1,25 @@
#ifndef MAPNIK_SIMPLIFY_HPP
#define MAPNIK_SIMPLIFY_HPP

#include <mapnik/debug.hpp>

// Boost
#include <boost/optional.hpp>

namespace mapnik
{

enum simplify_algorithm_e
{
radial_distance = 0,
douglas_peucker,
visvalingam_whyatt,
zhao_saalfeld
};

MAPNIK_DECL boost::optional<simplify_algorithm_e> simplify_algorithm_from_string(std::string const& name);
MAPNIK_DECL boost::optional<std::string> simplify_algorithm_to_string(simplify_algorithm_e algorithm);

}

#endif // MAPNIK_SIMPLIFY_HPP

0 comments on commit f298af6

Please sign in to comment.