Class DefaultGeometry

java.lang.Object
com.kheops.jmap.spatial.DefaultGeometry
All Implemented Interfaces:
Geometry, Serializable, Cloneable
Direct Known Subclasses:
Ellipse, GeometryCollection, LineString, Point, Polygon, Rectangle

public abstract class DefaultGeometry extends Object implements Geometry
See Also:
  • Constructor Details

    • DefaultGeometry

      public DefaultGeometry()
  • Method Details

    • spatiallyEquals

      public boolean spatiallyEquals(Geometry geometry)
      Tests if this geometry is equal to the argument, on a topological point of view
      it means that they represent the same geometry, even if it is described differently (direction of the rings, order of the rings)
      it does not remove additional points on lineString (3 points aligned), one must use smoother.removeExtraPoints() before in order to achieve that.
      Specified by:
      spatiallyEquals in interface Geometry
      Parameters:
      geometry - the geometry to be tested.
      Returns:
      whether both geometries are spatial equals.
    • asText

      public String asText()
      Returns this geometry encoded using the Well-Known Text (WKT) standard.
      Specified by:
      asText in interface Geometry
      Returns:
      a WKT geometry.
    • clone

      public abstract DefaultGeometry clone()
      Clones this geometry.
      Specified by:
      clone in interface Geometry
      Overrides:
      clone in class Object
      Returns:
      a deep copy of the current geometry.