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

Extracts the subline of a linear Geometry between two LinearLocations on the line. More...

#include <ExtractLineByLocation.h>

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

Public Member Functions

 ExtractLineByLocation (const geom::Geometry *line)
 
std::unique_ptr< geom::Geometryextract (const LinearLocation &start, const LinearLocation &end)
 Extracts a subline of the input. More...
 

Static Public Member Functions

static std::unique_ptr< geom::Geometryextract (const geom::Geometry *line, const LinearLocation &start, const LinearLocation &end)
 Computes the subline of a LineString between two LinearLocations on the line. More...
 

Private Member Functions

std::unique_ptr< geom::Geometryreverse (const geom::Geometry *linear)
 
std::unique_ptr< geom::LineStringcomputeLine (const LinearLocation &start, const LinearLocation &end)
 
std::unique_ptr< geom::GeometrycomputeLinear (const LinearLocation &start, const LinearLocation &end)
 

Private Attributes

const geom::Geometryline
 

Detailed Description

Extracts the subline of a linear Geometry between two LinearLocations on the line.

Definition at line 34 of file ExtractLineByLocation.h.

Constructor & Destructor Documentation

geos::linearref::ExtractLineByLocation::ExtractLineByLocation ( const geom::Geometry line)

Member Function Documentation

std::unique_ptr<geom::LineString> geos::linearref::ExtractLineByLocation::computeLine ( const LinearLocation start,
const LinearLocation end 
)
private

Assumes input is valid (e.g. start <= end)

Parameters
start
end
Returns
a linear geometry
std::unique_ptr<geom::Geometry> geos::linearref::ExtractLineByLocation::computeLinear ( const LinearLocation start,
const LinearLocation end 
)
private

Assumes input is valid (e.g. start <= end)

Parameters
start
end
Returns
a linear geometry
static std::unique_ptr<geom::Geometry> geos::linearref::ExtractLineByLocation::extract ( const geom::Geometry line,
const LinearLocation start,
const LinearLocation end 
)
static

Computes the subline of a LineString between two LinearLocations on the line.

If the start location is after the end location, the computed geometry is reversed.

Parameters
linethe line to use as the baseline
startthe start location
endthe end location
Returns
the extracted subline

Referenced by geos::linearref::LocationIndexedLine::extractLine().

Here is the caller graph for this function:

std::unique_ptr<geom::Geometry> geos::linearref::ExtractLineByLocation::extract ( const LinearLocation start,
const LinearLocation end 
)

Extracts a subline of the input.

If end < start the linear geometry computed will be reversed.

Parameters
startthe start location
endthe end location
Returns
a linear geometry
std::unique_ptr<geom::Geometry> geos::linearref::ExtractLineByLocation::reverse ( const geom::Geometry linear)
private

Member Data Documentation

const geom::Geometry* geos::linearref::ExtractLineByLocation::line
private

Definition at line 37 of file ExtractLineByLocation.h.


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