+ impl GEOMETRYCOLLECTION parser as composite
This commit is contained in:
parent
f76d94cec9
commit
3daa06bb11
1 changed files with 7 additions and 5 deletions
|
@ -129,14 +129,16 @@ struct wkt_grammar : qi::grammar<Iterator, geometry_type*(), ascii::space_type>
|
|||
boost::phoenix::function<cleanup> cleanup_;
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
struct wkt_list_grammar : qi::grammar<Iterator, boost::ptr_vector<mapnik::geometry_type>(), ascii::space_type>
|
||||
struct wkt_collection_grammar : qi::grammar<Iterator, boost::ptr_vector<mapnik::geometry_type>(), ascii::space_type>
|
||||
{
|
||||
wkt_list_grammar()
|
||||
: wkt_list_grammar::base_type(start)
|
||||
wkt_collection_grammar()
|
||||
: wkt_collection_grammar::base_type(start)
|
||||
{
|
||||
start = *wkt;
|
||||
using qi::no_case;
|
||||
using boost::phoenix::push_back;
|
||||
start = wkt [push_back(_val,_1)] | no_case[lit("GEOMETRYCOLLECTION")]
|
||||
>> (lit("(") >> *wkt[push_back(_val,_1)] % lit(",") >> lit(")"));
|
||||
}
|
||||
|
||||
qi::rule<Iterator,boost::ptr_vector<mapnik::geometry_type>(),ascii::space_type> start;
|
||||
|
|
Loading…
Add table
Reference in a new issue