public class Label extends Object
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.
| Constructor and Description |
|---|
Label(int geomIndex,
Location onLoc)
Construct a Label with a single location for both Geometries.
|
Label(int geomIndex,
Location onLoc,
Location leftLoc,
Location rightLoc)
Construct a Label with On, Left and Right locations for both Geometries.
|
Label(Label lbl)
Construct a Label with the same values as the argument Label.
|
Label(Location onLoc)
Construct a Label with a single location for both Geometries.
|
Label(Location onLoc,
Location leftLoc,
Location rightLoc)
Construct a Label with On, Left and Right locations for both Geometries.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allPositionsEqual(int geomIndex,
Location loc) |
void |
flip() |
int |
getGeometryCount() |
Location |
getLocation(int geomIndex) |
Location |
getLocation(int geomIndex,
int posIndex) |
boolean |
isAnyNull(int geomIndex) |
boolean |
isArea() |
boolean |
isArea(int geomIndex) |
boolean |
isEqualOnSide(Label lbl,
int side) |
boolean |
isLine(int geomIndex) |
boolean |
isNull(int geomIndex) |
void |
merge(Label lbl)
Merge this label with another one.
|
void |
setAllLocations(int geomIndex,
Location location) |
void |
setAllLocationsIfNull(int geomIndex,
Location location) |
void |
setAllLocationsIfNull(Location location) |
void |
setLocation(int geomIndex,
int posIndex,
Location location) |
void |
setLocation(int geomIndex,
Location location) |
void |
toLine(int geomIndex)
Converts one GeometryLocation to a Line location
|
static Label |
toLineLabel(Label label) |
String |
toString() |
public Label(int geomIndex,
Location onLoc)
public Label(int geomIndex,
Location onLoc,
Location leftLoc,
Location rightLoc)
public Label(Label lbl)
public Label(Location onLoc)
public boolean allPositionsEqual(int geomIndex,
Location loc)
public void flip()
public int getGeometryCount()
public Location getLocation(int geomIndex)
public Location getLocation(int geomIndex, int posIndex)
public boolean isAnyNull(int geomIndex)
public boolean isArea()
public boolean isArea(int geomIndex)
public boolean isEqualOnSide(Label lbl, int side)
public boolean isLine(int geomIndex)
public boolean isNull(int geomIndex)
public void merge(Label lbl)
public void setAllLocations(int geomIndex,
Location location)
public void setAllLocationsIfNull(int geomIndex,
Location location)
public void setAllLocationsIfNull(Location location)
public void setLocation(int geomIndex,
int posIndex,
Location location)
public void setLocation(int geomIndex,
Location location)
public void toLine(int geomIndex)
Copyright © 2015 Revolution Systems Inc.. All rights reserved.