Class GeographicEnvelope

All Implemented Interfaces:
Emptiable, org.opengis.geometry.Envelope, org.opengis.metadata.extent.Extent, org.opengis.metadata.extent.GeographicBoundingBox, org.opengis.metadata.extent.GeographicExtent
Direct Known Subclasses:
Bounds

public abstract class GeographicEnvelope extends AbstractEnvelope implements org.opengis.metadata.extent.GeographicBoundingBox, org.opengis.metadata.extent.Extent
Base class of geographic bounding boxes to expose also as an envelope and an ISO 19115 extent. This base class does not contain any field. It is aimed to be sub-classed by data stores which will add their own JAXB annotations. The only methods that subclasses need to implement are:
  • GeographicBoundingBox.getSouthBoundLatitude()
  • GeographicBoundingBox.getNorthBoundLatitude()
  • GeographicBoundingBox.getWestBoundLongitude()
  • GeographicBoundingBox.getEastBoundLongitude()
The envelope assumes a two-dimensional WGS84 coordinate reference system with (latitude, longitude) axis order, as defined by EPSG:4326.
Since:
0.8
Version:
0.8
  • Constructor Details

    • GeographicEnvelope

      protected GeographicEnvelope()
      For subclass constructors.
  • Method Details

    • getDimension

      public int getDimension()
      Returns the number of dimensions, which is assumed to be 2. The value returned by this method shall be equal to the value returned by getCoordinateReferenceSystem().getCoordinateSystem().getDimension().
      Specified by:
      getDimension in interface org.opengis.geometry.Envelope
      Returns:
      the number of dimensions in this envelope.
    • getCoordinateReferenceSystem

      public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
      Returns the coordinate reference system, or null if unknown. The default implementation returns a two-dimensional WGS84 coordinate reference system with (latitude, longitude) axis order, as defined by EPSG:4326.
      Specified by:
      getCoordinateReferenceSystem in interface org.opengis.geometry.Envelope
      Returns:
      the coordinate reference system, or null.
    • getLower

      public double getLower(int dimension)
      Returns the south or west envelope bound.
      Specified by:
      getLower in class AbstractEnvelope
      Parameters:
      dimension - 0 for the south bound, 1 for the west bound.
      Returns:
      the requested envelope bound.
      Throws:
      IndexOutOfBoundsException - if the given index is not a positive number less than the number of dimensions.
      See Also:
    • getUpper

      public double getUpper(int dimension)
      Returns the north or east envelope bound.
      Specified by:
      getUpper in class AbstractEnvelope
      Parameters:
      dimension - 0 for the north bound, 1 for the east bound.
      Returns:
      the requested envelope bound.
      Throws:
      IndexOutOfBoundsException - if the given index is not a positive number less than the number of dimensions.
      See Also:
    • getDescription

      public org.opengis.util.InternationalString getDescription()
      Returns the spatial and temporal extent for the referring object. The default implementation unconditionally returns null.
      Specified by:
      getDescription in interface org.opengis.metadata.extent.Extent
      Returns:
      the spatial and temporal extent, or null in none.
    • getGeographicElements

      public Collection<? extends org.opengis.metadata.extent.GeographicExtent> getGeographicElements()
      Provides geographic component of the extent of the referring object. The default implementation returns a singleton containing only this geographic bounding box.
      Specified by:
      getGeographicElements in interface org.opengis.metadata.extent.Extent
      Returns:
      the geographic extent, or an empty set if none.
    • getTemporalElements

      public Collection<? extends org.opengis.metadata.extent.TemporalExtent> getTemporalElements()
      Provides temporal component of the extent of the referring object. The default implementation unconditionally returns an empty set.
      Specified by:
      getTemporalElements in interface org.opengis.metadata.extent.Extent
      Returns:
      the temporal extent, or an empty set if none.
    • getVerticalElements

      public Collection<? extends org.opengis.metadata.extent.VerticalExtent> getVerticalElements()
      Provides vertical component of the extent of the referring object. The default implementation unconditionally returns an empty set.
      Specified by:
      getVerticalElements in interface org.opengis.metadata.extent.Extent
      Returns:
      the vertical extent, or an empty set if none.
    • getInclusion

      public Boolean getInclusion()
      Indication of whether the bounding box encompasses an area covered by the data (inclusion) or an area where data is not present (exclusion). The default implementation unconditionally returns Boolean.TRUE.
      Specified by:
      getInclusion in interface org.opengis.metadata.extent.GeographicExtent
      Returns:
      true for inclusion, or false for exclusion.