store {bbox, offset} to match boost.geometry rtree instantiation

This commit is contained in:
artemp 2015-01-16 16:24:31 +01:00
parent 788fd8c80b
commit b6cd3b37ef
2 changed files with 6 additions and 7 deletions

View file

@ -42,9 +42,8 @@
namespace mapnik { namespace json {
struct empty {};
using position = std::tuple<double,double>;
using boxes = std::vector<std::tuple<std::size_t,box2d<double>>>;
using boxes = std::vector<std::tuple<box2d<double>, std::size_t>>;
namespace qi = boost::spirit::qi;
namespace standard_wide = boost::spirit::standard_wide;
@ -78,7 +77,7 @@ struct push_box_impl
template <typename T>
result_type operator() (T & boxes, std::size_t offset, box2d<double> const& box) const
{
boxes.emplace_back(offset, box);
boxes.emplace_back(box, offset);
}
};

View file

@ -55,13 +55,13 @@ extract_bounding_box_grammar<Iterator, ErrorHandler>::extract_bounding_box_gramm
qi::_r3_type _r3;
qi::_a_type _a;
qi::_b_type _b;
qi::skip_type skip;
qi::lexeme_type lexeme;
boost::spirit::repository::qi::seek_type seek;
boost::spirit::repository::qi::iter_pos_type iter_pos;
using qi::fail;
using qi::on_error;
using qi::skip;
using qi::lexeme;
using boost::phoenix::push_back;
using boost::spirit::repository::qi::seek;
using boost::spirit::repository::qi::iter_pos;
start = features(_r1)
;