GEOS 3.11.1
Public Member Functions | Static Public Member Functions | 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>

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...
 

Detailed Description

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

Member Function Documentation

◆ extract() [1/2]

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().

◆ extract() [2/2]

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

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