GEOS 3.14.0dev
Public Member Functions | List of all members
geos::linearref::LinearGeometryBuilder Class Reference

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.
 
void setFixInvalidLines (bool fixInvalidLines)
 Allows invalid lines to be ignored rather than causing Exceptions.
 
void add (const geom::Coordinate &pt)
 Adds a point to the current line.
 
void add (const geom::Coordinate &pt, bool allowRepeatedPoints)
 Adds a point to the current line.
 
geom::Coordinate getLastCoordinate () const
 
void endLine ()
 Terminate the current LineString.
 
std::unique_ptr< geom::GeometrygetGeometry ()
 

Detailed Description

Builds a linear geometry (LineString or MultiLineString) incrementally (point-by-point).

Version
1.7

Member Function Documentation

◆ add() [1/2]

void geos::linearref::LinearGeometryBuilder::add ( const geom::Coordinate pt)

Adds a point to the current line.

Parameters
ptthe Coordinate to add

◆ add() [2/2]

void geos::linearref::LinearGeometryBuilder::add ( const geom::Coordinate pt,
bool  allowRepeatedPoints 
)

Adds a point to the current line.

Parameters
ptthe Coordinate to add
allowRepeatedPointsif set to false, repeated coordinates are collapsed

◆ setFixInvalidLines()

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.

Parameters
fixInvalidLinestrue if short lines are to be ignored

◆ setIgnoreInvalidLines()

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.

Parameters
ignoreInvalidLinestrue if short lines are to be ignored

The documentation for this class was generated from the following file: