diff --git a/include/mapnik/util/spatial_index.hpp b/include/mapnik/util/spatial_index.hpp index da30f058e..b0c26ed4b 100644 --- a/include/mapnik/util/spatial_index.hpp +++ b/include/mapnik/util/spatial_index.hpp @@ -69,7 +69,7 @@ bool spatial_index::check_header(InputStream& in) template box2d spatial_index::bounding_box(InputStream& in) { - if (!check_header(in)) throw std::runtime_error("Invalid index file"); + if (!check_header(in)) throw std::runtime_error("Invalid index file (regenerate with shapeindex)"); in.seekg(16 + 4, std::ios::beg); box2d box; read_envelope(in, box); @@ -80,7 +80,7 @@ box2d spatial_index::bounding_box(InputStrea template void spatial_index::query(Filter const& filter, InputStream& in, std::vector& results) { - if (!check_header(in)) throw std::runtime_error("Invalid index file"); + if (!check_header(in)) throw std::runtime_error("Invalid index file (regenerate with shapeindex)"); in.seekg(16, std::ios::beg); query_node(filter, in, results); } @@ -115,7 +115,7 @@ void spatial_index::query_node(Filter const& filter, template void spatial_index::query_first_n(Filter const& filter, InputStream& in, std::vector& results, std::size_t count) { - if (!check_header(in)) throw std::runtime_error("Invalid index file"); + if (!check_header(in)) throw std::runtime_error("Invalid index file (regenerate with shapeindex)"); in.seekg(16, std::ios::beg); query_first_n_impl(filter, in, results, count); }