public interface Point extends Geometry
Point.
This is a zero-dimensional object that represents a specific (X,Y) location in a two-dimensional XY-plane. In case of Geographic Coordinate Systems, the X coordinate is the longitude and the Y is the latitude.
The default implementation returned by the driver is immutable.
| Modifier and Type | Method and Description |
|---|---|
static Point |
fromCoordinates(double x,
double y)
Creates a new point.
|
static Point |
fromGeoJson(String source)
Creates a point from a GeoJSON
Point representation.
|
static Point |
fromWellKnownBinary(ByteBuffer source)
Creates a point from its Well-known Binary
(WKB) representation.
|
static Point |
fromWellKnownText(String source)
Creates a point from its Well-known
Text (WKT) representation.
|
double |
X()
Returns the X coordinate of this 2D point (or its longitude in Geographic Coordinate Systems).
|
double |
Y()
Returns the Y coordinate of this 2D point (or its latitude in Geographic Coordinate Systems).
|
asGeoJson, asWellKnownBinary, asWellKnownText, contains@NonNull static Point fromWellKnownText(@NonNull String source)
source - the Well-known Text representation to parse.IllegalArgumentException - if the string does not contain a valid Well-known Text
representation.@NonNull static Point fromWellKnownBinary(@NonNull ByteBuffer source)
source - the Well-known Binary representation to parse.IllegalArgumentException - if the provided ByteBuffer does not contain a valid
Well-known Binary representation.@NonNull static Point fromGeoJson(@NonNull String source)
source - the GeoJSON Point
representation to parse.IllegalArgumentException - if the string does not contain a valid GeoJSON Point representation.@NonNull static Point fromCoordinates(double x, double y)
x - The X coordinate of this point (or its longitude in Geographic Coordinate Systems).y - The Y coordinate of this point (or its latitude in Geographic Coordinate Systems).double X()
double Y()
Copyright © 2017–2020. All rights reserved.