Package org.n52.io.crs
Class BoundingBox
- java.lang.Object
-
- org.n52.io.crs.BoundingBox
-
- All Implemented Interfaces:
Serializable
public class BoundingBox extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BoundingBox(org.locationtech.jts.geom.Point ll, org.locationtech.jts.geom.Point ur, String srs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.geom.EnvelopeasEnvelop()booleancontains(org.locationtech.jts.geom.Geometry geometry)Indicates if the given geometry is contained completely by this instance.voidextendBy(org.locationtech.jts.geom.Point point)Extends the bounding box with the given point.org.locationtech.jts.geom.PointgetLowerLeft()StringgetSrs()org.locationtech.jts.geom.PointgetUpperRight()voidsetLl(org.locationtech.jts.geom.Point ll)voidsetUr(org.locationtech.jts.geom.Point ur)StringtoString()
-
-
-
Constructor Detail
-
BoundingBox
public BoundingBox(org.locationtech.jts.geom.Point ll, org.locationtech.jts.geom.Point ur, String srs)- Parameters:
ll- the lower left cornerur- the upper right cornersrs- the spatial reference system
-
-
Method Detail
-
contains
public boolean contains(org.locationtech.jts.geom.Geometry geometry)
Indicates if the given geometry is contained completely by this instance. The point's coordinates are assumed to be in the same coordinate reference system.- Parameters:
geometry- the geometry to check- Returns:
- if this instance completely contains the given geometry
-
asEnvelop
public org.locationtech.jts.geom.Envelope asEnvelop()
-
extendBy
public void extendBy(org.locationtech.jts.geom.Point point)
Extends the bounding box with the given point. If point is contained by this instance nothing is changed.- Parameters:
point- the point in CRS:84 which shall extend the bounding box.
-
setLl
public void setLl(org.locationtech.jts.geom.Point ll)
-
setUr
public void setUr(org.locationtech.jts.geom.Point ur)
-
getLowerLeft
public org.locationtech.jts.geom.Point getLowerLeft()
- Returns:
- the lower left corner coordinate.
-
getUpperRight
public org.locationtech.jts.geom.Point getUpperRight()
- Returns:
- the upper right corner coordinate.
-
getSrs
public String getSrs()
- Returns:
- the system this instance is referenced in.
-
-