/** * Takes a set of features, calculates the bbox of all input features, and returns a bounding box. * * @param multiPoint a {@link MultiPoint} object * @return a double array defining the bounding box in this order {@code [minX, minY, maxX, maxY]} * @since 2.0.0 */ public static double[] bbox(@NonNull MultiPoint multiPoint) { List<Point> resultCoords = TurfMeta.coordAll(multiPoint); return bboxCalculator(resultCoords); }
/** * Takes a set of features, calculates the bbox of all input features, and returns a bounding box. * * @param lineString a {@link LineString} object * @return A double array defining the bounding box in this order {@code [minX, minY, maxX, maxY]} * @since 2.0.0 */ public static double[] bbox(@NonNull LineString lineString) { List<Point> resultCoords = TurfMeta.coordAll(lineString); return bboxCalculator(resultCoords); }
/** * Takes a set of features, calculates the bbox of all input features, and returns a bounding box. * * @param multiLineString a {@link MultiLineString} object * @return a double array defining the bounding box in this order {@code [minX, minY, maxX, maxY]} * @since 2.0.0 */ public static double[] bbox(@NonNull MultiLineString multiLineString) { List<Point> resultCoords = TurfMeta.coordAll(multiLineString); return bboxCalculator(resultCoords); }
/** * Takes a set of features, calculates the bbox of all input features, and returns a bounding box. * * @param point a {@link Point} object * @return A double array defining the bounding box in this order {@code [minX, minY, maxX, maxY]} * @since 2.0.0 */ public static double[] bbox(@NonNull Point point) { List<Point> resultCoords = TurfMeta.coordAll(point); return bboxCalculator(resultCoords); }
/** * Takes a set of features, calculates the bbox of all input features, and returns a bounding box. * * @param polygon a {@link Polygon} object * @return a double array defining the bounding box in this order {@code [minX, minY, maxX, maxY]} * @since 2.0.0 */ public static double[] bbox(@NonNull Polygon polygon) { List<Point> resultCoords = TurfMeta.coordAll(polygon, false); return bboxCalculator(resultCoords); }
/** * 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 */ public static double[] bbox(MultiPolygon multiPolygon) { List<Point> resultCoords = TurfMeta.coordAll(multiPolygon, false); return bboxCalculator(resultCoords); }