bbox method

List<T> bbox(
  1. double minLon,
  2. double minLat,
  3. double maxLon,
  4. double maxLat,
)

Returns all polygons that intersect with the given bounding box.

Implementation

List<T> bbox(double minLon, double minLat, double maxLon, double maxLat) {
  final List<T> output = [];
  final bbox = BBox(minLon, minLat, maxLon, maxLat);
  final result = _findInTree(bbox: bbox);
  for (final item in result) {
    if (_polygonIntersectsBBox(item.polygon, bbox)) {
      output.add(item.props);
    }
  }
  return output;
}