GEOS 3.11.1
|
Builds a linear geometry (LineString or MultiLineString) incrementally (point-by-point). More...
#include <LinearGeometryBuilder.h>
Public Member Functions | |
LinearGeometryBuilder (const geom::GeometryFactory *geomFact) | |
void | setIgnoreInvalidLines (bool ignoreInvalidLines) |
Allows invalid lines to be ignored rather than causing Exceptions. More... | |
void | setFixInvalidLines (bool fixInvalidLines) |
Allows invalid lines to be ignored rather than causing Exceptions. More... | |
void | add (const geom::Coordinate &pt) |
Adds a point to the current line. More... | |
void | add (const geom::Coordinate &pt, bool allowRepeatedPoints) |
Adds a point to the current line. More... | |
geom::Coordinate | getLastCoordinate () const |
void | endLine () |
Terminate the current LineString. | |
geom::Geometry * | getGeometry () |
Builds a linear geometry (LineString or MultiLineString) incrementally (point-by-point).
void geos::linearref::LinearGeometryBuilder::add | ( | const geom::Coordinate & | pt | ) |
Adds a point to the current line.
pt | the Coordinate to add |
void geos::linearref::LinearGeometryBuilder::add | ( | const geom::Coordinate & | pt, |
bool | allowRepeatedPoints | ||
) |
Adds a point to the current line.
pt | the Coordinate to add |
allowRepeatedPoints | if set to false , repeated coordinates are collapsed |
void geos::linearref::LinearGeometryBuilder::setFixInvalidLines | ( | bool | fixInvalidLines | ) |
Allows invalid lines to be ignored rather than causing Exceptions.
An invalid line is one which has only one unique point.
fixInvalidLines | true if short lines are to be ignored |
void geos::linearref::LinearGeometryBuilder::setIgnoreInvalidLines | ( | bool | ignoreInvalidLines | ) |
Allows invalid lines to be ignored rather than causing Exceptions.
An invalid line is one which has only one unique point.
ignoreInvalidLines | true if short lines are to be ignored |