public final class LineStringUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
COORDINATE_DISTANCE |
static String |
COORDINATE_INDEX |
static String |
SEGMENT_DISTANCE |
static String |
SEGMENT_INDEX |
| Constructor and Description |
|---|
LineStringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static LineString |
addElevation(LineString original,
LineString update) |
static void |
addLineString(GeometryFactory geometryFactory,
LineString points,
Point startPoint,
int startIndex,
int endIndex,
Point endPoint,
List<LineString> lines) |
static double |
distance(double aX1,
double aY1,
double aX2,
double aY2,
double bX1,
double bY1,
double bX2,
double bY2) |
static double |
distance(double x,
double y,
Geometry geometry,
double tolerance) |
static double |
distance(double x,
double y,
LineString line,
double tolerance) |
static double |
distance(LineString line1,
LineString line2,
double terminateDistance) |
static double |
distance(Point point,
Geometry geometry,
double tolerance) |
static double |
distance(Point point,
LineString line) |
static double |
distance(Point point,
LineString line,
double tolerance) |
static double |
distance(Point point,
LineString line,
int index,
double maxDistance) |
static double |
distanceFromStart(LineString line,
Point point) |
static boolean |
equalsIgnoreDirection(LineString line1,
LineString line2,
int dimension)
Compare the coordinates of the two lines up to the given dimension to see
if they have the same ordinate values in either the forward or reverse
direction.
|
static boolean |
equalsIgnoreDirection2d(LineString line1,
LineString line2)
Compare the 2D coordinates of the two lines to see if they have the same
ordinate values in either the forward or reverse direction.
|
static Map<GeometryComponent,Double> |
findClosestGeometryComponent(LineString line,
Point point) |
static Map<String,Number> |
findClosestSegmentAndCoordinate(LineString line,
Point point) |
static Point |
getClosestCoordinateOnLineString(GeometryFactory precisionModel,
LineString line,
Point point,
double tolerance) |
static Point |
getClosestEndsCoordinates(LineString line,
Point coordinates) |
static Point |
getCrossingIntersection(LineString line1,
LineString line2)
Get the coordinate where two lines cross, or null if they don't cross.
|
static double |
getElevation(Point point,
Point point1,
Point point2) |
static Point |
getEndPoint(LineString line,
boolean fromPoint) |
static Collection<LineString> |
getMergedLines(MultiLineString multiLineString) |
static LineString |
getMergeLine(MultiLineString multiLineString) |
static boolean |
hasEndPoint(LineString line,
Point point) |
static boolean |
hasEqualExact2d(List<LineString> lines,
LineString newLine) |
static boolean |
hasLoop(Collection<LineString> lines) |
static boolean |
intersects(LineString line1,
LineString line2) |
static boolean |
isEndsWithinDistance(LineString line1,
LineString line2,
double maxDistance) |
static boolean |
isEndsWithinDistance(LineString line,
Point point,
double maxDistance) |
static boolean |
isEndsWithinDistanceOfEnds(LineString line1,
LineString line2,
double maxDistance) |
static boolean |
isPointOnLine(LineString line,
Point point)
Check to see if the point is on any of the segments of the line.
|
static boolean |
isPointOnLine(LineString line,
Point point,
double maxDistance)
Check to see if the point is on any of the segments of the line.
|
static boolean |
isWithinDistance(Point point,
LineString line,
int index,
double maxDistance) |
static boolean |
isWithinDistanceOfEnds(Point point,
LineString line,
double maxDistance) |
static LineString |
merge(List<LineString> lines) |
static Point |
midPoint(LineString line) |
static List<LineString> |
split(GeometryFactory geometryFactory,
LineString line,
LineSegmentIndex index,
double tolerance) |
static List<LineString> |
split(LineString line,
int segmentIndex,
Point point) |
public static final String COORDINATE_DISTANCE
public static final String COORDINATE_INDEX
public static final String SEGMENT_DISTANCE
public static final String SEGMENT_INDEX
public static LineString addElevation(LineString original, LineString update)
public static void addLineString(GeometryFactory geometryFactory, LineString points, Point startPoint, int startIndex, int endIndex, Point endPoint, List<LineString> lines)
public static double distance(double aX1,
double aY1,
double aX2,
double aY2,
double bX1,
double bY1,
double bX2,
double bY2)
public static double distance(double x,
double y,
Geometry geometry,
double tolerance)
public static double distance(double x,
double y,
LineString line,
double tolerance)
public static double distance(LineString line1, LineString line2, double terminateDistance)
public static double distance(Point point, LineString line)
public static double distance(Point point, LineString line, double tolerance)
public static double distance(Point point, LineString line, int index, double maxDistance)
public static double distanceFromStart(LineString line, Point point)
public static boolean equalsIgnoreDirection(LineString line1, LineString line2, int dimension)
line1 - The first line.line2 - The second line.dimension - The dimension.public static boolean equalsIgnoreDirection2d(LineString line1, LineString line2)
line1 - The first line.line2 - The second line.public static Map<GeometryComponent,Double> findClosestGeometryComponent(LineString line, Point point)
public static Map<String,Number> findClosestSegmentAndCoordinate(LineString line, Point point)
public static Point getClosestCoordinateOnLineString(GeometryFactory precisionModel, LineString line, Point point, double tolerance)
public static Point getClosestEndsCoordinates(LineString line, Point coordinates)
public static Point getCrossingIntersection(LineString line1, LineString line2)
line1 - The first line.line2 - The second linepublic static Point getEndPoint(LineString line, boolean fromPoint)
public static Collection<LineString> getMergedLines(MultiLineString multiLineString)
public static LineString getMergeLine(MultiLineString multiLineString)
public static boolean hasEndPoint(LineString line, Point point)
public static boolean hasEqualExact2d(List<LineString> lines, LineString newLine)
public static boolean hasLoop(Collection<LineString> lines)
public static boolean intersects(LineString line1, LineString line2)
public static boolean isEndsWithinDistance(LineString line1, LineString line2, double maxDistance)
public static boolean isEndsWithinDistance(LineString line, Point point, double maxDistance)
public static boolean isEndsWithinDistanceOfEnds(LineString line1, LineString line2, double maxDistance)
public static boolean isPointOnLine(LineString line, Point point)
line - The line.point - The point.LineSegmentUtil#isPointOnLine(GeometryFactory, Coordinates,
Coordinates, Point)public static boolean isPointOnLine(LineString line, Point point, double maxDistance)
line - The line.point - The point.maxDistance - The maximum distance the point can be from the line.LineSegmentUtil#isPointOnLine(Coordinates, Coordinates, Coordinates,
double)public static boolean isWithinDistance(Point point, LineString line, int index, double maxDistance)
public static boolean isWithinDistanceOfEnds(Point point, LineString line, double maxDistance)
public static LineString merge(List<LineString> lines)
public static Point midPoint(LineString line)
public static List<LineString> split(GeometryFactory geometryFactory, LineString line, LineSegmentIndex index, double tolerance)
public static List<LineString> split(LineString line, int segmentIndex, Point point)
Copyright © 2015 Revolution Systems Inc.. All rights reserved.