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.CoordinateReferenceSystemReturns the coordinate reference system, ornullif unknown.org.opengis.util.InternationalStringReturns the spatial and temporal extent for the referring object.intReturns 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).doublegetLower(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.doublegetUpper(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, toStringMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getDimensionin 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, ornullif unknown. The default implementation returns a two-dimensional WGS84 coordinate reference system with (latitude, longitude) axis order, as defined by EPSG:4326.- Specified by:
getCoordinateReferenceSystemin 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:
getLowerin 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:
getUpperin 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:
getDescriptionin interfaceorg.opengis.metadata.extent.Extent- Returns:
- the spatial and temporal extent, or
nullin 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:
getGeographicElementsin 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:
getTemporalElementsin 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:
getVerticalElementsin 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:
getInclusionin interfaceorg.opengis.metadata.extent.GeographicExtent- Returns:
truefor inclusion, orfalsefor exclusion.
-