logo separator

[mkgmap-dev] [PATCH] --ignore-builtin-relations

From Marko Mäkelä marko.makela at iki.fi on Sat Apr 16 21:23:55 BST 2011

On Sat, Apr 16, 2011 at 08:59:57PM +0200, WanMil wrote:
>I assume that processing of multipolygons take most of the 30s saved 
>time.

All of it, because the baseline was --ignore-turn-restrictions.

I do not like extra knobs either. They would be contradictory to our aim 
of simplifying the command line options.

>So maybe we could better think of how to avoid unneccessary 
>multipolygon processings. Commits for r1913 and r1914 were a first 
>small step but I think some more of these will be possible.

Sure, that would benefit the processing of all styles.

>* The polygon tags of the style maybe could additionally be used by the 
>mp processing to check if it makes sense to process the mp.

This sounds reasonable. If there are no polygon rules, that should 
hopefully throw out most multipolygons. But this would still imply some 
overhead.

>* More of the tags used in the builtin-tags file could be loaded 
>dynamically. This reduces the number of mp processing. E.g. addr:* tags 
>make sense only if the index option is set or if they are referenced in 
>the style files.

Actually, addr:* are added to POI details even without --index. Select a 
POI, and you will see addr:* and phone if they are set. (That reminds 
me, we should start supporting contact:phone.)

>* The HighwayHook uses lots of tags. Maybe the highway hook makes sense 
>only if some mkgmap option are set? --net, --route?

I guess that we should remove the --make-opposite-cycleways option, and 
add the corresponding rules to the default style. The fixme/FIXME node 
tags and mkgmap:dead-end-check are only needed when --report-dead-ends 
is set, so that warnings about certain dead-end oneways can suppressed.

By the way, do we keep a collection of the needed tags based on element 
type? The FIXME or fixme would only apply to nodes (end nodes of a 
oneway), not to ways or relations. Generally, ways (polygons) and 
relations (multipolygons) would inherit the set of needed tags from 
nodes if --add-pois-to-areas is set. But the FIXME processing in 
HighwayHooks only applies to real (not generated) nodes.

>* Some tags are used statically in the StyleConverter. Maybe this 
>processing makes sense only if some special mkgmap options are set?

I guess that the access tags depend on --net or --route.

>Your simple layer map is a good test case to remove and detect 
>unneccessary mkgmap actions. Let's find out and remove them instead of 
>using the new main off-switch ignore-builtin-relations with some 
>possible non-intutional side effects.

Good idea. If we can improve the execution speed so that omitting
--ignore-builtin-relations would grow execution time by less than 1% (it 
currently grows the time by 25%), then it is not reasonable to add yet 
another option.

If a justification for --ignore-builtin-relations remains, instead of 
introducing the command line option we could perhaps coin a style 
attribute that says which internal processing is needed. I would imagine 
that for transparent map layers that only add some points or 
non-routeable lines but no polygons, you would not need any of the fancy 
processing, such as --index, --route, --net, --dead-end-check, 
--generate-sea, multipolygon/boundary/restriction relations.

Best regards,

	Marko



More information about the mkgmap-dev mailing list