mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
ensure valid objects in shapeindex test
This commit is contained in:
parent
0b22bd87f7
commit
a447c78d2e
@ -39,6 +39,7 @@ std::size_t count_shapefile_features(std::string const& filename)
|
||||
params["type"] = "shape";
|
||||
params["file"] = filename;
|
||||
auto ds = mapnik::datasource_cache::instance().create(params);
|
||||
REQUIRE(ds != nullptr);
|
||||
CHECK(ds->type() == mapnik::datasource::datasource_t::Vector);
|
||||
auto fields = ds->get_descriptor().get_descriptors();
|
||||
mapnik::query query(ds->envelope());
|
||||
@ -47,6 +48,7 @@ std::size_t count_shapefile_features(std::string const& filename)
|
||||
query.add_property_name(field.get_name());
|
||||
}
|
||||
auto features = ds->features(query);
|
||||
REQUIRE(features != nullptr);
|
||||
|
||||
std::size_t feature_count = 0;
|
||||
auto feature = features->next();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user