diff --git a/plugins/input/shape/shape_io.hpp b/plugins/input/shape/shape_io.hpp index c2fd3a564..1828ebd54 100644 --- a/plugins/input/shape/shape_io.hpp +++ b/plugins/input/shape/shape_io.hpp @@ -23,16 +23,16 @@ #ifndef SHAPE_IO_HPP #define SHAPE_IO_HPP +// stl +#include +#include // mapnik #include #include - +#include // boost #include - -// stl -#include - +// #include "dbfile.hpp" #include "shapefile.hpp" @@ -72,7 +72,13 @@ public: inline bool has_index() const { - return (index_ && index_->is_open()); + if (index_ && index_->is_open()) + { + bool status = mapnik::util::check_spatial_index(index_->file()); + index_->seek(0);// rewind + return status; + } + return false; } inline int id() const { return id_;}