GEOS  3.9.1dev
Public Member Functions | Private Types | Private Attributes | List of all members
geos::linearref::LinearGeometryBuilder Class Reference

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

#include <LinearGeometryBuilder.h>

Collaboration diagram for geos::linearref::LinearGeometryBuilder:
[legend]

Public Member Functions

 LinearGeometryBuilder (const geom::GeometryFactory *geomFact)
 
 ~LinearGeometryBuilder ()
 
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. More...
 
geom::GeometrygetGeometry ()
 

Private Types

typedef std::vector< const geom::Geometry * > GeomPtrVect
 

Private Attributes

const geom::GeometryFactorygeomFact
 
GeomPtrVect lines
 
bool ignoreInvalidLines
 
bool fixInvalidLines
 
geom::CoordinateArraySequencecoordList
 
geom::Coordinate lastPt
 

Detailed Description

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

Version
1.7

Definition at line 40 of file LinearGeometryBuilder.h.

Member Typedef Documentation

Definition at line 44 of file LinearGeometryBuilder.h.

Constructor & Destructor Documentation

geos::linearref::LinearGeometryBuilder::LinearGeometryBuilder ( const geom::GeometryFactory geomFact)
geos::linearref::LinearGeometryBuilder::~LinearGeometryBuilder ( )

Member Function Documentation

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

Adds a point to the current line.

Parameters
ptthe Coordinate to add
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
void geos::linearref::LinearGeometryBuilder::endLine ( )

Terminate the current LineString.

geom::Geometry* geos::linearref::LinearGeometryBuilder::getGeometry ( )
geom::Coordinate geos::linearref::LinearGeometryBuilder::getLastCoordinate ( ) const
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
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

Member Data Documentation

geom::CoordinateArraySequence* geos::linearref::LinearGeometryBuilder::coordList
private

Definition at line 51 of file LinearGeometryBuilder.h.

bool geos::linearref::LinearGeometryBuilder::fixInvalidLines
private

Definition at line 50 of file LinearGeometryBuilder.h.

const geom::GeometryFactory* geos::linearref::LinearGeometryBuilder::geomFact
private

Definition at line 42 of file LinearGeometryBuilder.h.

bool geos::linearref::LinearGeometryBuilder::ignoreInvalidLines
private

Definition at line 49 of file LinearGeometryBuilder.h.

geom::Coordinate geos::linearref::LinearGeometryBuilder::lastPt
private

Definition at line 53 of file LinearGeometryBuilder.h.

GeomPtrVect geos::linearref::LinearGeometryBuilder::lines
private

Definition at line 47 of file LinearGeometryBuilder.h.


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