Package org.meteoinfo.jts.linearref
Class LinearGeometryBuilder
- java.lang.Object
-
- org.meteoinfo.jts.linearref.LinearGeometryBuilder
-
public class LinearGeometryBuilder extends java.lang.ObjectBuilds a linear geometry (LineStringorMultiLineString) incrementally (point-by-point).
-
-
Constructor Summary
Constructors Constructor Description LinearGeometryBuilder(GeometryFactory geomFact)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(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.GeometrygetGeometry()CoordinategetLastCoordinate()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 Detail
-
LinearGeometryBuilder
public LinearGeometryBuilder(GeometryFactory geomFact)
-
-
Method Detail
-
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
public void add(Coordinate pt)
Adds a point to the current line.- Parameters:
pt- the Coordinate to add
-
add
public void add(Coordinate pt, boolean allowRepeatedPoints)
Adds a point to the current line.- Parameters:
pt- the Coordinate to add
-
getLastCoordinate
public Coordinate getLastCoordinate()
-
endLine
public void endLine()
Terminate the current LineString.
-
getGeometry
public Geometry getGeometry()
-
-