Class BoundingBox

java.lang.Object
org.n52.io.crs.BoundingBox
All Implemented Interfaces:
Serializable

public class BoundingBox extends Object implements Serializable
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    BoundingBox(org.locationtech.jts.geom.Point ll, org.locationtech.jts.geom.Point ur, String srs)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.locationtech.jts.geom.Envelope
     
    boolean
    contains(org.locationtech.jts.geom.Geometry geometry)
    Indicates if the given geometry is contained completely by this instance.
    void
    extendBy(org.locationtech.jts.geom.Point point)
    Extends the bounding box with the given point.
    org.locationtech.jts.geom.Point
     
     
    org.locationtech.jts.geom.Point
     
    void
    setLl(org.locationtech.jts.geom.Point ll)
     
    void
    setUr(org.locationtech.jts.geom.Point ur)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BoundingBox

      public BoundingBox(org.locationtech.jts.geom.Point ll, org.locationtech.jts.geom.Point ur, String srs)
      Parameters:
      ll - the lower left corner
      ur - the upper right corner
      srs - the spatial reference system
  • Method Details

    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object