Class BoundingBoxImpl

    • Constructor Detail

      • BoundingBoxImpl

        public BoundingBoxImpl​(double minx,
                               double miny,
                               double maxx,
                               double maxy)
        Creates a BoundingBox from the minimum and maximum axis values, with the default CRS
      • BoundingBoxImpl

        public BoundingBoxImpl​(double minx,
                               double miny,
                               double maxx,
                               double maxy,
                               org.opengis.referencing.crs.CoordinateReferenceSystem crs)
        Creates a BoundingBox from the minimum and maximum axis values
      • BoundingBoxImpl

        public BoundingBoxImpl​(Extent<Double> xExtent,
                               Extent<Double> yExtent,
                               org.opengis.referencing.crs.CoordinateReferenceSystem crs)
        Creates a BoundingBox from the x- and y- extents
      • BoundingBoxImpl

        public BoundingBoxImpl​(org.opengis.metadata.extent.GeographicBoundingBox gbb)
        Creates a BoundingBox from an existing GeographicBoundingBox
        Parameters:
        gbb - The GeographicBoundingBox defining this BoundingBox
      • BoundingBoxImpl

        public BoundingBoxImpl​(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
        Creates a BoundingBox from a CoordinateReferenceSystem, where the bounds are the limits of validity of the CRS
        Parameters:
        crs -
    • Method Detail

      • getCoordinateReferenceSystem

        public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
        Description copied from interface: Polygon
        Returns the two-dimensional horizontal coordinate reference system to which the vertices are referenced.
        Specified by:
        getCoordinateReferenceSystem in interface Polygon
        Returns:
        the two-dimensional horizontal coordinate reference system to which the vertices are referenced.
      • getMinX

        public double getMinX()
        Description copied from interface: BoundingBox
        Gets the minimum ordinate along the first axis, equivalent to getMinimum(0).
        Specified by:
        getMinX in interface BoundingBox
      • getMaxX

        public double getMaxX()
        Description copied from interface: BoundingBox
        Gets the maximum ordinate along the first axis, equivalent to getMaximum(0).
        Specified by:
        getMaxX in interface BoundingBox
      • getMinY

        public double getMinY()
        Description copied from interface: BoundingBox
        Gets the minimum ordinate along the second axis, equivalent to getMinimum(1).
        Specified by:
        getMinY in interface BoundingBox
      • getMaxY

        public double getMaxY()
        Description copied from interface: BoundingBox
        Gets the maximum ordinate along the second axis, equivalent to getMaximum(1).
        Specified by:
        getMaxY in interface BoundingBox
      • getWidth

        public double getWidth()
        Description copied from interface: BoundingBox
        Gets the width of the bounding box, i.e. getMaxX() - getMinX().
        Specified by:
        getWidth in interface BoundingBox
      • getHeight

        public double getHeight()
        Description copied from interface: BoundingBox
        Gets the height of the bounding box, i.e. getMaxY() - getMinY().
        Specified by:
        getHeight in interface BoundingBox
      • getVertices

        public List<HorizontalPosition> getVertices()
        Returns a list of vertices in anticlockwise order starting at minx, miny
        Specified by:
        getVertices in interface Polygon
        Returns:
        the list of vertices that define this polygon in the horizontal plane.
      • contains

        public boolean contains​(double x,
                                double y)
        Provides a more efficient contains() method than the one in AbstractPolygon
        Overrides:
        contains in class AbstractPolygon