[core] Add bounding box overlapping check before line within polygon test

This commit is contained in:
zmiao
2020-02-20 16:29:58 +02:00
parent 385fcd52a0
commit 7cdb526dcc
4 changed files with 144 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
#include <mbgl/style/expression/expression.hpp>
#include <mbgl/util/geojson.hpp>
#include <mbgl/util/geometry_within.hpp>
#include <mbgl/util/optional.hpp>
namespace mbgl {
@@ -10,7 +11,7 @@ namespace expression {
class Within final : public Expression {
public:
explicit Within(GeoJSON geojson, Feature::geometry_type geometries_);
explicit Within(GeoJSON geojson, Feature::geometry_type geometries_, WithinBBox polygonBBox_);
~Within() override;
@@ -30,6 +31,7 @@ public:
private:
GeoJSON geoJSONSource;
Feature::geometry_type geometries;
WithinBBox polygonBBox;
};
} // namespace expression