Package ca.spatial.table
Class Edge
java.lang.Object
ca.spatial.table.Edge
This class is used to describe neighbour relationships
between polygon. Edges may be touching (distance == 0) in which case
they have a shared edge length. Edges may also be proximal, in which
case they will have shared edge length == 0 and a non-zero distance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLength(int length, float distance)
Increase the value of the shared edge with this neighbour.boolean
boolean
Get the connectability attributefloat
Get the minimum distance between the neighbours.int
Get the length of the shared edge between these neighbours.getNode()
Get theNode
object at the other end of this edge.int
hashCode()
void
setConnectable(boolean connectable)
Set the connectability attribute
-
Constructor Details
-
Method Details
-
getNode
Get theNode
object at the other end of this edge. -
getLength
public int getLength()Get the length of the shared edge between these neighbours. If the neighbours are not touching (strictly adjacent) then there is no shared edge. -
getDistance
public float getDistance()Get the minimum distance between the neighbours. -
getConnectable
public boolean getConnectable()Get the connectability attribute -
setConnectable
public void setConnectable(boolean connectable)Set the connectability attribute -
addLength
public void addLength(int length, float distance)Increase the value of the shared edge with this neighbour. Neighbours may have several edges that they share, and this method helps contruct edges with multiple pieces.- Parameters:
length
- The additional length to add to this shared edge.distance
- The minimum distance between the neighbours for this edge.
-
equals
-
hashCode
public int hashCode()
-