Class DefaultEnvelope

java.lang.Object
org.gvsig.fmap.geom.jts.primitive.DefaultEnvelope
All Implemented Interfaces:
Cloneable, org.gvsig.fmap.geom.primitive.Envelope, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent
Direct Known Subclasses:
Envelope2D, Envelope3D

public abstract class DefaultEnvelope extends Object implements org.gvsig.fmap.geom.primitive.Envelope, org.gvsig.tools.lang.Cloneable
A minimum bounding box or rectangle. Regardless of dimension, an Envelope can be represented without ambiguity as two direct positions (coordinate points). To encode an Envelope, it is sufficient to encode these two points. This is consistent with all of the data types in this specification, their state is represented by their publicly accessible attributes.
Author:
Vicente Caballero Navarro
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected static final String
     
    protected static org.gvsig.fmap.geom.GeometryManager
     
    protected org.gvsig.fmap.geom.primitive.Point
     
    protected org.gvsig.fmap.geom.primitive.Point
     
    static final String
     
    protected org.gvsig.crs.projection.lib.Projection
     
    protected static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    DefaultEnvelope(org.gvsig.crs.projection.lib.Projection projection)
     
    DefaultEnvelope(org.gvsig.fmap.geom.primitive.Point min, org.gvsig.fmap.geom.primitive.Point max, org.gvsig.crs.projection.lib.Projection projection)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(org.gvsig.fmap.geom.Geometry geometry)
     
    void
    centerTo(org.gvsig.fmap.geom.primitive.Point p)
     
    void
     
     
    boolean
    contains(org.gvsig.fmap.geom.primitive.Envelope envelope)
     
    boolean
    equals(Object other)
     
    org.gvsig.fmap.geom.Geometry
     
    double
    getCenter(int dimension)
    Returns the center ordinate along the specified dimension.
    org.gvsig.fmap.geom.Geometry
     
    double
    getLength(int dimension)
    Returns the envelope length along the specified dimension.
    org.gvsig.fmap.geom.primitive.Point
    A coordinate position consisting of all the minimal ordinates for each dimension for all points within the Envelope.
    double
    getMaximum(int dimension)
    Returns the maximal ordinate along the specified dimension.
    double
    getMinimum(int dimension)
    Returns the minimal ordinate along the specified dimension.
    org.gvsig.crs.projection.lib.Projection
     
    org.gvsig.fmap.geom.primitive.Point
    A coordinate position consisting of all the maximal ordinates for each dimension for all points within the Envelope.
    boolean
     
    boolean
     
    boolean
    intersects(org.gvsig.fmap.geom.Geometry geometry)
     
    boolean
    intersects(org.gvsig.fmap.geom.primitive.Envelope envelope)
     
    boolean
     
    boolean
    isCollapsed(int subtype)
     
    boolean
     
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
     
    static void
     
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    setLowerCorner(org.gvsig.fmap.geom.primitive.Point lowerCorner)
     
    void
    setProjection(org.gvsig.crs.projection.lib.Projection projection)
     
    void
    setProjectionIffNull(org.gvsig.crs.projection.lib.Projection projection)
     
    void
    setUpperCorner(org.gvsig.fmap.geom.primitive.Point upperCorner)
     
     

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.gvsig.fmap.geom.primitive.Envelope

    add, convert, getDimension
  • Field Details

    • PERSISTENCE_DEFINITION_NAME

      public static final String PERSISTENCE_DEFINITION_NAME
      See Also:
    • LOWERCORNER_FIELD

      protected static final String LOWERCORNER_FIELD
      See Also:
    • UPPERCORNER_FIELD

      protected static final String UPPERCORNER_FIELD
      See Also:
    • min

      protected org.gvsig.fmap.geom.primitive.Point min
    • max

      protected org.gvsig.fmap.geom.primitive.Point max
    • isEmpty

      protected boolean isEmpty
    • projection

      protected org.gvsig.crs.projection.lib.Projection projection
    • manager

      protected static org.gvsig.fmap.geom.GeometryManager manager
  • Constructor Details

    • DefaultEnvelope

      public DefaultEnvelope()
    • DefaultEnvelope

      public DefaultEnvelope(org.gvsig.crs.projection.lib.Projection projection)
    • DefaultEnvelope

      public DefaultEnvelope(org.gvsig.fmap.geom.primitive.Point min, org.gvsig.fmap.geom.primitive.Point max, org.gvsig.crs.projection.lib.Projection projection)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getCenter

      public double getCenter(int dimension)
      Returns the center ordinate along the specified dimension.
      Specified by:
      getCenter in interface org.gvsig.fmap.geom.primitive.Envelope
      Parameters:
      dimension - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getLength

      public double getLength(int dimension)
      Returns the envelope length along the specified dimension.
      Specified by:
      getLength in interface org.gvsig.fmap.geom.primitive.Envelope
      Parameters:
      dimension -
      Returns:
    • getLowerCorner

      public org.gvsig.fmap.geom.primitive.Point getLowerCorner()
      A coordinate position consisting of all the minimal ordinates for each dimension for all points within the Envelope.
      Specified by:
      getLowerCorner in interface org.gvsig.fmap.geom.primitive.Envelope
      Returns:
    • getMaximum

      public double getMaximum(int dimension)
      Returns the maximal ordinate along the specified dimension.
      Specified by:
      getMaximum in interface org.gvsig.fmap.geom.primitive.Envelope
      Parameters:
      dimension -
      Returns:
    • getMinimum

      public double getMinimum(int dimension)
      Returns the minimal ordinate along the specified dimension.
      Specified by:
      getMinimum in interface org.gvsig.fmap.geom.primitive.Envelope
      Parameters:
      dimension -
      Returns:
    • getUpperCorner

      public org.gvsig.fmap.geom.primitive.Point getUpperCorner()
      A coordinate position consisting of all the maximal ordinates for each dimension for all points within the Envelope.
      Specified by:
      getUpperCorner in interface org.gvsig.fmap.geom.primitive.Envelope
      Returns:
    • getGeometry

      public org.gvsig.fmap.geom.Geometry getGeometry()
      Specified by:
      getGeometry in interface org.gvsig.fmap.geom.primitive.Envelope
    • getBox2D

      public org.gvsig.fmap.geom.Geometry getBox2D()
      Specified by:
      getBox2D in interface org.gvsig.fmap.geom.primitive.Envelope
    • contains

      public boolean contains(org.gvsig.fmap.geom.primitive.Envelope envelope)
      Specified by:
      contains in interface org.gvsig.fmap.geom.primitive.Envelope
    • intersects

      public boolean intersects(org.gvsig.fmap.geom.primitive.Envelope envelope)
      Specified by:
      intersects in interface org.gvsig.fmap.geom.primitive.Envelope
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • setLowerCorner

      public void setLowerCorner(org.gvsig.fmap.geom.primitive.Point lowerCorner)
      Specified by:
      setLowerCorner in interface org.gvsig.fmap.geom.primitive.Envelope
    • setUpperCorner

      public void setUpperCorner(org.gvsig.fmap.geom.primitive.Point upperCorner)
      Specified by:
      setUpperCorner in interface org.gvsig.fmap.geom.primitive.Envelope
    • registerPersistent

      public static void registerPersistent()
    • loadFromState

      public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      loadFromState in interface org.gvsig.tools.persistence.Persistent
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • saveToState

      public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      saveToState in interface org.gvsig.tools.persistence.Persistent
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • clone

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.gvsig.fmap.geom.primitive.Envelope
    • add

      public void add(org.gvsig.fmap.geom.Geometry geometry)
      Specified by:
      add in interface org.gvsig.fmap.geom.primitive.Envelope
    • clear

      public void clear()
      Specified by:
      clear in interface org.gvsig.fmap.geom.primitive.Envelope
    • intersects

      public boolean intersects(org.gvsig.fmap.geom.Geometry geometry)
      Specified by:
      intersects in interface org.gvsig.fmap.geom.primitive.Envelope
    • centerTo

      public void centerTo(org.gvsig.fmap.geom.primitive.Point p)
      Specified by:
      centerTo in interface org.gvsig.fmap.geom.primitive.Envelope
    • getProjection

      public org.gvsig.crs.projection.lib.Projection getProjection()
      Specified by:
      getProjection in interface org.gvsig.fmap.geom.primitive.Envelope
    • setProjectionIffNull

      public void setProjectionIffNull(org.gvsig.crs.projection.lib.Projection projection)
      Specified by:
      setProjectionIffNull in interface org.gvsig.fmap.geom.primitive.Envelope
    • setProjection

      public void setProjection(org.gvsig.crs.projection.lib.Projection projection)
      Specified by:
      setProjection in interface org.gvsig.fmap.geom.primitive.Envelope
    • isCollapsed

      public boolean isCollapsed()
      Specified by:
      isCollapsed in interface org.gvsig.fmap.geom.primitive.Envelope
    • isCollapsed

      public boolean isCollapsed(int subtype)
      Specified by:
      isCollapsed in interface org.gvsig.fmap.geom.primitive.Envelope
    • hasZ

      public boolean hasZ()
      Specified by:
      hasZ in interface org.gvsig.fmap.geom.primitive.Envelope
    • hasM

      public boolean hasM()
      Specified by:
      hasM in interface org.gvsig.fmap.geom.primitive.Envelope