uk.me.parabola.mkgmap.reader.osm
Class OsmMapDataSource
java.lang.Object
uk.me.parabola.mkgmap.reader.MapperBasedMapDataSource
uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource
- All Implemented Interfaces:
- LoadableMapDataSource, MapDataSource, Configurable
- Direct Known Subclasses:
- Osm5MapDataSource, OsmBinMapDataSource
public abstract class OsmMapDataSource
- extends MapperBasedMapDataSource
- implements LoadableMapDataSource
Base class for OSM map sources. It exists so that more than
one version of the api can be supported at a time.
- Author:
- Steve Ratcliffe
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 |
elementSaver
protected ElementSaver elementSaver
osmReadingHooks
protected OsmReadingHooks osmReadingHooks
OsmMapDataSource
public OsmMapDataSource()
mapLevels
public LevelInfo[] mapLevels()
- Get the maps levels to be used for the current map. This can be
specified in a number of ways in order:
- On the command line with the --levels flag.
The format is a comma (or space) separated list of level/resolution
pairs. Eg --levels=0:24,1:22,2:20
If the flag is given without an argument then the command line override
is turned off for maps following that option.
- In the style options file. This works just like the command line
option, but it applies whenever the given style is used and not overridden
on the command line.
- A default setting.
I'd advise that new styles specify their own set of levels.
- Specified by:
mapLevels
in interface LoadableMapDataSource
- Returns:
- An array of level information, basically a [level,resolution]
pair.
copyrightMessages
public java.lang.String[] copyrightMessages()
- There are no copyright messages in the OSM files themselves. So we
include a fixed set of strings on the assumption that .osm files
are probably going to have the OSM copyright statements.
- Specified by:
copyrightMessages
in interface LoadableMapDataSource
- Returns:
- A list of copyright messages as a String array.
setStyle
protected void setStyle(Style style)
setupHandler
protected void setupHandler(OsmHandler handler)
- Common code to setup the file handler.
- Parameters:
handler
- The file handler.
createElementSaver
protected void createElementSaver()
getElementSaver
public ElementSaver getElementSaver()
getPossibleHooks
protected OsmReadingHooks[] getPossibleHooks()
pluginChain
protected OsmReadingHooks pluginChain(ElementSaver saver,
EnhancedProperties props)
getConverter
public OsmConverter getConverter()
getUsedTags
public java.util.Set<java.lang.String> getUsedTags()