public class CoordUtil
extends java.lang.Object
Constructor and Description |
---|
CoordUtil() |
Modifier and Type | Method and Description |
---|---|
static com.vividsolutions.jts.geom.Coordinate |
add(com.vividsolutions.jts.geom.Coordinate c1,
com.vividsolutions.jts.geom.Coordinate c2)
Adds two coordinates.
|
static java.awt.geom.Point2D |
add(java.awt.geom.Point2D a,
java.awt.geom.Point2D b) |
static com.vividsolutions.jts.geom.Coordinate |
average(java.util.Collection coordinates) |
static com.vividsolutions.jts.geom.Coordinate |
average(com.vividsolutions.jts.geom.Coordinate c1,
com.vividsolutions.jts.geom.Coordinate c2)
Returns the average of two Coordinates.
|
static com.vividsolutions.jts.geom.Coordinate |
closest(java.util.Collection coordinates,
com.vividsolutions.jts.geom.Coordinate p) |
static com.vividsolutions.jts.geom.Coordinate |
divide(com.vividsolutions.jts.geom.Coordinate c,
double d)
Divides a coordinate by a scalar.
|
static com.vividsolutions.jts.geom.Coordinate |
multiply(double d,
com.vividsolutions.jts.geom.Coordinate c)
Multiplies a scalar and a coordinate.
|
static com.vividsolutions.jts.geom.Coordinate |
subtract(com.vividsolutions.jts.geom.Coordinate c1,
com.vividsolutions.jts.geom.Coordinate c2)
Subtracts two coordinates.
|
static java.awt.geom.Point2D |
subtract(java.awt.geom.Point2D a,
java.awt.geom.Point2D b) |
static com.vividsolutions.jts.geom.Coordinate |
toCoordinate(java.awt.geom.Point2D point) |
static java.awt.geom.Point2D |
toPoint2D(com.vividsolutions.jts.geom.Coordinate coordinate) |
public static com.vividsolutions.jts.geom.Coordinate average(com.vividsolutions.jts.geom.Coordinate c1, com.vividsolutions.jts.geom.Coordinate c2)
c1
- one coordinatec2
- another coordinatepublic static com.vividsolutions.jts.geom.Coordinate average(java.util.Collection coordinates)
coordinates
- not emptypublic static com.vividsolutions.jts.geom.Coordinate closest(java.util.Collection coordinates, com.vividsolutions.jts.geom.Coordinate p)
coordinates
- not emptypublic static com.vividsolutions.jts.geom.Coordinate add(com.vividsolutions.jts.geom.Coordinate c1, com.vividsolutions.jts.geom.Coordinate c2)
c1
- the first coordinatec2
- the second coordinatepublic static com.vividsolutions.jts.geom.Coordinate subtract(com.vividsolutions.jts.geom.Coordinate c1, com.vividsolutions.jts.geom.Coordinate c2)
c1
- the first coordinatec2
- the second coordinatepublic static com.vividsolutions.jts.geom.Coordinate multiply(double d, com.vividsolutions.jts.geom.Coordinate c)
d
- the scalarc
- the coordinatepublic static com.vividsolutions.jts.geom.Coordinate divide(com.vividsolutions.jts.geom.Coordinate c, double d)
c
- the coordinated
- the scalar *public static com.vividsolutions.jts.geom.Coordinate toCoordinate(java.awt.geom.Point2D point)
public static java.awt.geom.Point2D toPoint2D(com.vividsolutions.jts.geom.Coordinate coordinate)
public static java.awt.geom.Point2D add(java.awt.geom.Point2D a, java.awt.geom.Point2D b)
public static java.awt.geom.Point2D subtract(java.awt.geom.Point2D a, java.awt.geom.Point2D b)