Class BoundingBox


  • public class BoundingBox
    extends Object
    Represents a bounding box in a specific projection. A BoundingBox is immutable, so you must create a new BoundingBox object, rather than modify the the values of an existing BoundingBox.
    Author:
    chodgson@refractions.net
    • Constructor Detail

      • BoundingBox

        public BoundingBox​(String srs,
                           float minx,
                           float miny,
                           float maxx,
                           float maxy)
        Creates a new BoundingBox with the given SRS, minima and maxima.
        Parameters:
        srs - a WMS-style SRS string such as "EPSG:1234", or the special string "LatLon" for a latitude/longitude box
        minx - the minimum x-value of the bounding box
        miny - the minimum y-value of the bounding box
        maxx - the maximum x-value of the bounding box
        maxy - the maximum y-value of the bounding box
    • Method Detail

      • getSRS

        public String getSRS()
        Gets the SRS string.
        Returns:
        the BoundingBox's SRS WMS-style string
      • getMinX

        public float getMinX()
        Gets the BoundingBox's minimum x value.
        Returns:
        the BoundingBox's minimum x value
      • getMinY

        public float getMinY()
        Gets the BoundingBox's minimum y value.
        Returns:
        the BoundingBox's minimum y value
      • getMaxX

        public float getMaxX()
        Gets the BoundingBox's maximum x value.
        Returns:
        the BoundingBox's maximum x value
      • getMaxY

        public float getMaxY()
        Gets the BoundingBox's maximum y value.
        Returns:
        the BoundingBox's maximum y value