|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjwo.landserf.structure.msn.GraphNetwork
Structure to hold a Wolf-Pfaltz Surface Network for characterising surface topology.
Constructor Summary | |
GraphNetwork()
Creates an empty network graph. |
|
GraphNetwork(float tolerance)
Creates an empty network graph. |
|
GraphNetwork(float tolerance,
GISFrame gisFrame)
Creates an empty network graph. |
|
GraphNetwork(String msnText)
Creates a network graph from the given ASCII representation. |
Method Summary | |
void |
addEdge(GISVector path,
int type1,
int type2,
float z1,
float z2)
Adds a given edge to the network. |
void |
addEdge(GraphNode node1,
GraphNode node2)
Adds a new edge defined by the given nodes to the network. |
void |
addJunction(GraphNode junctionNode,
GraphEdge newEdge)
Adds a new junction to the list stored by the network. |
void |
addPath(GraphEdge edge,
GISVector path)
Adds a given edge path to the master list of paths stored by this class. |
void |
appendJunction(GraphNode junctionNode,
GraphEdge newEdge)
Adds a new edge to an existing junction. |
int |
countNumGraphs()
Counts and reports the number of disconnected subgraphs. |
Vector |
getChannels()
Reports a list of all the channels in the network. |
String |
getEdgeList()
Reports all the edges (ridges and channels) associated with the graph. |
Vector |
getEdgePaths()
Reports a list of all the edge paths. |
Vector |
getEdges()
Returns all the edges that make up the network. |
int |
getIDCounter()
Reports the current ID counter. |
Vector |
getNodes()
Reports the list of nodes stored in the network. |
int |
getNumEdges()
Reports the number of edges in the network. |
String |
getPassList()
Reports all the passes associated with the graph. |
GISVector |
getPath(GraphEdge edge)
Reports the path associated with the given edge. |
String |
getPeakList()
Reports all the peaks associated with the graph. |
String |
getPitList()
Reports all the pits associated with the graph. |
Vector |
getRidges()
Reports a list of all the ridges in the network. |
float |
getTolerance()
Reports the node-snapping tolerance used when linking edges to nodes. |
VectorMap |
getVectorMap()
Converts the Metric Surface Network into a vector map for display. |
VectorMap |
getVectorMap(VectorMap vectMap)
Fills the given vector map with a representation of the the Metric Surface Network. |
void |
incIDCounter()
Increments the current ID counter. |
boolean |
readFile(String fileName,
int format)
Opens a metric surface network file. |
boolean |
removeEdge(GraphEdge edge)
Removes the given edge from the network. |
boolean |
removeEdge(GraphNode nodeToRemove)
Removes all the edges connected to the given node as well as the node itself. |
boolean |
removeEdge(GraphNode node1,
GraphNode node2)
Removes the first edge connecting the given nodes. |
boolean |
replacePath(GraphEdge edge,
GISVector newPath)
Replaces the path associated with the given edge by the given path. |
void |
resetIDs()
Resets the IDs of all nodes in the network. |
void |
snapLines(float snapTolerance)
Snaps lines of identical attribute to one another. |
String |
toString()
Describes the network. |
void |
updateFromText(String msnText)
Converts the given string into a surface network. |
boolean |
writeFile(String fileName,
int format)
Saves a version of the graph as a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GraphNetwork()
public GraphNetwork(String msnText)
msnText
- Lines of text reprenting network topology.public GraphNetwork(float tolerance)
tolerance
- Node snapping tolerance.public GraphNetwork(float tolerance, GISFrame gisFrame)
tolerance
- Node snapping tolerance.Method Detail |
public void addEdge(GISVector path, int type1, int type2, float z1, float z2)
path
- Vector path connecting nodes.type1
- Type of node at one end.type2
- Type of node at the other end.z1
- Height at one end.z2
- Height at the other end.public void addEdge(GraphNode node1, GraphNode node2)
node1
- First node in edge.node2
- Second node in edge.public boolean removeEdge(GraphEdge edge)
edge
- Edge to remove.
public boolean removeEdge(GraphNode node1, GraphNode node2)
node1
- First node in edge.node2
- Second node in edge.
public boolean removeEdge(GraphNode nodeToRemove)
nodeToRemove
- Node to search from and remove.
public void addJunction(GraphNode junctionNode, GraphEdge newEdge)
junctionNode
- Node at centre of junction.newEdge
- New edge to add to junction.public void appendJunction(GraphNode junctionNode, GraphEdge newEdge)
junctionNode
- Node at centre of junction.newEdge
- New edge to add to junction.public void addPath(GraphEdge edge, GISVector path)
edge
- Edge with which to associate paths.path
- Geometric path associated with edge.public boolean replacePath(GraphEdge edge, GISVector newPath)
edge
- Edge containing path to replace.newPath
- New geometric path to replace existing one.
public GISVector getPath(GraphEdge edge)
edge
- Edge from which to extract path geometry.
public Vector getEdges()
public Vector getEdgePaths()
public Vector getChannels()
public Vector getRidges()
public VectorMap getVectorMap()
public VectorMap getVectorMap(VectorMap vectMap)
vectMap
- VectorMap to fill.public int getIDCounter()
public void incIDCounter()
public float getTolerance()
public String toString()
public boolean writeFile(String fileName, int format)
fileName
- Name of file to save.format
- File format to save.public boolean readFile(String fileName, int format)
fileName
- Name of file to open.format
- File format to open.public int countNumGraphs()
public String getPitList()
public String getPassList()
public String getPeakList()
public String getEdgeList()
public int getNumEdges()
public void updateFromText(String msnText)
msnText
- Text representing msn.public Vector getNodes()
public void resetIDs()
public void snapLines(float snapTolerance)
snapTolerance
- Distance within which, adjacent lines are snapped.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |