bbox property
BoundingBox
get
bbox
Returns the BoundingBox of the FeatureCollection If the FeatureCollection is empty, returns a BoundingBox.empty
Example:
FeatureCollection([
LineString([Coordinate(1, 2), Coordinate(3, 4)]),
LineString([Coordinate(5, 6), Coordinate(7, 8)])
]).bbox; // BoundingBox(1, 2, 7, 8)
Implementation
BoundingBox get bbox {
if (features.isEmpty) {
return BoundingBox.empty();
}
List<Point> points = (explode().features as List<Point>);
return BoundingBox.fromPoints(points);
}