|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinput.WKTReader
input.WKTMapReader
public class WKTMapReader
"Well-known text syntax" map data reader.
Note: Understands only LINESTRING
s and
MULTILINESTRING
s. Skips all POINT
data.
Other data causes IOException.
Field Summary |
---|
Fields inherited from class input.WKTReader |
---|
LINESTRING, MULTILINESTRING, POINT |
Constructor Summary | |
---|---|
WKTMapReader(boolean bidi)
Constructor. |
Method Summary | |
---|---|
void |
addPaths(java.io.File file,
int type)
Adds paths to the map and adds given type to all nodes' type. |
void |
addPaths(java.io.Reader input,
int nodeType)
Add paths to current path set. |
SimMap |
getMap()
Returns new a SimMap that is based on the read map |
java.util.Collection<MapNode> |
getNodes()
Returns the map nodes that were read in a collection |
java.util.Map<Coord,MapNode> |
getNodesHash()
Returns the original Map object that was used to read the map |
void |
setBidirectional(boolean bidi)
Sets bidirectional paths on/off. |
Methods inherited from class input.WKTReader |
---|
init, isDone, isKnownType, nextType, parseLineString, parseMultilinestring, parsePoint, readLines, readNestedContents, readNestedContents, readPoints, readPoints, readWord, setDone, skipAllWhitespace, skipUntil |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WKTMapReader(boolean bidi)
bidi
- If true, all read paths are set bidirectional (i.e. if node A
is a neighbor of node B, node B is also a neighbor of node A).Method Detail |
---|
public void setBidirectional(boolean bidi)
bidi
- If true, all paths are set bidirectional (false -> not)public java.util.Collection<MapNode> getNodes()
public java.util.Map<Coord,MapNode> getNodesHash()
public SimMap getMap()
public void addPaths(java.io.File file, int type) throws java.io.IOException
file
- The file where the WKT data is read fromtype
- The type to use (integer value, see class MapNode
))
java.io.IOException
- If something went wrong while reading the filepublic void addPaths(java.io.Reader input, int nodeType) throws java.io.IOException
input
- Reader where the WKT data is read fromnodeType
- The type to use (integer value, see class
MapNode
))
java.io.IOException
- if something went wrong with reading from the input
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |