GEOS: geos::geomgraph::TopologyLocation Class Reference

Public Member Functions | Friends

# geos::geomgraph::TopologyLocation Class Reference

A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geometry. More...

`#include <TopologyLocation.h>`

List of all members.

## Public Member Functions
| TopologyLocation (const std::vector< int > &newLocation)
| TopologyLocation (int on, int left, int right)
| Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some GraphComponent relate to some Geometry.
| TopologyLocation (int on)
| TopologyLocation (const TopologyLocation &gl)
int | get (size_t posIndex) const
bool | isNull () const
bool | isAnyNull () const
bool | isEqualOnSide (const TopologyLocation &le, int locIndex) const
bool | isArea () const
bool | isLine () const
void | flip ()
void | setAllLocations (int locValue)
void | setAllLocationsIfNull (int locValue)
void | setLocation (size_t locIndex, int locValue)
void | setLocation (int locValue)
const std::vector< int > & | getLocations () const
| Warning: returns reference to owned memory.
void | setLocations (int on, int left, int right)
bool | allPositionsEqual (int loc) const
void | merge (const TopologyLocation &gl)
| merge updates only the UNDEF attributes of this object with the attributes of another.
std::string | toString () const
## Friends
std::ostream & | operator<< (std::ostream &, const TopologyLocation &)

## Detailed Description

A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geometry.

If the parent component is an area edge, each side and the edge itself have a topological location. These locations are named

- ON: on the edge
- LEFT: left-hand side of the edge
- RIGHT: right-hand side

If the parent component is a line edge or node, there is a single topological relationship attribute, ON.

The possible values of a topological location are {Location::UNDEF, Location::EXTERIOR, Location::BOUNDARY, Location::INTERIOR}

The labelling is stored in an array location[j] where where j has the values ON, LEFT, RIGHT

## Constructor & Destructor Documentation

geos::geomgraph::TopologyLocation::TopologyLocation | ( | int | on,
|  | int | left,
|  | int | right
| ) |  |

Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some GraphComponent relate to some Geometry.

Possible values for the parameters are Location::UNDEF, Location::EXTERIOR, Location::BOUNDARY, and Location::INTERIOR.

See also:
  Location

## Member Function Documentation

bool geos::geomgraph::TopologyLocation::isAnyNull | ( | ) | const

Returns:
  true if any locations is Location::UNDEF

bool geos::geomgraph::TopologyLocation::isNull | ( | ) | const

Returns:
  true if all locations are Location::UNDEF

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

- TopologyLocation.h