public class LinearGeometryBuilder
extends java.lang.Object
LineString
or MultiLineString
)
incrementally (point-by-point).Constructor | Description |
---|---|
LinearGeometryBuilder(GeometryFactory geomFact) |
Modifier and Type | Method | Description |
---|---|---|
void |
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.
|
Geometry |
getGeometry() |
|
Coordinate |
getLastCoordinate() |
|
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.
|
public LinearGeometryBuilder(GeometryFactory geomFact)
public void setIgnoreInvalidLines(boolean ignoreInvalidLines)
ignoreInvalidLines
- true
if short lines are to be ignoredpublic void setFixInvalidLines(boolean fixInvalidLines)
fixInvalidLines
- true
if short lines are to be ignoredpublic void add(Coordinate pt)
pt
- the Coordinate to addpublic void add(Coordinate pt, boolean allowRepeatedPoints)
pt
- the Coordinate to addpublic Coordinate getLastCoordinate()
public void endLine()
public Geometry getGeometry()
Copyright © 2018. All rights reserved.