Interface Envelope

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CoordinateReferenceSystem getCoordinateReferenceSystem()
      Returns the envelope coordinate reference system, or null if unknown.
      int getDimension()
      The length of coordinate sequence (the number of entries) in this envelope.
      DirectPosition getLowerCorner()
      A coordinate position consisting of all the minimal ordinates for each dimension for all points within the Envelope.
      double getMaximum​(int dimension)
      Returns the maximal ordinate along the specified dimension.
      double getMedian​(int dimension)
      Returns the median ordinate along the specified dimension.
      double getMinimum​(int dimension)
      Returns the minimal ordinate along the specified dimension.
      double getSpan​(int dimension)
      Returns the envelope span (typically width or height) along the specified dimension.
      DirectPosition getUpperCorner()
      A coordinate position consisting of all the maximal ordinates for each dimension for all points within the Envelope.
    • Method Detail

      • getCoordinateReferenceSystem

        @Extension
        CoordinateReferenceSystem getCoordinateReferenceSystem()
        Returns the envelope coordinate reference system, or null if unknown. If non-null, it shall be the same as lower corner and upper corner CRS.
        Returns:
        The envelope CRS, or null if unknown.
        Since:
        GeoAPI 2.1
      • getDimension

        @Extension
        int getDimension()
        The length of coordinate sequence (the number of entries) in this envelope. Mandatory even when the coordinate reference system is unknown.
        Returns:
        The dimensionality of this envelope.
        Since:
        GeoAPI 2.0
      • getMinimum

        @Extension
        double getMinimum​(int dimension)
                   throws IndexOutOfBoundsException
        Returns the minimal ordinate along the specified dimension. This is a shortcut for the following without the cost of creating a temporary DirectPosition object:
        getLowerCorner().getOrdinate(dimension)
        Parameters:
        dimension - The dimension for which to obtain the ordinate value.
        Returns:
        The minimal ordinate at the given dimension.
        Throws:
        IndexOutOfBoundsException - If the given index is negative or is equals or greater than the envelope dimension.
        Since:
        GeoAPI 2.0
        See Also:
        RectangularShape.getMinX(), RectangularShape.getMinY()
      • getMaximum

        @Extension
        double getMaximum​(int dimension)
                   throws IndexOutOfBoundsException
        Returns the maximal ordinate along the specified dimension. This is a shortcut for the following without the cost of creating a temporary DirectPosition object:
        getUpperCorner().getOrdinate(dimension)
        Parameters:
        dimension - The dimension for which to obtain the ordinate value.
        Returns:
        The maximal ordinate at the given dimension.
        Throws:
        IndexOutOfBoundsException - If the given index is negative or is equals or greater than the envelope dimension.
        Since:
        GeoAPI 2.0
        See Also:
        RectangularShape.getMaxX(), RectangularShape.getMaxY()
      • getMedian

        @Extension
        double getMedian​(int dimension)
                  throws IndexOutOfBoundsException
        Returns the median ordinate along the specified dimension. The result should be equals (minus rounding error) to:
        (getMinimum(dimension) + getMaximum(dimension)) / 2
        Parameters:
        dimension - The dimension for which to obtain the ordinate value.
        Returns:
        The median ordinate at the given dimension.
        Throws:
        IndexOutOfBoundsException - If the given index is negative or is equals or greater than the envelope dimension.
        Since:
        GeoAPI 2.2
        See Also:
        RectangularShape.getCenterX(), RectangularShape.getCenterY()
      • getSpan

        @Extension
        double getSpan​(int dimension)
                throws IndexOutOfBoundsException
        Returns the envelope span (typically width or height) along the specified dimension. The result should be equals (minus rounding error) to:
        getMaximum(dimension) - getMinimum(dimension)
        Parameters:
        dimension - The dimension for which to obtain the ordinate value.
        Returns:
        The span (typically width or height) at the given dimension.
        Throws:
        IndexOutOfBoundsException - If the given index is negative or is equals or greater than the envelope dimension.
        Since:
        GeoAPI 2.2
        See Also:
        RectangularShape.getWidth(), RectangularShape.getHeight()