Class GeographicEnvelope
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.geometry.AbstractEnvelope
org.apache.sis.internal.storage.xml.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()
- Since:
- 0.8
- Version:
- 0.8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.referencing.crs.CoordinateReferenceSystem
Returns the coordinate reference system, ornull
if unknown.org.opengis.util.InternationalString
Returns the spatial and temporal extent for the referring object.int
Returns the number of dimensions, which is assumed to be 2.Collection
<? extends org.opengis.metadata.extent.GeographicExtent> Provides geographic component of the extent of the referring object.Indication of whether the bounding box encompasses an area covered by the data (inclusion) or an area where data is not present (exclusion).double
getLower
(int dimension) Returns the south or west envelope bound.Collection
<? extends org.opengis.metadata.extent.TemporalExtent> Provides temporal component of the extent of the referring object.double
getUpper
(int dimension) Returns the north or east envelope bound.Collection
<? extends org.opengis.metadata.extent.VerticalExtent> Provides vertical component of the extent of the referring object.Methods inherited from class org.apache.sis.geometry.AbstractEnvelope
castOrCopy, contains, contains, contains, equals, equals, formatTo, getLowerCorner, getMaximum, getMedian, getMedian, getMinimum, getSpan, getSpan, getTimeRange, getUpperCorner, hashCode, intersects, intersects, isAllNaN, isEmpty, toSimpleEnvelopes, toString
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.metadata.extent.GeographicBoundingBox
getEastBoundLongitude, getNorthBoundLatitude, getSouthBoundLatitude, getWestBoundLongitude
-
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 bygetCoordinateReferenceSystem().getCoordinateSystem().getDimension()
.- Specified by:
getDimension
in interfaceorg.opengis.geometry.Envelope
- Returns:
- the number of dimensions in this envelope.
-
getCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()Returns the coordinate reference system, ornull
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 interfaceorg.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 classAbstractEnvelope
- 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 classAbstractEnvelope
- 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 returnsnull
.- Specified by:
getDescription
in interfaceorg.opengis.metadata.extent.Extent
- Returns:
- the spatial and temporal extent, or
null
in none.
-
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 interfaceorg.opengis.metadata.extent.Extent
- Returns:
- the geographic extent, or an empty set if none.
-
getTemporalElements
Provides temporal component of the extent of the referring object. The default implementation unconditionally returns an empty set.- Specified by:
getTemporalElements
in interfaceorg.opengis.metadata.extent.Extent
- Returns:
- the temporal extent, or an empty set if none.
-
getVerticalElements
Provides vertical component of the extent of the referring object. The default implementation unconditionally returns an empty set.- Specified by:
getVerticalElements
in interfaceorg.opengis.metadata.extent.Extent
- Returns:
- the vertical extent, or an empty set if none.
-
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 returnsBoolean.TRUE
.- Specified by:
getInclusion
in interfaceorg.opengis.metadata.extent.GeographicExtent
- Returns:
true
for inclusion, orfalse
for exclusion.
-