uk.me.parabola.mkgmap.combiners
Class MdrBuilder

java.lang.Object
  extended by uk.me.parabola.mkgmap.combiners.MdrBuilder
All Implemented Interfaces:
Combiner

public class MdrBuilder
extends java.lang.Object
implements Combiner

Create the global index file. This consists of an img file containing an MDR file and optionally an SRT file.

Author:
Steve Ratcliffe

Constructor Summary
MdrBuilder()
           
 
Method Summary
 void init(CommandArgs args)
          Create the mdr file and initialise.
 void onFinish()
          The complete map set has been processed.
 void onMapEnd(FileInfo finfo)
          Adds a new map to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MdrBuilder

public MdrBuilder()
Method Detail

init

public void init(CommandArgs args)
Create the mdr file and initialise. It has a name that is based on the overview-mapname option, as does the associated MDX file.

Specified by:
init in interface Combiner
Parameters:
args - The command line arguments.

onMapEnd

public void onMapEnd(FileInfo finfo)
Adds a new map to the file. We need to read in the img file and extract all the information that can be indexed from it.

Specified by:
onMapEnd in interface Combiner
Parameters:
finfo - An interface to read the map.

onFinish

public void onFinish()
Description copied from interface: Combiner
The complete map set has been processed. Finish off anything that needs doing.

Specified by:
onFinish in interface Combiner