GEOS
3.12.0dev

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.  
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.
geos::operation::sharedpaths::SharedPathsOp::SharedPathsOp  (  const geom::Geometry &  g1, 
const geom::Geometry &  g2  
) 
Constructor
g1  First geometry. Must be linear. 
g2  Second geometry. Must be linear. 
void geos::operation::sharedpaths::SharedPathsOp::getSharedPaths  (  PathList &  sameDirection, 
PathList &  oppositeDirection  
) 
Get shared paths
sameDirection  Shared edges having the same direction are pushed onto this vector. They'll be of type geom::LineString. Ownership of the edges is tranferred. 
oppositeDirection  Shared edges having the opposite direction are pushed onto this vector. They'll be of type geom::LineString. Ownership of the edges is tranferred. 

static 
Find paths shared between two linear geometries
g1  First geometry. Must be linear. 
g2  Second geometry. Must be linear. 
sameDirection  Shared edges having the same direction are pushed onto this vector. They'll be of type LineString. Ownership of the edges is tranferred. 
oppositeDirection  Shared edges having the opposite direction are pushed onto this vector. They'll be of type geom::LineString. Ownership of the edges is tranferred. 