Class: TopologyLocation

jsts.geomgraph.TopologyLocation

new TopologyLocation()

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.NONE, Location.EXTERIOR, Location.BOUNDARY, Location.INTERIOR}

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

Source:

Methods

allPositionsEqual(loc) → {boolean}

Parameters:
Name Type Description
loc int
Source:
Returns:
Type
boolean

get(posIndex) → {int}

Parameters:
Name Type Description
posIndex int
Source:
Returns:
Type
int

getLocations() → {Array.<int>}

Source:
Returns:
Type
Array.<int>

isAnyNull() → {boolean}

Source:
Returns:
true if any locations are NULL.
Type
boolean

isArea() → {boolean}

Source:
Returns:
Type
boolean

isEqualOnSide(le, locIndex) → {boolean}

Parameters:
Name Type Description
le TopologyLocation
locIndex int
Source:
Returns:
Type
boolean

isLine() → {boolean}

Source:
Returns:
Type
boolean

isNull() → {boolean}

Source:
Returns:
true if all locations are NULL.
Type
boolean

merge(gl)

merge updates only the NULL attributes of this object with the attributes of another.
Parameters:
Name Type Description
gl TopologyLocation
Source:

setAllLocations(locValue)

Parameters:
Name Type Description
locValue int
Source:

setAllLocationsIfNull(locValue)

Parameters:
Name Type Description
locValue int
Source:

setLocation(locIndex, locValue)

Parameters:
Name Type Description
locIndex int
locValue int
Source:

setLocations(on, left, right)

Parameters:
Name Type Description
on int
left int
right int
Source: