use of aimax.osm.reader.MapReader 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.reader.MapReader in project aima-java by aimacode.
the class UnifiedMapDrawer method loadMap.
public void loadMap(InputStream stream) {
MapBuilder builder = map.getBuilder();
builder.setEntityClassifier(new MapStyleFactory().createDefaultClassifier());
MapReader mapReader = new Bz2OsmReader();
mapReader.readMap(stream, builder);
builder.buildMap();
}
use of aimax.osm.reader.MapReader in project aima-java by aimacode.
the class UnifiedMapDrawer method loadMap.
public void loadMap(File file) {
MapBuilder builder = map.getBuilder();
builder.setEntityClassifier(new MapStyleFactory().createDefaultClassifier());
MapReader mapReader = new Bz2OsmReader();
mapReader.readMap(file, builder);
builder.buildMap();
}
use of aimax.osm.reader.MapReader 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