GEOS  3.14.0dev
Public Types | Public Member Functions | Static Public 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 (uint8_t p_index)
 
 OverlayLabel (uint8_t p_index, Location p_locLeft, Location p_locRight, bool p_isHole)
 
int dimension (uint8_t index) const
 
void initBoundary (uint8_t index, Location locLeft, Location locRight, bool p_isHole)
 
void initCollapse (uint8_t index, bool p_isHole)
 
void initLine (uint8_t index)
 
void initNotPart (uint8_t index)
 
void setLocationLine (uint8_t index, Location loc)
 
void setLocationAll (uint8_t index, Location loc)
 
void setLocationCollapse (uint8_t index)
 
bool isLine () const
 
bool isLine (uint8_t index) const
 
bool isLinear (uint8_t index) const
 
bool isKnown (uint8_t index) const
 
bool isNotPart (uint8_t index) const
 
bool isBoundaryEither () const
 
bool isBoundaryBoth () const
 
bool isBoundaryCollapse () const
 
bool isBoundaryTouch () const
 
bool isBoundary (uint8_t index) const
 
bool isLineLocationUnknown (int index) const
 
bool isBoundarySingleton () const
 
bool isLineInArea (int8_t index) const
 
bool isHole (uint8_t index) const
 
bool isCollapse (uint8_t index) const
 
Location getLineLocation (uint8_t index) const
 
bool isInteriorCollapse () const
 
bool isCollapseAndNotPartInterior () const
 
bool isLineInterior (uint8_t index) const
 
Location getLocationBoundaryOrLine (uint8_t index, int position, bool isForward) const
 
Location getLocation (uint8_t index) const
 
Location getLocation (uint8_t index, int position, bool isForward) const
 
bool hasSides (uint8_t index) const
 
OverlayLabel copy () const
 
void toString (bool isForward, std::ostream &os) const
 

Static Public Attributes

static constexpr Location LOC_UNKNOWN = Location::NONE
 

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

Member Function Documentation

◆ getLocation()

Location geos::operation::overlayng::OverlayLabel::getLocation ( uint8_t  index) const
inline

Gets the linear location for the given source.

Parameters
indexthe source index
Returns
the linear location for the source

◆ getLocationBoundaryOrLine()

Location geos::operation::overlayng::OverlayLabel::getLocationBoundaryOrLine ( uint8_t  index,
int  position,
bool  isForward 
) const
inline

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

◆ isBoundaryCollapse()

bool geos::operation::overlayng::OverlayLabel::isBoundaryCollapse ( ) const
inline

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

◆ isBoundarySingleton()

bool geos::operation::overlayng::OverlayLabel::isBoundarySingleton ( ) const
inline

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

◆ isBoundaryTouch()

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

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

◆ isCollapseAndNotPartInterior()

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

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

◆ isInteriorCollapse()

bool geos::operation::overlayng::OverlayLabel::isInteriorCollapse ( ) const
inline

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

◆ isLineInArea()

bool geos::operation::overlayng::OverlayLabel::isLineInArea ( int8_t  index) const
inline

Tests if a line edge is inside

Parameters
index
Returns

◆ isLineInterior()

bool geos::operation::overlayng::OverlayLabel::isLineInterior ( uint8_t  index) const
inline

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

◆ setLocationLine()

void geos::operation::overlayng::OverlayLabel::setLocationLine ( uint8_t  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

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