public class WKTMapReader extends WKTReader
LINESTRINGs and
MULTILINESTRINGs. Skips all POINT data.
Other data causes IOException.LINESTRING, MULTILINESTRING, POINT| Constructor and Description |
|---|
WKTMapReader(boolean bidi)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
init, isDone, isKnownType, nextType, parseLineString, parseMultilinestring, parsePoint, readLines, readNestedContents, readNestedContents, readPoints, readPoints, readWord, setDone, skipAllWhitespace, skipUntilpublic 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).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