public class RoadMap extends Graph<Road> implements Serializable
Road
objects. It provides a road
network for routing that is derived from Graph
and spatial search of roads with a
SpatialIndex
.
Note: Since Road
objects are directed representations of BaseRoad
objects,
identifiers have a special mapping, see Road
.
Constructor and Description |
---|
RoadMap() |
Modifier and Type | Method and Description |
---|---|
RoadMap |
construct()
Constructs road network topology and spatial index.
|
void |
deconstruct()
Destroys road network topology and spatial index.
|
static RoadMap |
Load(RoadReader reader)
|
RoadReader |
reader()
Gets
RoadReader of roads in this RoadMap . |
SpatialIndex<RoadPoint> |
spatial()
Returns instance of
SpatialIndex for spatial search of Road objects. |
public static RoadMap Load(RoadReader reader) throws SourceException
reader
- RoadReader
to load BaseRoad
objects.RoadMap
object.SourceException
- thrown if error occurs while loading roads.public RoadMap construct()
public void deconstruct()
deconstruct
in class Graph<Road>
public SpatialIndex<RoadPoint> spatial()
SpatialIndex
for spatial search of Road
objects.SpatialIndex
or null, if the map hasn't been constructed (
construct()
) or has been deconstructed (
deconstruct()
).public RoadReader reader()
RoadReader
of roads in this RoadMap
.RoadReader
object.Copyright © 2016. All rights reserved.