Package uk.ac.rdg.resc.edal.domain
Class SimpleHorizontalDomain
- java.lang.Object
-
- uk.ac.rdg.resc.edal.domain.SimpleHorizontalDomain
-
- All Implemented Interfaces:
Serializable
,Domain<HorizontalPosition>
,HorizontalDomain
public class SimpleHorizontalDomain extends Object implements HorizontalDomain, Serializable
A simple implementation of aHorizontalDomain
- Author:
- Guy Griffiths
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleHorizontalDomain(double minLon, double minLat, double maxLon, double maxLat)
Create aHorizontalDomain
based on a WGS84 bounding boxSimpleHorizontalDomain(double minX, double minY, double maxX, double maxY, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Create aHorizontalDomain
SimpleHorizontalDomain(BoundingBox bbox)
Create aHorizontalDomain
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(HorizontalPosition position)
boolean
equals(Object obj)
BoundingBox
getBoundingBox()
Returns the bounding box of the domain in the domain's own coordinate reference system.org.opengis.referencing.crs.CoordinateReferenceSystem
getCoordinateReferenceSystem()
Returns the co-ordinate reference system of this domainorg.opengis.metadata.extent.GeographicBoundingBox
getGeographicBoundingBox()
Returns the bounding box of the domain in WGS84 latitude-longitude coordinates.int
hashCode()
-
-
-
Constructor Detail
-
SimpleHorizontalDomain
public SimpleHorizontalDomain(double minLon, double minLat, double maxLon, double maxLat)
Create aHorizontalDomain
based on a WGS84 bounding box- Parameters:
minLon
- The minimum longitudeminLat
- The minimum latitudemaxLon
- The maximum longitudemaxLat
- The maximum latitude
-
SimpleHorizontalDomain
public SimpleHorizontalDomain(double minX, double minY, double maxX, double maxY, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Create aHorizontalDomain
- Parameters:
minX
- The minimum x valueminY
- The minimum y valuemaxX
- The maximum x valuemaxY
- The maximum y valuecrs
- TheCoordinateReferenceSystem
of the domain
-
SimpleHorizontalDomain
public SimpleHorizontalDomain(BoundingBox bbox)
Create aHorizontalDomain
- Parameters:
bbox
- TheBoundingBox
of this domain
-
-
Method Detail
-
contains
public boolean contains(HorizontalPosition position)
- Specified by:
contains
in interfaceDomain<HorizontalPosition>
- Returns:
- true if the given position is contained within this domain.
-
getBoundingBox
public BoundingBox getBoundingBox()
Description copied from interface:HorizontalDomain
Returns the bounding box of the domain in the domain's own coordinate reference system. For domains which do not have a native co-ordinate reference system this may return aBoundingBox
in a different CRS. Consequently thisBoundingBox
is not guaranteed to be a tight bound around the domain.- Specified by:
getBoundingBox
in interfaceHorizontalDomain
-
getGeographicBoundingBox
public org.opengis.metadata.extent.GeographicBoundingBox getGeographicBoundingBox()
Description copied from interface:HorizontalDomain
Returns the bounding box of the domain in WGS84 latitude-longitude coordinates.- Specified by:
getGeographicBoundingBox
in interfaceHorizontalDomain
-
getCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
Description copied from interface:HorizontalDomain
Returns the co-ordinate reference system of this domain- Specified by:
getCoordinateReferenceSystem
in interfaceHorizontalDomain
-
-