Package org.locationtech.jts.linearref
Class LinearGeometryBuilder
java.lang.Object
org.locationtech.jts.linearref.LinearGeometryBuilder
Builds a linear geometry (
LineString
or MultiLineString
)
incrementally (point-by-point).- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CoordinateList
private boolean
private GeometryFactory
private boolean
private Coordinate
private List
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Coordinate pt) Adds a point to the current line.void
add
(Coordinate pt, boolean allowRepeatedPoints) Adds a point to the current line.void
endLine()
Terminate the current LineString.void
setFixInvalidLines
(boolean fixInvalidLines) Allows invalid lines to be ignored rather than causing Exceptions.void
setIgnoreInvalidLines
(boolean ignoreInvalidLines) Allows invalid lines to be ignored rather than causing Exceptions.private Coordinate[]
-
Field Details
-
geomFact
-
lines
-
coordList
-
ignoreInvalidLines
private boolean ignoreInvalidLines -
fixInvalidLines
private boolean fixInvalidLines -
lastPt
-
-
Constructor Details
-
LinearGeometryBuilder
-
-
Method Details
-
setIgnoreInvalidLines
public void setIgnoreInvalidLines(boolean ignoreInvalidLines) Allows invalid lines to be ignored rather than causing Exceptions. An invalid line is one which has only one unique point.- Parameters:
ignoreInvalidLines
-true
if short lines are to be ignored
-
setFixInvalidLines
public void setFixInvalidLines(boolean fixInvalidLines) Allows invalid lines to be ignored rather than causing Exceptions. An invalid line is one which has only one unique point.- Parameters:
fixInvalidLines
-true
if short lines are to be ignored
-
add
Adds a point to the current line.- Parameters:
pt
- the Coordinate to add
-
add
Adds a point to the current line.- Parameters:
pt
- the Coordinate to add
-
getLastCoordinate
-
endLine
public void endLine()Terminate the current LineString. -
validCoordinateSequence
-
getGeometry
-