public class Point extends Geometry
| Modifier and Type | Field and Description |
|---|---|
static boolean |
CUTINTS |
double |
m
The measure of the point.
|
double |
x
The X coordinate of the point.
|
double |
y
The Y coordinate of the point.
|
double |
z
The Z coordinate of the point.
|
ALLTYPES, dimension, GEOMETRYCOLLECTION, haveMeasure, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, POINT, POLYGON, srid, type, UNKNOWN_SRID| Modifier | Constructor and Description |
|---|---|
|
Point() |
|
Point(double x,
double y)
Constructs a new Point
|
|
Point(double x,
double y,
double z)
Constructs a new Point
|
|
Point(String value)
Construct a Point from EWKT
|
protected |
Point(String value,
boolean haveM)
Construct a Point
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkConsistency()
Do some internal consistency checks on the geometry.
|
double |
distance(Point other) |
static boolean |
double_equals(double a,
double b) |
boolean |
equals(Point other) |
protected boolean |
equalsintern(Geometry otherg)
Whether test coordinates for geometry - subclass specific code
Implementors can assume that dimensin, type, srid and haveMeasure are
equal, other !
|
Point |
getFirstPoint()
Optimized versions for this special case
|
Point |
getLastPoint()
Optimized versions for this special case
|
double |
getM() |
Point |
getPoint(int index)
Get the nth Point of the geometry
|
double |
getX() |
double |
getY() |
double |
getZ() |
int |
hashCode()
java.lang.Object hashCode implementation
|
static int |
hashCode(double value) |
void |
innerWKT(StringBuffer sb)
Render the "inner" part of the WKT (inside the brackets) into the
StringBuffer.
|
int |
numPoints()
Return the number of Points of the geometry
|
void |
setM(double m) |
void |
setX(double x) |
void |
setX(int x) |
void |
setY(double y) |
void |
setY(int y) |
void |
setZ(double z) |
void |
setZ(int z) |
equals, equals, getDimension, getSrid, getType, getTypeString, getTypeString, getValue, initSRID, isMeasured, mediumWKT, outerWKT, outerWKT, parseSRID, setSrid, toStringpublic static final boolean CUTINTS
public double x
public double y
public double z
public double m
public Point()
public Point(double x,
double y,
double z)
x - the longitude / x ordinatey - the latitude / y ordinatez - the radius / height / elevation / z ordinatepublic Point(double x,
double y)
x - the longitude / x ordinatey - the latitude / y ordinatepublic Point(String value) throws SQLException
SQLExceptionprotected Point(String value, boolean haveM) throws SQLException
value - The text representation of this pointhaveM - Hint whether we have a measure. This is used by other
geometries parsing inner points where we only get "1 2 3 4"
like strings without the "POINT(" and ")" stuff. If there
acutally is a POINTM prefix, this overrides the given value.
However, POINT does not set it to false, as they can be
contained in measured collections, as in
"GEOMETRYCOLLECTIONM(POINT(0 0 0))".SQLExceptionpublic int hashCode()
Geometrypublic static int hashCode(double value)
protected boolean equalsintern(Geometry otherg)
Geometryequalsintern in class Geometrypublic static boolean double_equals(double a,
double b)
public final boolean equals(Point other)
public Point getPoint(int index)
Geometrypublic Point getFirstPoint()
getFirstPoint in class Geometrypublic Point getLastPoint()
getLastPoint in class Geometrypublic int numPoints()
Geometrypublic void innerWKT(StringBuffer sb)
Geometrypublic double getX()
public double getY()
public double getZ()
public double getM()
public void setX(double x)
public void setY(double y)
public void setZ(double z)
public void setM(double m)
public void setX(int x)
public void setY(int y)
public void setZ(int z)
public double distance(Point other)
public boolean checkConsistency()
GeometrycheckConsistency in class GeometryCopyright © 2014. All rights reserved.