Package io.github.sebasbaumh.postgis
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:
-
Feldübersicht
FelderVon Klasse geerbte Felder io.github.sebasbaumh.postgis.Geometry
UNKNOWN_SRID
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotected
MultiGeometry
(int type) Constructs an instance with the specified type.protected
MultiGeometry
(int type, Iterable<? extends T> geoms) Constructs an instance with the specified type and geometries. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Adds a geometry.void
Adds all given geometries.boolean
Do some internal consistency checks on the geometry.boolean
java.lang.Object equals implementationGets the coordinates of thisGeometry
.Gets all geometries.int
Gets the number of coordinates of thisGeometry
.int
hashCode()
boolean
Returns whether we have a measure (4th dimension)boolean
is3d()
Checks if thisGeometry
is 3d.boolean
isEmpty()
Checks, if there are no sub-geometries.iterator()
void
setSrid
(int srid) Recursively sets the srid on this geometry and all contained subgeometriesint
size()
Gets the number of contained geometries.toString()
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
-
Felddetails
-
subgeoms
Sub geometries.
-
-
Konstruktordetails
-
MultiGeometry
protected MultiGeometry(int type) Constructs an instance with the specified type.- Parameter:
type
- int value corresponding to the geometry type
-
MultiGeometry
Constructs an instance with the specified type and geometries.- Parameter:
type
- int value corresponding to the geometry typegeoms
- geometries
-
-
Methodendetails
-
add
Adds a geometry.- Parameter:
geom
- geometry
-
addAll
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 KlasseGeometry
- Gibt zurück:
- true if all checks are passed.
-
equals
Beschreibung aus Klasse kopiert:Geometry
java.lang.Object equals implementation -
getCoordinates
Beschreibung aus Klasse kopiert:Geometry
Gets the coordinates of thisGeometry
.- Angegeben von:
getCoordinates
in KlasseGeometry
- Gibt zurück:
- coordinates
-
getGeometries
Gets all geometries.- Gibt zurück:
- geometries
-
getNumberOfCoordinates
public int getNumberOfCoordinates()Beschreibung aus Klasse kopiert:Geometry
Gets the number of coordinates of thisGeometry
.- Angegeben von:
getNumberOfCoordinates
in KlasseGeometry
- Gibt zurück:
- number of coordinates
-
hashCode
public int hashCode() -
hasMeasure
public boolean hasMeasure()Beschreibung aus Klasse kopiert:Geometry
Returns whether we have a measure (4th dimension)- Angegeben von:
hasMeasure
in KlasseGeometry
- Gibt zurück:
- true if the geometry has a measure, false otherwise
-
is3d
public boolean is3d()Beschreibung aus Klasse kopiert:Geometry
Checks if thisGeometry
is 3d. -
isEmpty
public boolean isEmpty()Checks, if there are no sub-geometries. -
iterator
-
setSrid
public void setSrid(int srid) Beschreibung aus Klasse kopiert:Geometry
Recursively sets the srid on this geometry and all contained subgeometries -
size
public int size()Gets the number of contained geometries.- Gibt zurück:
- number of contained geometries
-
toString
-