Package org.n52.io.request
Class Vicinity
- java.lang.Object
-
- org.n52.io.request.Vicinity
-
public class Vicinity extends Object
Represents the surrounding area based on a center and a radius. All coordinate calculations are based on a EPSG:4326, lon-lat ordered reference frame.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundingBoxcalculateBounds()BoundingBoxcalculateBounds(CRSUtils crsUtils)Calculates bounding box with the given CRS context.org.locationtech.jts.geom.PointgetCenter()StringgetCrs()doublegetRadius()voidsetCenter(org.locationtech.jts.geom.Point center)voidsetCrs(String crs)voidsetRadius(Number radius)StringtoString()
-
-
-
Constructor Detail
-
Vicinity
Vicinity()
-
Vicinity
public Vicinity(org.locationtech.jts.geom.Point center, Number radius)- Parameters:
center- the center point.radius- the distance around the center
-
-
Method Detail
-
calculateBounds
public BoundingBox calculateBounds()
- Returns:
- calculates bounding box within WGS84 and strict EPSG axes order context.
-
calculateBounds
public BoundingBox calculateBounds(CRSUtils crsUtils)
Calculates bounding box with the given CRS context.- Parameters:
crsUtils- the reference context.- Returns:
- a bounding rectangle.
- Throws:
IllegalStateException- if invalid crs was set.
-
setCrs
public void setCrs(String crs)
- Parameters:
crs- sets the coordinate reference system, e.g. 'EPSG:25832'
-
getCrs
public String getCrs()
-
setRadius
public void setRadius(Number radius)
-
getRadius
public double getRadius()
-
setCenter
public void setCenter(org.locationtech.jts.geom.Point center)
- Parameters:
center- the center coordinates.
-
getCenter
public org.locationtech.jts.geom.Point getCenter()
-
-