public class CoordinatesUtil extends Object
| Constructor and Description |
|---|
CoordinatesUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Point |
average(Point c1,
Point c2) |
static Point |
circumcentre(double x1,
double y1,
double x2,
double y2,
double x3,
double y3) |
static int |
compare(double x1,
double y1,
double x2,
double y2) |
static int |
compareToOrigin(Point point1,
Object other) |
static int |
compareToOrigin(Point point1,
Point point2) |
static boolean |
contains(Iterable<? extends Point> points,
Point point) |
static double |
distance3d(Point point1,
Point point2)
Computes the 3-dimensional Euclidean distance to another location.
|
static boolean |
equals(double x1,
double y1,
double x2,
double y2) |
static Point |
get2d(Geometry geometry) |
static int |
getAxisCount(Point... points) |
static double |
getElevation(LineString line,
Point coordinate) |
static double |
getElevation(Point coordinate,
Point c0,
Point c1) |
static Point |
getPrecise(double scale,
Point point) |
static boolean |
isAcute(Point point1,
Point point2,
Point point3) |
static int |
octant(double dx,
double dy)
Methods for computing and working with octants of the Cartesian plane
Octants are numbered as follows:
|
static int |
octant(Point p0,
Point p1)
Returns the octant of a directed line segment from p0 to p1.
|
static Point |
offset(Point coordinate,
double angle,
double distance) |
static int |
orientationIndex(Point p1,
Point p2,
Point q) |
static HCoordinate |
perpendicularBisector(double x1,
double y1,
double x2,
double y2) |
static Point |
pointNotInList(Iterable<? extends Point> points1,
Iterable<? extends Point> points2)
Return the first point of points1 not in points2
|
static Point |
setElevation(Point newLocation,
Point originalLocation) |
static float[] |
toFloatArray(LineString points,
int axisCount) |
static Point |
translate(Point point,
Double angle,
double length) |
public static Point circumcentre(double x1, double y1, double x2, double y2, double x3, double y3)
public static int compare(double x1,
double y1,
double x2,
double y2)
public static double distance3d(Point point1, Point point2)
c - a coordinatepublic static boolean equals(double x1,
double y1,
double x2,
double y2)
public static int getAxisCount(Point... points)
public static double getElevation(LineString line, Point coordinate)
public static int octant(double dx,
double dy)
\2|1/ 3 \|/ 0 ---+-- 4 /|\ 7 /5|6\If line segments lie along a coordinate axis, the octant is the lower of the two possible values. Returns the octant of a directed line segment (specified as x and y displacements, which cannot both be 0).
public static int octant(Point p0, Point p1)
public static HCoordinate perpendicularBisector(double x1, double y1, double x2, double y2)
public static Point pointNotInList(Iterable<? extends Point> points1, Iterable<? extends Point> points2)
points1 - points2 - public static float[] toFloatArray(LineString points, int axisCount)
Copyright © 2015 Revolution Systems Inc.. All rights reserved.