Klasse Geometry

java.lang.Object
io.github.sebasbaumh.postgis.Geometry
Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
Curve, MultiGeometry, Point, PolygonBase

@NonNullByDefault public abstract class Geometry extends Object implements Serializable
The base class of all geometries
Siehe auch:
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final int
    Official UNKNOWN srid value
  • Konstruktorübersicht

    Konstruktoren
    Modifizierer
    Konstruktor
    Beschreibung
    protected
    Geometry(int type)
    Constructor for subclasses.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
    Do some internal consistency checks on the geometry.
    boolean
    java.lang.Object equals implementation
    abstract Iterable<Point>
    Gets the coordinates of this Geometry.
    abstract int
    Gets the number of coordinates of this Geometry.
    int
    The OGIS geometry type number of this geometry.
    int
    Gets the OGIS geometry type number of this geometry.
    int
     
    abstract boolean
    Returns whether we have a measure (4th dimension)
    abstract boolean
    Checks if this Geometry is 3d.
    abstract boolean
    Ist this Geometry empty, so does it contain no coordinates or other geometries?
    void
    setSrid(int srid)
    Recursively sets the srid on this geometry and all contained subgeometries

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • UNKNOWN_SRID

      public static final int UNKNOWN_SRID
      Official UNKNOWN srid value
      Siehe auch:
  • Konstruktordetails

    • Geometry

      protected Geometry(int type)
      Constructor for subclasses.
      Parameter:
      type - has to be given by all subclasses
  • Methodendetails

    • checkConsistency

      public boolean checkConsistency()
      Do some internal consistency checks on the geometry. Currently, all Geometries must have a valid dimension (2 or 3) and a valid type. Composed geometries must have all equal SRID, dimensionality and measures, as well as that they do not contain NULL or inconsistent subgeometries. BinaryParser and WKTParser should only generate consistent geometries. BinaryWriter may produce invalid results on inconsistent geometries.
      Gibt zurück:
      true if all checks are passed.
    • equals

      public boolean equals(@Nullable Object obj)
      java.lang.Object equals implementation
      Setzt außer Kraft:
      equals in Klasse Object
      Parameter:
      obj - geometry to compare
      Gibt zurück:
      true if equal, false otherwise
    • getCoordinates

      public abstract Iterable<Point> getCoordinates()
      Gets the coordinates of this Geometry.
      Gibt zurück:
      coordinates
    • getNumberOfCoordinates

      public abstract int getNumberOfCoordinates()
      Gets the number of coordinates of this Geometry.
      Gibt zurück:
      number of coordinates
    • getSrid

      public int getSrid()
      The OGIS geometry type number of this geometry.
      Gibt zurück:
      the SRID of this geometry
    • getType

      public int getType()
      Gets the OGIS geometry type number of this geometry.
      Gibt zurück:
      type of this geometry
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • hasMeasure

      public abstract boolean hasMeasure()
      Returns whether we have a measure (4th dimension)
      Gibt zurück:
      true if the geometry has a measure, false otherwise
    • is3d

      public abstract boolean is3d()
      Checks if this Geometry is 3d.
      Gibt zurück:
      true on success, else false
    • isEmpty

      public abstract boolean isEmpty()
      Ist this Geometry empty, so does it contain no coordinates or other geometries?
      Gibt zurück:
      true on success, else false
    • setSrid

      public void setSrid(int srid)
      Recursively sets the srid on this geometry and all contained subgeometries
      Parameter:
      srid - the SRID for this geometry