Package org.locationtech.jts.linearref
Class ExtractLineByLocation
java.lang.Object
org.locationtech.jts.linearref.ExtractLineByLocation
Extracts the subline of a linear
Geometry between
two LinearLocations on the line.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate LineStringcomputeLine(LinearLocation start, LinearLocation end) Assumes input is valid (e.g.private GeometrycomputeLinear(LinearLocation start, LinearLocation end) Assumes input is valid (e.g.static Geometryextract(Geometry line, LinearLocation start, LinearLocation end) Computes the subline of aLineStringbetween twoLinearLocations on the line.extract(LinearLocation start, LinearLocation end) Extracts a subline of the input.private Geometry
-
Field Details
-
line
-
-
Constructor Details
-
ExtractLineByLocation
-
-
Method Details
-
extract
Computes the subline of aLineStringbetween twoLinearLocations on the line. If the start location is after the end location, the computed linear geometry has reverse orientation to the input line.- Parameters:
line- the line to use as the baselinestart- the start locationend- the end location- Returns:
- the extracted subline
-
extract
Extracts a subline of the input. Ifend invalid input: '<' startthe linear geometry computed will be reversed.- Parameters:
start- the start locationend- the end location- Returns:
- a linear geometry
-
reverse
-
computeLine
Assumes input is valid (e.g. start invalid input: '<'= end)- Parameters:
start-end-- Returns:
- a linear geometry
-
computeLinear
Assumes input is valid (e.g. start invalid input: '<'= end)- Parameters:
start-end-- Returns:
- a linear geometry
-