Class: Label

jsts.geomgraph.Label

new Label()

A Label indicates the topological relationship of a component of a topology graph to a given Geometry. This class supports labels for relationships to two Geometrys, which is sufficient for algorithms for binary operations.

Topology graphs support the concept of labeling nodes and edges in the graph. The label of a node or edge specifies its topological relationship to one or more geometries. (In fact, since JTS operations have only two arguments labels are required for only two geometries). A label for a node or edge has one or two elements, depending on whether the node or edge occurs in one or both of the input Geometrys. Elements contain attributes which categorize the topological location of the node or edge relative to the parent Geometry; that is, whether the node or edge is in the interior, boundary or exterior of the Geometry. Attributes have a value from the set {Interior, Boundary, Exterior}. In a node each element has a single attribute <On>. For an edge each element has a triplet of attributes <Left, On, Right>.

It is up to the client code to associate the 0 and 1 TopologyLocations with specific geometries.

Source:

Methods

(static) toLineLabel(label) → {Label}

converts a Label to a Line label (that is, one with no side Locations)
Parameters:
Name Type Description
label label
Source:
Returns:
Type
Label

allPositionsEqual(geomIndex, loc) → {boolean}

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

getGeometryCount() → {int}

Source:
Returns:
Type
int

getLocation(geomIndex, posIndex) → {int}

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

getLocation2(geomIndex) → {int}

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

isAnyNull(geomIndex) → {boolean}

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

isArea() → {boolean}

Source:
Returns:
Type
boolean

isArea2(geomIndex) → {boolean}

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

isEqualOnSide(lbl, side) → {boolean}

Parameters:
Name Type Description
lbl Label
side int
Source:
Returns:
Type
boolean

isLine(geomIndex) → {boolean}

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

isNull(geomIndex) → {boolean}

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

merge(lbl)

Merge this label with another one. Merging updates any null attributes of this label with the attributes from lbl
Parameters:
Name Type Description
lbl Label
Source:

setAllLocations(geomIndex, location)

Parameters:
Name Type Description
geomIndex int
location int
Source:

setAllLocationsIfNull(geomIndex, location)

Parameters:
Name Type Description
geomIndex int
location int
Source:

setAllLocationsIfNull2(location)

Parameters:
Name Type Description
location int
Source:

setLocation(geomIndex, posIndex, location)

Parameters:
Name Type Description
geomIndex int
posIndex int
location int
Source:

setLocation2(geomIndex, location)

Parameters:
Name Type Description
geomIndex int
location int
Source:

toLine(geomIndex)

Converts one GeometryLocation to a Line location
Parameters:
Name Type Description
geomIndex int
Source: