Label class

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. @version 1.7

Constructors

Label(int onLoc)
Construct a Label with a single location for both Geometries. Initialize the locations to Null
Label.args2(int geomIndex, int onLoc)
Construct a Label with a single location for both Geometries. Initialize the location for the Geometry index.
Label.args3(int onLoc, int leftLoc, int rightLoc)
Construct a Label with On, Left and Right locations for both Geometries. Initialize the locations for both Geometries to the given values.
Label.args4(int geomIndex, int onLoc, int leftLoc, int rightLoc)
Construct a Label with On, Left and Right locations for both Geometries. Initialize the locations for the given Geometry index.
Label.fromLabel(Label lbl)
Construct a Label with the same values as the argument Label.

Properties

elt List<TopologyLocation?>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allPositionsEqual(int geomIndex, int loc) bool
flip() → void
getGeometryCount() int
getLocation(int geomIndex) int
getLocationWithPosIndex(int geomIndex, int posIndex) int
isAnyNull(int geomIndex) bool
isArea() bool
isAreaWithIndex(int geomIndex) bool
isEqualOnSide(Label lbl, int side) bool
isLine(int geomIndex) bool
isNull(int geomIndex) bool
merge(Label lbl) → void
Merge this label with another one. Merging updates any null attributes of this label with the attributes from lbl
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAllLocations(int geomIndex, int location) → void
setAllLocationsIfNull(int location) → void
setAllLocationsIfNullWithIndex(int geomIndex, int location) → void
setLocation(int geomIndex, int posIndex, int location) → void
setLocationWithIndex(int geomIndex, int location) → void
toLine(int geomIndex) → void
Converts one GeometryLocation to a Line location
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

toLineLabel(Label label) Label