logo separator

[mkgmap-dev] Adaptable paths for input and output files

From Markus mkgmap.666.brainbug at spamgourmet.org on Tue Jul 20 12:01:21 BST 2010

Hi Steve,

I reviewed the corresponding mkgmap files again, heading to implement
getOutputDir(). This approach would create a central place where

- the directory is read or set to DEFAULT_DIR
- the pathname is tested for presence
- the directory is created (if not existing)

But it has some downsides too:
- The above 3 actions are executed for each call of getOutputDir().
- CommandArgs is not easily accessible from classes like DEM.java or
MapMaker.java (createMap needs a pathname)

Apart from this, createMap() would have to be extended to 4 arguments (+
outputDir) in any case.

One thing to solve the above problems would be to rewrite "output-dir" at
parsing time. Though this would violate the semantics somehow, the cleaned
up value could be retrieved by simply calling config.getProperty().

I don't want to mess around in your code unnecessarily; so what's your
opinion towards that?

All the best,
/Markus




More information about the mkgmap-dev mailing list