use of aimax.osm.data.impl.DefaultMapBuilder in project aima-java by aimacode.
the class OsmAgentApp method readMap.
/** Reads a map from the specified stream and stores it in {@link #map}. */
public void readMap(InputStream stream) {
if (stream != null) {
MapReader mapReader = new Bz2OsmReader();
MapBuilder mapBuilder = new DefaultMapBuilder();
mapReader.readMap(stream, mapBuilder);
map = new MapAdapter(mapBuilder.buildMap());
} else
LOG.warning("Map reading failed because input stream does not exist.");
}
use of aimax.osm.data.impl.DefaultMapBuilder in project aima-java by aimacode.
the class OsmAgentApp method readMap.
/** Reads a map from the specified file and stores it in {@link #map}. */
public void readMap(File file) {
MapReader mapReader = new Bz2OsmReader();
MapBuilder mapBuilder = new DefaultMapBuilder();
mapReader.readMap(file, mapBuilder);
map = new MapAdapter(mapBuilder.buildMap());
}
Aggregations