abstract class Coordinate extends java.lang.Object implements java.io.Serializable
| Constructor and Description |
|---|
Coordinate(double x,
double y)
Construct the point with latitude / longitude values.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
computeHashCode(int init) |
protected double |
distance(Coordinate coor)
Returns the euclidean distance from this
Coordinate to a specified Coordinate. |
double |
distance(double px,
double py)
Returns the euclidean distance from this
Coordinate to a specified coordinate. |
protected double |
distanceSq(Coordinate coor)
Returns the square of the euclidean distance from this
Coordinate to a specified Coordinate. |
double |
distanceSq(double px,
double py)
Returns the square of euclidean distance from this
Coordinate to a specified coordinate. |
boolean |
equals(java.lang.Object obj) |
double |
getX() |
double |
getY() |
int |
hashCode() |
BBox |
toBBox()
Converts to single point BBox.
|
BBox |
toBBox(double r)
Creates bbox around this coordinate.
|
Coordinate(double x, double y)
x - X coordinate of the point.y - Y coordinate of the point.public double getX()
public double getY()
protected final double distance(Coordinate coor)
Coordinate to a specified Coordinate.coor - the specified coordinate to be measured against this CoordinateCoordinate to a specified Coordinatepublic final double distance(double px, double py)
Coordinate to a specified coordinate.px - the X coordinate of the specified point to be measured against this Coordinatepy - the Y coordinate of the specified point to be measured against this CoordinateCoordinate to a specified coordinateprotected final double distanceSq(Coordinate coor)
Coordinate to a specified Coordinate.coor - the specified coordinate to be measured against this CoordinateCoordinate to a specified Coordinatepublic final double distanceSq(double px, double py)
Coordinate to a specified coordinate.px - the X coordinate of the specified point to be measured against this Coordinatepy - the Y coordinate of the specified point to be measured against this CoordinateCoordinate to a specified coordinatepublic BBox toBBox()
public BBox toBBox(double r)
r - sizeprotected final int computeHashCode(int init)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object