Package io.github.sebasbaumh.postgis
Klasse LineString
java.lang.Object
io.github.sebasbaumh.postgis.Geometry
io.github.sebasbaumh.postgis.Curve
io.github.sebasbaumh.postgis.LineString
- Alle implementierten Schnittstellen:
LineBasedGeometry,Serializable,Iterable<Point>
- Bekannte direkte Unterklassen:
CircularString,LinearRing
Linestring.
- Autor:
- Sebastian Baumhekel
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final intThe OGIS geometry type number for lines.Von Klasse geerbte Felder io.github.sebasbaumh.postgis.Geometry
UNKNOWN_SRID -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungConstructs an instance.protectedLineString(int type) Constructor for subclasses.protectedLineString(int type, Iterable<Point> points) Constructor for subclasses.LineString(Iterable<Point> points) Constructs an instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidAdds the given point.final voidAdds all given points.booleanDo some internal consistency checks on the geometry.voidclose()Closes thisLineStringif the last coordinate is not already the same as the first coordinate.booleanjava.lang.Object equals implementationGets the coordinates of thisGeometry.Gets the end point.intGets the number of coordinates of thisGeometry.Gets the start point.inthashCode()booleanReturns whether we have a measure (4th dimension)booleanis3d()Checks if thisGeometryis 3d.booleanisEmpty()Ist thisGeometryempty, so does it contain no coordinates or other geometries?iterator()doublelength()Gets the length of this line.voidreverse()Reverses this linestring.Von Klasse geerbte Methoden io.github.sebasbaumh.postgis.Curve
isClockwise, isClosed, toStringVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
-
Felddetails
-
TYPE
public static final int TYPEThe OGIS geometry type number for lines.- Siehe auch:
-
-
Konstruktordetails
-
LineString
public LineString()Constructs an instance. -
LineString
protected LineString(int type) Constructor for subclasses.- Parameter:
type- has to be given by all subclasses.
-
LineString
Constructor for subclasses.- Parameter:
type- has to be given by all subclasses.points-Points
-
LineString
Constructs an instance.- Parameter:
points- points
-
-
Methodendetails
-
add
Adds the given point.- Parameter:
p- point
-
addAll
Adds all given points.- Parameter:
geoms- points
-
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.
-
close
public void close()Closes thisLineStringif the last coordinate is not already the same as the first coordinate. -
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
-
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. -
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
-
reverse
public void reverse()Reverses this linestring.
-