Class LinearGeometryBuilder
java.lang.Object
org.locationtech.jts.linearref.LinearGeometryBuilder
Builds a linear geometry (
LineString or MultiLineString)
incrementally (point-by-point).- Version:
- 1.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Coordinate pt) Adds a point to the current line.voidadd(Coordinate pt, boolean allowRepeatedPoints) Adds a point to the current line.voidendLine()Terminate the current LineString.voidsetFixInvalidLines(boolean fixInvalidLines) Allows invalid lines to be ignored rather than causing Exceptions.voidsetIgnoreInvalidLines(boolean ignoreInvalidLines) Allows invalid lines to be ignored rather than causing Exceptions.
-
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-trueif 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-trueif 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. -
getGeometry
-