
Hi all, see also http://gis.19327.n5.nabble.com/Error-not-detected-tp5823898p5823965.html I've implemented a quick solution which reports how often a rule expression was evaluated and how often the evaluation returned true. I can think of many ways to report this info, so I started with the most simple format: <prefix> <style file> "stats (rule/evals/true)" <expression> /<numEval>/<numTrue> Attached is the patch that implements this and a sample configuration file for the logging containing this line: uk.me.parabola.mkgmap.osmstyle.StyleImpl.level=INFO The new option is activated with --report-style-stats. A compiled mkgmap binary can be found here: http://files.mkgmap.org.uk/download/226/mkgmap.jar Any comment is welcome! Gerd

Hi Gerd I think that since you have an option to enable the report it should print to stdout rather than also having to configure logging to see anything. Perhaps printStat() could be a method on Rule, rather than having the two getters? ..Steve

Hi Steve,
I think that since you have an option to enable the report it should print to stdout rather than also having to configure logging to see anything.
I'd prefer that too, but that would require to collect the stats for all tiles, else we'd have problems with the multithreading, and in theory one may have multiple style-files in one mkgmap execution. So, I used options like --report-dead-ends and --report-similar-arcs as examples.
Perhaps printStat() could be a method on Rule, rather than having the two getters?
Maybe yes. I thought about sorted reports (ordered by usage), so I wanted the values, but now I think that we should keep the order in the style. I'll try to code your proposal. Gerd
participants (2)
-
Gerd Petermann
-
Steve Ratcliffe