Takes a set of features, calculates the bbox of all input features, and returns a bounding box.

@param multiPolygon a {@link MultiPolygon} object
@return a double array defining the bounding box in this order {@code [minX, minY, maxX, maxY]}
@since 2.0.0
976592
public static double[] bbox(MultiPolygon multiPolygon) {
    List<Point> resultCoords = TurfMeta.coordAll(multiPolygon, false);
    return bboxCalculator(resultCoords);
  }
1088957
public Rectangle2D getBoundingBox() {
		Rectangle2D bb = new Rectangle2D.Double(
				m_base.getX(),
				m_base.getY()-50,
				getWidth(),
				50);
		return bb;
	}
198320
def bbox2wktpolygon(bbox):
    

    minx = float(bbox[0])
    miny = float(bbox[1])
    maxx = float(bbox[2])
    maxy = float(bbox[3])
    return 'POLYGON((%.2f %.2f, %.2f %.2f, %.2f %.2f, %.2f %.2f, %.2f %.2f))' \
        % (minx, miny, minx, maxy, maxx, maxy, maxx, miny, minx, miny)
129467
public static Geometry drapeMultiPolygon(MultiPolygon polygons, Geometry triangles, STRtree sTRtree) {
        GeometryFactory factory = polygons.getFactory();         
        //Split the triangles in lines to perform all intersections
        Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true);
        int nbPolygons = polygons.getNumGeometries();
        Polygon[] polygonsDiff = new Polygon[nbPolygons];
        for (int i = 0; i < nbPolygons; i++) {
            polygonsDiff[i] = processPolygon((Polygon) polygons.getGeometryN(i), triangleLines, factory);
        }
        Geometry diffExt = factory.createMultiPolygon(polygonsDiff);
        CoordinateSequenceFilter drapeFilter = new DrapeFilter(sTRtree);
        diffExt.apply(drapeFilter);
        return diffExt;
    }
314986
public void boundingPolygonCCW(SquareGrid grid, Polygon2D_F64 bounding) {
		int w = grid.columns;
		int h = grid.rows;

		if( w == 1 && h == 1 ) {
			SquareNode n = grid.get(0,0);
			bounding.get(0).set(n.square.get(0));
			bounding.get(1).set(n.square.get(1));
			bounding.get(2).set(n.square.get(2));
			bounding.get(3).set(n.square.get(3));
		} else if( w == 1 ) {
			orderNode(grid.get(0, 0), grid.get(h - 1, 0), false);
			bounding.get(0).set(ordered[0]);
			bounding.get(1).set(ordered[1]);
			orderNode(grid.get(h - 1, 0), grid.get(0, 0), false);
			bounding.get(2).set(ordered[0]);
			bounding.get(3).set(ordered[1]);
		} else if( h == 1 ) {
			orderNode(grid.get(0, 0), grid.get(0, w - 1), true);
			bounding.get(0).set(ordered[0]);
			bounding.get(3).set(ordered[3]);
			orderNode(grid.get(0, w - 1), grid.get(0, 0), true);
			bounding.get(1).set(ordered[3]);
			bounding.get(2).set(ordered[0]);
		} else {
			orderNode(grid.get(0, 0), grid.get(0, w - 1), true);
			bounding.get(0).set(ordered[0]);
			orderNode(grid.get(0, w - 1), grid.get(h - 1, w - 1), true);
			bounding.get(1).set(ordered[0]);
			orderNode(grid.get(h - 1, w - 1), grid.get(h - 1, 0), true);
			bounding.get(2).set(ordered[0]);
			orderNode(grid.get(h - 1, 0), grid.get(0, 0), true);
			bounding.get(3).set(ordered[0]);
		}
	}
972739
public Rectangle2D getBounds2D() {
		int[] r = rect();
		return r==null?null:new Rectangle2D.Double(r[0], r[1], r[2], r[3]);
	}
230387
@Override
	@Pure
	protected Rectangle2d calcBounds() {
		final Rectangle2d bounds = super.calcBounds().toBoundingBox();
		if (bounds != null && isWidePolyline()) {
			final double w = getWidth();
			final double mx = bounds.getMinX();
			final double my = bounds.getMinY();
			final double xx = bounds.getMaxX();
			final double xy = bounds.getMaxY();
			final double dw = w / 2.;
			bounds.setFromCorners(mx - dw, my - dw, xx + dw, xy + dw);
		}
		return bounds;
	}
355956
public Bbox getBounds() {
		Bbox bounds = null;
		if (!isEmpty()) {
			for (Polygon polygon : polygons) {
				if (bounds == null) {
					bounds = polygon.getBounds();
				} else {
					bounds = bounds.union(polygon.getBounds());
				}
			}
		}
		return bounds;
	}
459312
public static MultiPolygon of(Stream<Polygon> polygons) {
        return of(polygons.collect(Collectors.toList()));
    }
347054
public ObjectProperty<RectangularPrism3ifx> controlPointBoundingBoxProperty() {
		if (this.logicalBounds == null) {
			this.logicalBounds = new ReadOnlyObjectWrapper<>(this, MathFXAttributeNames.CONTROL_POINT_BOUNDING_BOX);
			this.logicalBounds.bind(Bindings.createObjectBinding(() -> {
				final RectangularPrism3ifx bb = getGeomFactory().newBox();
				Path3ai.computeControlPointBoundingBox(
						getPathIterator(),
						bb);
				return bb;
			},
					innerCoordinatesProperty()));
		}
		return this.logicalBounds;
	}
180086
public static double[] getMin(SpatialComparable box) {
    final int dim = box.getDimensionality();
    double[] min = new double[dim];
    for(int i = 0; i < dim; i++) {
      min[i] = box.getMin(i);
    }
    return min;
  }
392557
def get_bounding_box(self):
        
        if len(self.polygons) == 0:
            return None
        return numpy.array(((min(pts[:, 0].min() for pts in self.polygons),
                             min(pts[:, 1].min() for pts in self.polygons)),
                            (max(pts[:, 0].max() for pts in self.polygons),
                             max(pts[:, 1].max() for pts in self.polygons))))
498040
public Bbox getMaximumBounds() {
		org.geomajas.gwt.client.spatial.Bbox box = mapView.getMaxBounds();
		return new Bbox(box.getX(), box.getY(), box.getWidth(), box.getHeight());
	}
547304
public ObjectProperty<Rectangle2dfx> controlPointBoundingBoxProperty() {
		if (this.logicalBounds == null) {
			this.logicalBounds = new ReadOnlyObjectWrapper<>(this, MathFXAttributeNames.CONTROL_POINT_BOUNDING_BOX);
			this.logicalBounds.bind(Bindings.createObjectBinding(() -> {
				final Rectangle2dfx bb = getGeomFactory().newBox();
				Path2afp.calculatesControlPointBoundingBox(
						getPathIterator(),
						bb);
				return bb;
			},
					innerCoordinatesProperty()));
		}
		return this.logicalBounds;
	}
38083
def get_bounding_box(obj, maxdist):
    
    if hasattr(obj, 'get_bounding_box'):
        return obj.get_bounding_box(maxdist)
    elif hasattr(obj, 'polygon'):
        bbox = obj.polygon.get_bbox()
    else:
        if isinstance(obj, list):  # a list of locations
            lons = numpy.array([loc.longitude for loc in obj])
            lats = numpy.array([loc.latitude for loc in obj])
        else:  # assume an array with fields lon, lat
            lons, lats = obj['lon'], obj['lat']
        min_lon, max_lon = lons.min(), lons.max()
        if cross_idl(min_lon, max_lon):
            lons %= 360
        bbox = lons.min(), lats.min(), lons.max(), lats.max()
    a1 = min(maxdist * KM_TO_DEGREES, 90)
    a2 = min(angular_distance(maxdist, bbox[1], bbox[3]), 180)
    return bbox[0] - a2, bbox[1] - a1, bbox[2] + a2, bbox[3] + a1
337794
public BoundingBox getBoundingBox() {
		BoundingBox boundingBox = null;
		if (minX != null && maxX != null && minY != null && maxY != null) {
			boundingBox = new BoundingBox(getMinX(), getMinY(), getMaxX(),
					getMaxY());
		}
		return boundingBox;
	}
809942
def bounding_box
      unless @bbox
        p = @points[0]
        minX = p[0]
        maxX = p[0]
        minY = p[1]
        maxY = p[1]
        minZ = p[2]
        maxZ = p[2]
        @points.each{|p|
          minX = p[0] if p[0] < minX  
          maxX = p[0] if p[0] > maxX  
          minY = p[1] if p[1] < minY  
          maxY = p[1] if p[1] > maxY  
          minZ = p[2] if p[2] < minZ  
          maxZ = p[2] if p[2] > maxZ  
        }
        @max = Vector[maxX, maxY,maxZ]
        @min = Vector[minX, minY, minZ]
        @bbox = Volume.new([Plane.new(-1,0,0, minX, minY, minZ), 
                           Plane.new(0,-1,0, minX, minY, minZ),
                           Plane.new(0,0,-1, minX, minY, minZ),
                           Plane.new(1,0,0, maxX, maxY, maxZ),
                           Plane.new(0,1,0, maxX, maxY, maxZ), 
                           Plane.new(0,0,1, maxX, maxY, maxZ)])
      end
      @bbox
    end