Package org.locationtech.jts.linearref
Class ExtractLineByLocation
java.lang.Object
org.locationtech.jts.linearref.ExtractLineByLocation
Extracts the subline of a linear
Geometry
between
two LinearLocation
s on the line.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate LineString
computeLine
(LinearLocation start, LinearLocation end) Assumes input is valid (e.g.private Geometry
computeLinear
(LinearLocation start, LinearLocation end) Assumes input is valid (e.g.static Geometry
extract
(Geometry line, LinearLocation start, LinearLocation end) Computes the subline of aLineString
between twoLinearLocation
s 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 aLineString
between twoLinearLocation
s 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: '<' start
the 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
-