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

Computes the LinearLocation for a given length along a linear Geometry. More...

#include <LengthLocationMap.h>

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

Public Member Functions

 LengthLocationMap (const geom::Geometry *linearGeom)
 
LinearLocation getLocation (double length, bool resolveLower) const
 Compute the LinearLocation corresponding to a length. More...
 
LinearLocation getLocation (double length) const
 Compute the LinearLocation corresponding to a length. More...
 
double getLength (const LinearLocation &loc) const
 

Static Public Member Functions

static LinearLocation getLocation (const geom::Geometry *linearGeom, double length)
 Computes the LinearLocation for a given length along a linear Geometry. More...
 
static LinearLocation getLocation (const geom::Geometry *linearGeom, double length, bool resolveLower)
 Computes the LinearLocation for a given length along a linear [Geometry]. More...
 
static double getLength (const geom::Geometry *linearGeom, const LinearLocation &loc)
 

Private Member Functions

LinearLocation getLocationForward (double length) const
 
LinearLocation resolveHigher (const LinearLocation &loc) const
 

Private Attributes

const geom::GeometrylinearGeom
 

Detailed Description

Computes the LinearLocation for a given length along a linear Geometry.

Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped.

Definition at line 38 of file LengthLocationMap.h.

Constructor & Destructor Documentation

geos::linearref::LengthLocationMap::LengthLocationMap ( const geom::Geometry linearGeom)

Referenced by getLocation().

Here is the caller graph for this function:

Member Function Documentation

static double geos::linearref::LengthLocationMap::getLength ( const geom::Geometry linearGeom,
const LinearLocation loc 
)
static

Computes the length for a given LinearLocation on a linear Geometry.

Parameters
linearGeomthe linear geometry to use
locthe LinearLocation index of the location
Returns
the length for the LinearLocation

Referenced by getLocation().

Here is the caller graph for this function:

double geos::linearref::LengthLocationMap::getLength ( const LinearLocation loc) const
static LinearLocation geos::linearref::LengthLocationMap::getLocation ( const geom::Geometry linearGeom,
double  length 
)
inlinestatic

Computes the LinearLocation for a given length along a linear Geometry.

Parameters
linearGeomthe linear geometry to use
lengththe length index of the location
Returns
the LinearLocation for the length

Definition at line 64 of file LengthLocationMap.h.

References getLocation().

Referenced by getLocation().

Here is the call graph for this function:

Here is the caller graph for this function:

static LinearLocation geos::linearref::LengthLocationMap::getLocation ( const geom::Geometry linearGeom,
double  length,
bool  resolveLower 
)
inlinestatic

Computes the LinearLocation for a given length along a linear [Geometry].

Parameters
linearGeomthe linear geometry to use
lengththe length index of the location
resolveLowerif true lengths are resolved to the lowest possible index
Returns
the LinearLocation for the length

Definition at line 82 of file LengthLocationMap.h.

References getLength(), getLocation(), and LengthLocationMap().

Here is the call graph for this function:

LinearLocation geos::linearref::LengthLocationMap::getLocation ( double  length,
bool  resolveLower 
) const

Compute the LinearLocation corresponding to a length.

Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped. Ambiguous indexes are resolved to the lowest possible location value, depending on the value of resolveLower.

Parameters
lengththe length index
resolveLowerif true lengths are resolved to the lowest possible index
Returns
the corresponding LinearLocation
LinearLocation geos::linearref::LengthLocationMap::getLocation ( double  length) const

Compute the LinearLocation corresponding to a length.

Negative lengths are measured in reverse from end of the linear geometry. Out-of-range values are clamped. Ambiguous indexes are resolved to the lowest possible location value.

Parameters
lengththe length index
Returns
the corresponding LinearLocation
LinearLocation geos::linearref::LengthLocationMap::getLocationForward ( double  length) const
private
LinearLocation geos::linearref::LengthLocationMap::resolveHigher ( const LinearLocation loc) const
private

Member Data Documentation

const geom::Geometry* geos::linearref::LengthLocationMap::linearGeom
private

Definition at line 42 of file LengthLocationMap.h.


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