Package io.github.sebasbaumh.postgis
Klasse PolygonBase<T extends Curve>
java.lang.Object
io.github.sebasbaumh.postgis.Geometry
io.github.sebasbaumh.postgis.PolygonBase<T>
- Typparameter:
T- type of the ring geometries
- Alle implementierten Schnittstellen:
LineBasedGeometry,Serializable,Iterable<T>
- Bekannte direkte Unterklassen:
CurvePolygon,Polygon
@NonNullByDefault
public abstract class PolygonBase<T extends Curve>
extends Geometry
implements Iterable<T>, LineBasedGeometry
Base class for a polygon to allow similar handling of straight and circular polygons.
- Autor:
- Sebastian Baumhekel
- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder io.github.sebasbaumh.postgis.Geometry
UNKNOWN_SRID -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedPolygonBase(int type, Class<U> clazzRing) Constructor for subclasses.protectedPolygonBase(int type, Class<U> clazzRing, Iterable<V> rings) Constructor for subclasses.protectedPolygonBase(int type, U lsOuterRing) Constructor for subclasses. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidAdds a ring.booleanDo some internal consistency checks on the geometry.voidClears all rings.booleanjava.lang.Object equals implementationGets the coordinates of thisGeometry.Gets the end point.intGets the number of coordinates of thisGeometry.intGets the number of rings.Gets the outer ring/boundary of the polygon.getRings()Gets all inner rings.Gets the start point.inthashCode()booleanReturns whether we have a measure (4th dimension)booleanis3d()Checks if thisGeometryis 3d.booleanChecks if this polygon is oriented in clockwise direction.booleanisClosed()Checks if this line is closed, so the last coordinate is the same as the first coordinate.booleanisEmpty()Ist thisGeometryempty, so does it contain no coordinates or other geometries?iterator()doublelength()Gets the length of this line.voidsetOuterRing(T ls) Sets the outer ring/boundary of the polygon.toString()Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
-
Konstruktordetails
-
PolygonBase
Constructor for subclasses.- Parameter:
type- has to be given by all subclassesclazzRing- class of the ring
-
PolygonBase
Constructor for subclasses.- Parameter:
type- has to be given by all subclassesclazzRing- class of the ringrings- rings
-
PolygonBase
protected PolygonBase(int type, U lsOuterRing) Constructor for subclasses.- Parameter:
type- has to be given by all subclasseslsOuterRing- outer ring
-
-
Methodendetails
-
addRing
Adds a ring.- Parameter:
ring- ring
-
checkConsistency
public boolean checkConsistency()Beschreibung aus Klasse kopiert:GeometryDo 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:
checkConsistencyin KlasseGeometry- Gibt zurück:
- true if all checks are passed.
-
clearRings
public void clearRings()Clears all rings. -
equals
Beschreibung aus Klasse kopiert:Geometryjava.lang.Object equals implementation -
getCoordinates
Beschreibung aus Klasse kopiert:GeometryGets the coordinates of thisGeometry.- Angegeben von:
getCoordinatesin KlasseGeometry- Gibt zurück:
- coordinates
-
getEndPoint
Beschreibung aus Schnittstelle kopiert:LineBasedGeometryGets the end point.- Angegeben von:
getEndPointin SchnittstelleLineBasedGeometry- Gibt zurück:
Pointon success, else null
-
getNumberOfCoordinates
public int getNumberOfCoordinates()Beschreibung aus Klasse kopiert:GeometryGets the number of coordinates of thisGeometry.- Angegeben von:
getNumberOfCoordinatesin KlasseGeometry- Gibt zurück:
- number of coordinates
-
getNumberOfRings
public int getNumberOfRings()Gets the number of rings.- Gibt zurück:
- number of rings.
-
getOuterRing
Gets the outer ring/boundary of the polygon.- Gibt zurück:
- outer ring
-
getRings
Gets all inner rings.- Gibt zurück:
- inner rings
-
getStartPoint
Beschreibung aus Schnittstelle kopiert:LineBasedGeometryGets the start point.- Angegeben von:
getStartPointin SchnittstelleLineBasedGeometry- Gibt zurück:
Pointon success, else null
-
hashCode
public int hashCode() -
hasMeasure
public boolean hasMeasure()Beschreibung aus Klasse kopiert:GeometryReturns whether we have a measure (4th dimension)- Angegeben von:
hasMeasurein KlasseGeometry- Gibt zurück:
- true if the geometry has a measure, false otherwise
-
is3d
public boolean is3d()Beschreibung aus Klasse kopiert:GeometryChecks if thisGeometryis 3d. -
isClockwise
public boolean isClockwise()Checks if this polygon is oriented in clockwise direction. Is false for the outer polygon and true for its holes.- Gibt zurück:
- true on success, else false
-
isClosed
public boolean isClosed()Beschreibung aus Schnittstelle kopiert:LineBasedGeometryChecks if this line is closed, so the last coordinate is the same as the first coordinate.- Angegeben von:
isClosedin SchnittstelleLineBasedGeometry- Gibt zurück:
- true on success, else false
-
isEmpty
public boolean isEmpty()Beschreibung aus Klasse kopiert:GeometryIst thisGeometryempty, so does it contain no coordinates or other geometries? -
iterator
-
length
public double length()Beschreibung aus Schnittstelle kopiert:LineBasedGeometryGets the length of this line.- Angegeben von:
lengthin SchnittstelleLineBasedGeometry- Gibt zurück:
- length
-
setOuterRing
Sets the outer ring/boundary of the polygon.- Parameter:
ls- outer ring
-
toString
-