GEOS  3.13.0dev
Public Types | Public Member Functions | Static Public Member Functions | List of all members
geos::operation::sharedpaths::SharedPathsOp Class Reference

Find shared paths among two linear Geometry objects. More...

#include <SharedPathsOp.h>

Public Types

typedef std::vector< geom::LineString * > PathList
 LineString vector (list of edges)
 

Public Member Functions

 SharedPathsOp (const geom::Geometry &g1, const geom::Geometry &g2)
 
void getSharedPaths (PathList &sameDirection, PathList &oppositeDirection)
 

Static Public Member Functions

static void sharedPathsOp (const geom::Geometry &g1, const geom::Geometry &g2, PathList &sameDirection, PathList &oppositeDirection)
 
static void clearEdges (PathList &from)
 Delete all edges in the list.
 

Detailed Description

Find shared paths among two linear Geometry objects.

For each shared path report if it direction is the same or opposite.

Paths reported as shared are given in the direction they appear in the first geometry.

Remarks
Developed by Sandro Santilli (strk@.nosp@m.kbt..nosp@m.io) for Faunalia (http://www.faunalia.it) with funding from Regione Toscana - Settore SISTEMA INFORMATIVO TERRITORIALE ED AMBIENTALE - for the project: "Sviluppo strumenti software per il trattamento di dati geografici basati su QuantumGIS e Postgis (CIG 0494241492)"

Constructor & Destructor Documentation

◆ SharedPathsOp()

geos::operation::sharedpaths::SharedPathsOp::SharedPathsOp ( const geom::Geometry g1,
const geom::Geometry g2 
)

Constructor

Parameters
g1First geometry. Must be linear.
g2Second geometry. Must be linear.

Member Function Documentation

◆ getSharedPaths()

void geos::operation::sharedpaths::SharedPathsOp::getSharedPaths ( PathList sameDirection,
PathList oppositeDirection 
)

Get shared paths

Parameters
sameDirectionShared edges having the same direction are pushed onto this vector. They'll be of type geom::LineString. Ownership of the edges is tranferred.
oppositeDirectionShared edges having the opposite direction are pushed onto this vector. They'll be of type geom::LineString. Ownership of the edges is tranferred.

◆ sharedPathsOp()

static void geos::operation::sharedpaths::SharedPathsOp::sharedPathsOp ( const geom::Geometry g1,
const geom::Geometry g2,
PathList sameDirection,
PathList oppositeDirection 
)
static

Find paths shared between two linear geometries

Parameters
g1First geometry. Must be linear.
g2Second geometry. Must be linear.
sameDirectionShared edges having the same direction are pushed onto this vector. They'll be of type LineString. Ownership of the edges is tranferred.
oppositeDirectionShared edges having the opposite direction are pushed onto this vector. They'll be of type geom::LineString. Ownership of the edges is tranferred.

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