spatial_index<...> - use operator>> for reading Value's + update shape_index_featureset

This commit is contained in:
artemp 2015-09-25 10:43:10 +01:00
parent fa3ab5077e
commit 99617ad71c
2 changed files with 11 additions and 2 deletions

View file

@ -103,8 +103,8 @@ void spatial_index<Value, Filter, InputStream>::query_node(Filter const& filter,
for (int i = 0; i < num_shapes; ++i)
{
Value item;
in.read(reinterpret_cast<char*>(&item), sizeof(item)); // FIXME : use operator>>
results.push_back(item);
in >> item;
results.push_back(std::move(item));
}
int children = read_ndr_integer(in);

View file

@ -40,6 +40,15 @@
#include "shape_utils.hpp"
#include <mapnik/util/spatial_index.hpp>
// operator>> needed by mapnik::spatial_index<Value, Filter, InputStream>
template <typename InputStream>
InputStream & operator>>(InputStream & in, std::streampos pos)
{
in.read(reinterpret_cast<char*>(&pos), sizeof(std::streampos));
return in;
}
using mapnik::feature_factory;
template <typename filterT>