public class Point extends Geometry
PointType
.
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.Constructor and Description |
---|
Point(double x,
double y)
Creates a new point.
|
Modifier and Type | Method and Description |
---|---|
static Point |
fromGeoJson(String source)
Creates a point from its JSON 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.
|
double |
Y()
Returns the Y coordinate of this 2D point.
|
asGeoJson, asWellKnownBinary, asWellKnownText, contains, equals, hashCode, toString
public Point(double x, double y)
x
- the X coordinate.y
- the Y coordinate.public static Point fromWellKnownText(String source)
source
- the Well-known Text representation to parse.InvalidTypeException
- if the string does not contain a valid Well-known Text representation.public static Point fromWellKnownBinary(ByteBuffer source)
source
- the Well-known Binary representation to parse.InvalidTypeException
- if the provided ByteBuffer
does not contain a valid Well-known Binary
representation.public static Point fromGeoJson(String source)
source
- the JSON representation to parse.InvalidTypeException
- if the string does not contain a valid JSON representation.public double X()
public double Y()
Copyright © 2012–2018. All rights reserved.