Klasse MultiGeometry<T extends Geometry>

java.lang.Object
io.github.sebasbaumh.postgis.Geometry
io.github.sebasbaumh.postgis.MultiGeometry<T>
Typparameter:
T - Geometry type
Alle implementierten Schnittstellen:
Serializable, Iterable<T>
Bekannte direkte Unterklassen:
GeometryCollection, MultiCurve, MultiLineString, MultiPoint, MultiPolygon, MultiSurface

@NonNullByDefault public abstract class MultiGeometry<T extends Geometry> extends Geometry implements Iterable<T>
Base class for multi geometries.
Autor:
Sebastian Baumhekel
Siehe auch:
  • Felddetails

  • Konstruktordetails

    • MultiGeometry

      protected MultiGeometry(int type)
      Constructs an instance with the specified type.
      Parameter:
      type - int value corresponding to the geometry type
    • MultiGeometry

      protected MultiGeometry(int type, Iterable<? extends T> geoms)
      Constructs an instance with the specified type and geometries.
      Parameter:
      type - int value corresponding to the geometry type
      geoms - geometries
  • Methodendetails

    • add

      public void add(T geom)
      Adds a geometry.
      Parameter:
      geom - geometry
    • addAll

      public void addAll(Iterable<? extends T> geoms)
      Adds all given geometries.
      Parameter:
      geoms - geometries
    • checkConsistency

      public boolean checkConsistency()
      Beschreibung aus Klasse kopiert: Geometry
      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.
      Setzt außer Kraft:
      checkConsistency in Klasse Geometry
      Gibt zurück:
      true if all checks are passed.
    • equals

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

      public Iterable<Point> getCoordinates()
      Beschreibung aus Klasse kopiert: Geometry
      Gets the coordinates of this Geometry.
      Angegeben von:
      getCoordinates in Klasse Geometry
      Gibt zurück:
      coordinates
    • getGeometries

      public Collection<T> getGeometries()
      Gets all geometries.
      Gibt zurück:
      geometries
    • getNumberOfCoordinates

      public int getNumberOfCoordinates()
      Beschreibung aus Klasse kopiert: Geometry
      Gets the number of coordinates of this Geometry.
      Angegeben von:
      getNumberOfCoordinates in Klasse Geometry
      Gibt zurück:
      number of coordinates
    • hashCode

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

      public boolean hasMeasure()
      Beschreibung aus Klasse kopiert: Geometry
      Returns whether we have a measure (4th dimension)
      Angegeben von:
      hasMeasure in Klasse Geometry
      Gibt zurück:
      true if the geometry has a measure, false otherwise
    • is3d

      public boolean is3d()
      Beschreibung aus Klasse kopiert: Geometry
      Checks if this Geometry is 3d.
      Angegeben von:
      is3d in Klasse Geometry
      Gibt zurück:
      true on success, else false
    • isEmpty

      public boolean isEmpty()
      Checks, if there are no sub-geometries.
      Angegeben von:
      isEmpty in Klasse Geometry
      Gibt zurück:
      true on success, else false
    • iterator

      public Iterator<T> iterator()
      Angegeben von:
      iterator in Schnittstelle Iterable<T extends Geometry>
    • setSrid

      public void setSrid(int srid)
      Beschreibung aus Klasse kopiert: Geometry
      Recursively sets the srid on this geometry and all contained subgeometries
      Setzt außer Kraft:
      setSrid in Klasse Geometry
      Parameter:
      srid - the SRID for this geometry
    • size

      public int size()
      Gets the number of contained geometries.
      Gibt zurück:
      number of contained geometries
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object