uk.me.parabola.mkgmap.reader.osm.bin
Class OsmBinMapDataSource

java.lang.Object
  extended by uk.me.parabola.mkgmap.reader.MapperBasedMapDataSource
      extended by uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource
          extended by uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource
All Implemented Interfaces:
LoadableMapDataSource, MapDataSource, Configurable
Direct Known Subclasses:
OsmBinCoastDataSource

public class OsmBinMapDataSource
extends OsmMapDataSource

Read an OpenStreetMap data file in .osm version 0.5 format. It is converted into a generic format that the map is built from.

The intermediate format is important as several passes are required to produce the map at different zoom levels. At lower resolutions, some roads will have fewer points or won't be shown at all.

Author:
Steve Ratcliffe

Field Summary
 
Fields inherited from class uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource
elementSaver, osmReadingHooks
 
Fields inherited from class uk.me.parabola.mkgmap.reader.MapperBasedMapDataSource
mapper
 
Constructor Summary
OsmBinMapDataSource()
           
 
Method Summary
 boolean isFileSupported(java.lang.String name)
          Determines if the file (or other resource) is supported by this map data source.
 void load(java.lang.String name)
          Load the .osm file and produce the intermediate format.
 
Methods inherited from class uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource
copyrightMessages, createElementSaver, getConverter, getElementSaver, getPossibleHooks, getUsedTags, mapLevels, pluginChain, setStyle, setupHandler
 
Methods inherited from class uk.me.parabola.mkgmap.reader.MapperBasedMapDataSource
addBackground, addBackground, addBoundaryLine, config, getBounds, getConfig, getLines, getMapper, getOverviews, getPoints, getRoadNetwork, getShapes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.me.parabola.mkgmap.general.MapDataSource
getBounds, getLines, getOverviews, getPoints, getRoadNetwork, getShapes
 
Methods inherited from interface uk.me.parabola.util.Configurable
config
 

Constructor Detail

OsmBinMapDataSource

public OsmBinMapDataSource()
Method Detail

isFileSupported

public boolean isFileSupported(java.lang.String name)
Description copied from interface: LoadableMapDataSource
Determines if the file (or other resource) is supported by this map data source. The implementation may do this however it likes, eg by extension or by opening up the file and reading part of it.

Parameters:
name - The file (or other resource) to check.
Returns:
True if the loadable map data source supports that file.

load

public void load(java.lang.String name)
          throws java.io.FileNotFoundException,
                 FormatException
Load the .osm file and produce the intermediate format.

Parameters:
name - The filename to read.
Throws:
java.io.FileNotFoundException - If the file does not exist.
FormatException - For any kind of malformed input.