Package io.github.sebasbaumh.postgis
Klasse Point
java.lang.Object
io.github.sebasbaumh.postgis.Geometry
io.github.sebasbaumh.postgis.Point
- Alle implementierten Schnittstellen:
Serializable
Point geometry.
- Autor:
- Sebastian Baumhekel
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final int
The OGIS geometry type number for points.Von Klasse geerbte Felder io.github.sebasbaumh.postgis.Geometry
UNKNOWN_SRID
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Do some internal consistency checks on the geometry.boolean
coordsAreEqual
(Point other) copy()
Creates a copy of thisPoint
.double
Calculates the distance to the givenPoint
.boolean
java.lang.Object equals implementationGets the coordinates of thisGeometry
.double
getM()
Gets the measurement.int
Gets the number of coordinates of thisGeometry
.double
getX()
Gets the X-coordinate.double
getY()
Gets the Y-coordinate.double
getZ()
Gets the Z-coordinate.int
hashCode()
boolean
Returns whether we have a measure (4th dimension)boolean
is3d()
Checks if thisGeometry
is 3d.boolean
isEmpty()
Ist thisGeometry
empty, so does it contain no coordinates or other geometries?void
setM
(double m) Sets the measurement.void
setX
(double x) Sets the X-coordinate.void
setY
(double y) Sets the Y-coordinate.void
setZ
(double z) Sets the Z-coordinate.to2d()
Gets thisPoint
as a 2d object.toString()
-
Felddetails
-
TYPE
public static final int TYPEThe OGIS geometry type number for points.- Siehe auch:
-
-
Konstruktordetails
-
Point
public Point()Constructs an empty instance. -
Point
public Point(double x, double y) Constructs a new Point- Parameter:
x
- the longitude / x ordinatey
- the latitude / y ordinate
-
Point
public Point(double x, double y, double z) Constructs a new Point- Parameter:
x
- the longitude / x ordinatey
- the latitude / y ordinatez
- the radius / height / elevation / z ordinate (can beDouble.NaN
for no coordinate)
-
Point
public Point(double x, double y, double z, double m) Constructs a new Point- Parameter:
x
- the longitude / x ordinatey
- the latitude / y ordinatez
- the radius / height / elevation / z ordinate (can beDouble.NaN
for no coordinate)m
- measure (4th dimension)
-
-
Methodendetails
-
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.
-
coordsAreEqual
- Parameter:
other
-Point
- Gibt zurück:
- true on success, else false
-
copy
Creates a copy of thisPoint
.- Gibt zurück:
Point
-
distance
Calculates the distance to the givenPoint
.- Parameter:
p
-Point
- Gibt zurück:
- distance
-
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
-
getM
public double getM()Gets the measurement.- Gibt zurück:
- measurement on success, else
Double.NaN
-
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
-
getX
public double getX()Gets the X-coordinate.- Gibt zurück:
- X-coordinate on success, else
Double.NaN
-
getY
public double getY()Gets the Y-coordinate.- Gibt zurück:
- Y-coordinate on success, else
Double.NaN
-
getZ
public double getZ()Gets the Z-coordinate.- Gibt zurück:
- Z-coordinate on success, else
Double.NaN
-
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()Beschreibung aus Klasse kopiert:Geometry
Ist thisGeometry
empty, so does it contain no coordinates or other geometries? -
setM
public void setM(double m) Sets the measurement.- Parameter:
m
- measurement
-
setX
public void setX(double x) Sets the X-coordinate.- Parameter:
x
- X-coordinate
-
setY
public void setY(double y) Sets the Y-coordinate.- Parameter:
y
- Y-coordinate
-
setZ
public void setZ(double z) Sets the Z-coordinate.- Parameter:
z
- Z-coordinate
-
to2d
Gets thisPoint
as a 2d object.- Gibt zurück:
Point
-
toString
-