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.
  • Constructor Details

    • 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 Details

    • 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()
    • toString

      public String toString()
      Overrides:
      toString in class Object