Class Extent


  • public final class Extent
    extends java.lang.Object
    An extent defines an area by two coordinates: min latitude/min longitude and max latitude/max longitude.
    Author:
    P.J. Meisch ([email protected]).
    • Method Detail

      • forCoordinates

        public static Extent forCoordinates​(Coordinate... coordinates)
        creates the extent of the given coordinates.
        Parameters:
        coordinates - the coordinates
        Returns:
        Extent for the coorinates
        Throws:
        java.lang.IllegalArgumentException - when less than 2 coordinates or null are passed in
        java.lang.NullPointerException - when coordinates is null
      • forCoordinates

        public static Extent forCoordinates​(java.util.Collection<? extends Coordinate> coordinates)
        creates the extent of the given coordinates.
        Parameters:
        coordinates - the coordinates
        Returns:
        Extent for the coorinates
        Throws:
        java.lang.IllegalArgumentException - when less than 2 coordinates or null are passed in
        java.lang.NullPointerException - when coordinates is null
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object