extract_bounding_box - fail on nested "FeatureCollection" elements
This commit is contained in:
parent
47c93eaf15
commit
6aca4b17f8
2 changed files with 17 additions and 14 deletions
|
@ -72,9 +72,12 @@ extract_bounding_box_grammar<Iterator, ErrorHandler>::extract_bounding_box_gramm
|
||||||
;
|
;
|
||||||
|
|
||||||
feature = raw[lit('{')[_a = 1]
|
feature = raw[lit('{')[_a = 1]
|
||||||
>> *(eps(_a > 0) >> (lit('{')[_a += 1]
|
>> *(eps(_a > 0) >> (
|
||||||
|
lit("\"FeatureCollection\"") > eps(false) // fail if nested FeatureCollection
|
||||||
|
|
|
|
||||||
lit('}')[_a -=1]
|
lit('{')[_a += 1]
|
||||||
|
|
|
||||||
|
lit('}')[_a -= 1]
|
||||||
|
|
|
|
||||||
coords[_b = _1]
|
coords[_b = _1]
|
||||||
|
|
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ std::pair<bool,box2d<double>> process_geojson_file(T & boxes, std::string const&
|
||||||
}
|
}
|
||||||
catch (std::exception const& ex)
|
catch (std::exception const& ex)
|
||||||
{
|
{
|
||||||
std::clog << "mapnik-index:" << ex.what() << std::endl;
|
std::clog << "mapnik-index (GeoJSON): " << ex.what() << std::endl;
|
||||||
}
|
}
|
||||||
for (auto const& item : boxes)
|
for (auto const& item : boxes)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue