Class BoundingBoxUtils

java.lang.Object
org.codice.ddf.opensearch.source.BoundingBoxUtils

public final class BoundingBoxUtils extends Object
  • Method Details

    • createBoundingBox

      public static BoundingBox createBoundingBox(PointRadius pointRadius)
      Takes in a PointRadius search and converts it to a (rough approximation) bounding box using Vincenty's formula (direct) and the WGS-84 approximation of the Earth.
    • createBoundingBox

      public static BoundingBox createBoundingBox(org.locationtech.jts.geom.Polygon polygon)
      Takes in a Polygon and converts it to a (rough approximation) BoundingBox.

      Note: Searches being performed where the polygon goes through the antimeridian will return an incorrect bounding box. TODO DDF-3742

    • getBoundingBoxCoordinatesList

      public static List<List<Double>> getBoundingBoxCoordinatesList(BoundingBox boundingBox)
      Takes in a BoundingBox and extracts the coordinates in a counter clockwise matter with first and last coordinate being the same point
      Parameters:
      boundingBox -
      Returns: