mapnik-index - check extracted bounding box is valid

This commit is contained in:
artemp 2015-11-02 14:14:12 +00:00
parent 58c7e5baa3
commit 2acafe78ee

View file

@ -99,8 +99,11 @@ std::pair<bool,box2d<double>> process_geojson_file(T & boxes, std::string const&
}
for (auto const& item : boxes)
{
if (!extent.valid()) extent = item.first;
else extent.expand_to_include(item.first);
if (item.first.valid())
{
if (!extent.valid()) extent = item.first;
else extent.expand_to_include(item.first);
}
}
return std::make_pair(true, extent);
}