Package org.n52.io.request
Class Vicinity
java.lang.Object
org.n52.io.request.Vicinity
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateBounds(CRSUtils crsUtils) Calculates bounding box with the given CRS context.org.locationtech.jts.geom.PointgetCrs()doublevoidsetCenter(org.locationtech.jts.geom.Point center) voidvoidtoString()
-
Constructor Details
-
Vicinity
Vicinity() -
Vicinity
- Parameters:
center- the center point.radius- the distance around the center
-
-
Method Details
-
calculateBounds
- Returns:
- calculates bounding box within WGS84 and strict EPSG axes order context.
-
calculateBounds
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
- Parameters:
crs- sets the coordinate reference system, e.g. 'EPSG:25832'
-
getCrs
-
setRadius
-
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() -
toString
-