GEOS  3.9.1dev
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
geos::operation::overlayng::OverlayLabel Class Reference

#include <OverlayLabel.h>

Public Types

enum  {
  DIM_UNKNOWN = -1, DIM_NOT_PART = -1, DIM_LINE = 1, DIM_BOUNDARY = 2,
  DIM_COLLAPSE = 3
}
 

Public Member Functions

 OverlayLabel ()
 
 OverlayLabel (int p_index)
 
 OverlayLabel (int p_index, Location p_locLeft, Location p_locRight, bool p_isHole)
 
int dimension (int index) const
 
void initBoundary (int index, Location locLeft, Location locRight, bool p_isHole)
 
void initCollapse (int index, bool p_isHole)
 
void initLine (int index)
 
void initNotPart (int index)
 
void setLocationLine (int index, Location loc)
 
void setLocationAll (int index, Location loc)
 
void setLocationCollapse (int index)
 
bool isLine () const
 
bool isLine (int index) const
 
bool isLinear (int index) const
 
bool isKnown (int index) const
 
bool isNotPart (int index) const
 
bool isBoundaryEither () const
 
bool isBoundaryBoth () const
 
bool isBoundaryCollapse () const
 
bool isBoundaryTouch () const
 
bool isBoundary (int index) const
 
bool isLineLocationUnknown (int index) const
 
bool isBoundarySingleton () const
 
bool isLineInArea (int index) const
 
bool isHole (int index) const
 
bool isCollapse (int index) const
 
Location getLineLocation (int index) const
 
bool isInteriorCollapse () const
 
bool isCollapseAndNotPartInterior () const
 
bool isLineInterior (int index) const
 
Location getLocationBoundaryOrLine (int index, int position, bool isForward) const
 
Location getLocation (int index) const
 
Location getLocation (int index, int position, bool isForward) const
 
bool hasSides (int index) const
 
OverlayLabel copy () const
 
void toString (bool isForward, std::ostream &os) const
 

Static Public Attributes

static constexpr Location LOC_UNKNOWN = Location::NONE
 

Private Member Functions

std::string dimensionSymbol (int dim) const
 
void locationString (int index, bool isForward, std::ostream &os) const
 

Private Attributes

int aDim = DIM_NOT_PART
 
bool aIsHole = false
 
Location aLocLeft = LOC_UNKNOWN
 
Location aLocRight = LOC_UNKNOWN
 
Location aLocLine = LOC_UNKNOWN
 
int bDim = DIM_NOT_PART
 
bool bIsHole = false
 
Location bLocLeft = LOC_UNKNOWN
 
Location bLocRight = LOC_UNKNOWN
 
Location bLocLine = LOC_UNKNOWN
 

Friends

std::ostream & operator<< (std::ostream &os, const OverlayLabel &ol)
 

Detailed Description

A label for a pair of OverlayEdges which records the topological information for the edge in the OverlayGraph containing it. The label is shared between both OverlayEdges of a symmetric pair. Accessors for orientation-sensitive information require the orientation of the containing OverlayEdge.

A label contains the topological geom::Locations for the two overlay input geometries. A labelled input geometry may be either a Line or an Area. In both cases, the label locations are populated with the locations for the edge geom::Positions once they are computed by topological evaluation. The label also records the dimension of each geometry, and in the case of area boundary edges, the role of the originating ring (which allows determination of the edge role in collapse cases).

For each input geometry, the label indicates that an edge is in one of the following states (identified by the "dim" field). Each state has some additional information about the edge.

Note that:

Author
Martin Davis

Definition at line 90 of file OverlayLabel.h.

Member Enumeration Documentation

anonymous enum
Enumerator
DIM_UNKNOWN 
DIM_NOT_PART 
DIM_LINE 
DIM_BOUNDARY 
DIM_COLLAPSE 

Definition at line 115 of file OverlayLabel.h.

Constructor & Destructor Documentation

geos::operation::overlayng::OverlayLabel::OverlayLabel ( )
inline

Definition at line 123 of file OverlayLabel.h.

geos::operation::overlayng::OverlayLabel::OverlayLabel ( int  p_index)
inline

Definition at line 135 of file OverlayLabel.h.

geos::operation::overlayng::OverlayLabel::OverlayLabel ( int  p_index,
Location  p_locLeft,
Location  p_locRight,
bool  p_isHole 
)
inline

Definition at line 141 of file OverlayLabel.h.

Member Function Documentation

OverlayLabel geos::operation::overlayng::OverlayLabel::copy ( ) const
int geos::operation::overlayng::OverlayLabel::dimension ( int  index) const
inline

Definition at line 147 of file OverlayLabel.h.

References geos::algorithm::operator<<().

Here is the call graph for this function:

std::string geos::operation::overlayng::OverlayLabel::dimensionSymbol ( int  dim) const
private
Location geos::operation::overlayng::OverlayLabel::getLineLocation ( int  index) const
Location geos::operation::overlayng::OverlayLabel::getLocation ( int  index) const

Gets the linear location for the given source.

Parameters
indexthe source index
Returns
the linear location for the source
Location geos::operation::overlayng::OverlayLabel::getLocation ( int  index,
int  position,
bool  isForward 
) const
Location geos::operation::overlayng::OverlayLabel::getLocationBoundaryOrLine ( int  index,
int  position,
bool  isForward 
) const

Gets the location for this label for either a Boundary or a Line edge. This supports a simple determination of whether the edge should be included as a result edge.

Parameters
indexthe source index
positionthe position for a boundary label
isForwardthe direction for a boundary label
Returns
the location for the specified position
bool geos::operation::overlayng::OverlayLabel::hasSides ( int  index) const
void geos::operation::overlayng::OverlayLabel::initBoundary ( int  index,
Location  locLeft,
Location  locRight,
bool  p_isHole 
)
void geos::operation::overlayng::OverlayLabel::initCollapse ( int  index,
bool  p_isHole 
)
void geos::operation::overlayng::OverlayLabel::initLine ( int  index)
void geos::operation::overlayng::OverlayLabel::initNotPart ( int  index)
bool geos::operation::overlayng::OverlayLabel::isBoundary ( int  index) const
bool geos::operation::overlayng::OverlayLabel::isBoundaryBoth ( ) const
bool geos::operation::overlayng::OverlayLabel::isBoundaryCollapse ( ) const

Tests if the label is for a collapsed edge of an area which is coincident with the boundary of the other area.

Returns
true if the label is for a collapse coincident with a boundary
bool geos::operation::overlayng::OverlayLabel::isBoundaryEither ( ) const
bool geos::operation::overlayng::OverlayLabel::isBoundarySingleton ( ) const

Tests whether a label is for an edge which is a boundary of one geometry and not part of the other.

bool geos::operation::overlayng::OverlayLabel::isBoundaryTouch ( ) const

Tests if a label is for an edge where two area touch along their boundary.

bool geos::operation::overlayng::OverlayLabel::isCollapse ( int  index) const
bool geos::operation::overlayng::OverlayLabel::isCollapseAndNotPartInterior ( ) const

Tests if a label is a Collapse and NotPart with location INTERIOR for the other geometry.

bool geos::operation::overlayng::OverlayLabel::isHole ( int  index) const
bool geos::operation::overlayng::OverlayLabel::isInteriorCollapse ( ) const

Tests if a label is a Collapse has location INTERIOR, to at least one source geometry.

bool geos::operation::overlayng::OverlayLabel::isKnown ( int  index) const
bool geos::operation::overlayng::OverlayLabel::isLine ( ) const
bool geos::operation::overlayng::OverlayLabel::isLine ( int  index) const
bool geos::operation::overlayng::OverlayLabel::isLinear ( int  index) const
bool geos::operation::overlayng::OverlayLabel::isLineInArea ( int  index) const

Tests if a line edge is inside

Parameters
index
Returns
bool geos::operation::overlayng::OverlayLabel::isLineInterior ( int  index) const

Tests if a line is in the interior of a source geometry.

Parameters
indexsource geometry
Returns
true if the label is a line and is interior
bool geos::operation::overlayng::OverlayLabel::isLineLocationUnknown ( int  index) const
bool geos::operation::overlayng::OverlayLabel::isNotPart ( int  index) const
void geos::operation::overlayng::OverlayLabel::locationString ( int  index,
bool  isForward,
std::ostream &  os 
) const
private
void geos::operation::overlayng::OverlayLabel::setLocationAll ( int  index,
Location  loc 
)
void geos::operation::overlayng::OverlayLabel::setLocationCollapse ( int  index)
void geos::operation::overlayng::OverlayLabel::setLocationLine ( int  index,
Location  loc 
)

Sets the line location.

This is used to set the locations for linear edges encountered during area label propagation.

Parameters
indexsource to update
loclocation to set
void geos::operation::overlayng::OverlayLabel::toString ( bool  isForward,
std::ostream &  os 
) const

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const OverlayLabel ol 
)
friend

Member Data Documentation

int geos::operation::overlayng::OverlayLabel::aDim = DIM_NOT_PART
private

Definition at line 95 of file OverlayLabel.h.

bool geos::operation::overlayng::OverlayLabel::aIsHole = false
private

Definition at line 96 of file OverlayLabel.h.

Location geos::operation::overlayng::OverlayLabel::aLocLeft = LOC_UNKNOWN
private

Definition at line 97 of file OverlayLabel.h.

Location geos::operation::overlayng::OverlayLabel::aLocLine = LOC_UNKNOWN
private

Definition at line 99 of file OverlayLabel.h.

Location geos::operation::overlayng::OverlayLabel::aLocRight = LOC_UNKNOWN
private

Definition at line 98 of file OverlayLabel.h.

int geos::operation::overlayng::OverlayLabel::bDim = DIM_NOT_PART
private

Definition at line 100 of file OverlayLabel.h.

bool geos::operation::overlayng::OverlayLabel::bIsHole = false
private

Definition at line 101 of file OverlayLabel.h.

Location geos::operation::overlayng::OverlayLabel::bLocLeft = LOC_UNKNOWN
private

Definition at line 102 of file OverlayLabel.h.

Location geos::operation::overlayng::OverlayLabel::bLocLine = LOC_UNKNOWN
private

Definition at line 104 of file OverlayLabel.h.

Location geos::operation::overlayng::OverlayLabel::bLocRight = LOC_UNKNOWN
private

Definition at line 103 of file OverlayLabel.h.

constexpr Location geos::operation::overlayng::OverlayLabel::LOC_UNKNOWN = Location::NONE
static

Definition at line 113 of file OverlayLabel.h.


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