public final class CoordinateUtils extends Object
Coordinates.| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains2D(org.locationtech.jts.geom.Coordinate[] coords,
org.locationtech.jts.geom.Coordinate coord)
Checks if a coordinate array contains a specific coordinate.
|
static double |
interpolate(org.locationtech.jts.geom.Coordinate firstCoordinate,
org.locationtech.jts.geom.Coordinate lastCoordinate,
org.locationtech.jts.geom.Coordinate toBeInterpolated)
Interpolates a z value (linearly) between the two coordinates.
|
static org.locationtech.jts.geom.Coordinate[] |
removeDuplicatedCoordinates(org.locationtech.jts.geom.Coordinate[] coords,
boolean closeRing)
Remove dupliacted coordinates
Note : This method doesn't preserve the topology of geometry
|
static org.locationtech.jts.geom.Coordinate[] |
removeRepeatedCoordinates(org.locationtech.jts.geom.Coordinate[] coords,
double tolerance,
boolean duplicateFirstLast)
Remove repeated coordinates according a given tolerance
|
static org.locationtech.jts.geom.Coordinate |
vectorIntersection(org.locationtech.jts.geom.Coordinate p1,
org.locationtech.jts.math.Vector3D v1,
org.locationtech.jts.geom.Coordinate p2,
org.locationtech.jts.math.Vector3D v2)
Compute intersection point of two vectors
|
static double[] |
zMinMax(org.locationtech.jts.geom.Coordinate[] cs)
Determine the min and max "z" values in an array of Coordinates.
|
public static double[] zMinMax(org.locationtech.jts.geom.Coordinate[] cs)
cs - The array to search.public static double interpolate(org.locationtech.jts.geom.Coordinate firstCoordinate,
org.locationtech.jts.geom.Coordinate lastCoordinate,
org.locationtech.jts.geom.Coordinate toBeInterpolated)
firstCoordinate - lastCoordinate - toBeInterpolated - public static boolean contains2D(org.locationtech.jts.geom.Coordinate[] coords,
org.locationtech.jts.geom.Coordinate coord)
coords - coord - public static org.locationtech.jts.geom.Coordinate vectorIntersection(org.locationtech.jts.geom.Coordinate p1,
org.locationtech.jts.math.Vector3D v1,
org.locationtech.jts.geom.Coordinate p2,
org.locationtech.jts.math.Vector3D v2)
p1 - Origin pointv1 - Direction from p1p2 - Origin point 2v2 - Direction of p2public static org.locationtech.jts.geom.Coordinate[] removeDuplicatedCoordinates(org.locationtech.jts.geom.Coordinate[] coords,
boolean closeRing)
coords - the input coordinatescloseRing - is true the first coordinate is added at the end to close the arraypublic static org.locationtech.jts.geom.Coordinate[] removeRepeatedCoordinates(org.locationtech.jts.geom.Coordinate[] coords,
double tolerance,
boolean duplicateFirstLast)
coords - the input coordinatestolerance - to delete the coordinatesduplicateFirstLast - false to delete the last coordinate
if there are equalsCopyright © 2019 CNRS. All rights reserved.