Package org.locationtech.jts.geomgraph
Class TopologyLocation
java.lang.Object
org.locationtech.jts.geomgraph.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
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
- Version:
- 1.7
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTopologyLocation
(int on) TopologyLocation
(int[] location) 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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
allPositionsEqual
(int loc) void
flip()
int
get
(int posIndex) int[]
private void
init
(int size) boolean
boolean
isArea()
boolean
isEqualOnSide
(TopologyLocation le, int locIndex) boolean
isLine()
boolean
isNull()
void
merge updates only the NULL attributes of this object with the attributes of another.void
setAllLocations
(int locValue) void
setAllLocationsIfNull
(int locValue) void
setLocation
(int locValue) void
setLocation
(int locIndex, int locValue) void
setLocations
(int on, int left, int right) toString()
-
Field Details
-
location
int[] location
-
-
Constructor Details
-
TopologyLocation
public TopologyLocation(int[] location) -
TopologyLocation
public 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.NULL, Location.EXTERIOR, Location.BOUNDARY, and Location.INTERIOR.- See Also:
-
TopologyLocation
public TopologyLocation(int on) -
TopologyLocation
-
-
Method Details
-
init
private void init(int size) -
get
public int get(int posIndex) -
isNull
public boolean isNull()- Returns:
- true if all locations are NULL
-
isAnyNull
public boolean isAnyNull()- Returns:
- true if any locations are NULL
-
isEqualOnSide
-
isArea
public boolean isArea() -
isLine
public boolean isLine() -
flip
public void flip() -
setAllLocations
public void setAllLocations(int locValue) -
setAllLocationsIfNull
public void setAllLocationsIfNull(int locValue) -
setLocation
public void setLocation(int locIndex, int locValue) -
setLocation
public void setLocation(int locValue) -
getLocations
public int[] getLocations() -
setLocations
public void setLocations(int on, int left, int right) -
allPositionsEqual
public boolean allPositionsEqual(int loc) -
merge
merge updates only the NULL attributes of this object with the attributes of another. -
toString
-