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 aHorizontalDomainbased on a WGS84 bounding boxSimpleHorizontalDomain(double minX, double minY, double maxX, double maxY, org.opengis.referencing.crs.CoordinateReferenceSystem crs)Create aHorizontalDomainSimpleHorizontalDomain(BoundingBox bbox)Create aHorizontalDomain
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(HorizontalPosition position)booleanequals(Object obj)BoundingBoxgetBoundingBox()Returns the bounding box of the domain in the domain's own coordinate reference system.org.opengis.referencing.crs.CoordinateReferenceSystemgetCoordinateReferenceSystem()Returns the co-ordinate reference system of this domainorg.opengis.metadata.extent.GeographicBoundingBoxgetGeographicBoundingBox()Returns the bounding box of the domain in WGS84 latitude-longitude coordinates.inthashCode()
-
-
-
Constructor Detail
-
SimpleHorizontalDomain
public SimpleHorizontalDomain(double minLon, double minLat, double maxLon, double maxLat)Create aHorizontalDomainbased 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- TheCoordinateReferenceSystemof the domain
-
SimpleHorizontalDomain
public SimpleHorizontalDomain(BoundingBox bbox)
Create aHorizontalDomain- Parameters:
bbox- TheBoundingBoxof this domain
-
-
Method Detail
-
contains
public boolean contains(HorizontalPosition position)
- Specified by:
containsin interfaceDomain<HorizontalPosition>- Returns:
- true if the given position is contained within this domain.
-
getBoundingBox
public BoundingBox getBoundingBox()
Description copied from interface:HorizontalDomainReturns 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 aBoundingBoxin a different CRS. Consequently thisBoundingBoxis not guaranteed to be a tight bound around the domain.- Specified by:
getBoundingBoxin interfaceHorizontalDomain
-
getGeographicBoundingBox
public org.opengis.metadata.extent.GeographicBoundingBox getGeographicBoundingBox()
Description copied from interface:HorizontalDomainReturns the bounding box of the domain in WGS84 latitude-longitude coordinates.- Specified by:
getGeographicBoundingBoxin interfaceHorizontalDomain
-
getCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
Description copied from interface:HorizontalDomainReturns the co-ordinate reference system of this domain- Specified by:
getCoordinateReferenceSystemin interfaceHorizontalDomain
-
-