reinstate 'from_wkt' interface

This commit is contained in:
artemp 2015-03-12 14:12:53 +01:00
parent c4607aaeeb
commit 6d13454f72
2 changed files with 6 additions and 9 deletions

View file

@ -45,15 +45,13 @@ inline bool from_wkt(std::string const& wkt, mapnik::new_geometry::geometry & ge
return qi::phrase_parse(first, last, (g)(boost::phoenix::ref(geom)), space); return qi::phrase_parse(first, last, (g)(boost::phoenix::ref(geom)), space);
} }
#if 0 // FIXME inline bool to_wkt(std::string & wkt, mapnik::new_geometry::geometry const& geom)
inline bool to_wkt(mapnik::geometry_container const& paths, std::string& wkt)
{ {
using sink_type = std::back_insert_iterator<std::string>; using sink_type = std::back_insert_iterator<std::string>;
static const mapnik::wkt::wkt_multi_generator<sink_type, mapnik::geometry_container> generator; static const mapnik::wkt::wkt_generator_grammar<sink_type, mapnik::new_geometry::geometry> generator;
sink_type sink(wkt); sink_type sink(wkt);
return boost::spirit::karma::generate(sink, generator, paths); return boost::spirit::karma::generate(sink, generator, geom);
} }
#endif
} }

View file

@ -25,9 +25,8 @@
#include <string> #include <string>
namespace mapnik { namespace wkt { namespace mapnik { namespace wkt {
#if 0
using sink_type = std::back_insert_iterator<std::string>; using sink_type = std::back_insert_iterator<std::string>;
template struct wkt_generator<sink_type, mapnik::geometry_type>; template struct wkt_generator_grammar<sink_type, mapnik::new_geometry::geometry>;
template struct wkt_multi_generator<sink_type, mapnik::geometry_container>;
#endif
}} }}