User:Yggdrasil/proposals for mkgmap
continue statement as default, intelligent poi creation
Target: More intellicence in creating POIs, easier style files
Motivation behind this idea:
- continue and continue witha_ctions are complicated to understand, especially for beginners
- and makes style-files complicated
- Up to now, every combination of tags must be covered by style rules. This can get complicated
Possible solution:
- Treat every line like 'continue with_actions' would be present ('create' new objects with every matching line)
- Do not create the object directly, but store it into a temporary table
- When all rules are done, look at the table of new objects. If there are several objects with the same object type, delete all but the first one (first style match - this should be good enough in most cases). Then store these new objects to the map.
Advantages:
- Possibly compatible to existing style rules (not checked in detail yet - discussion welcome!)
- Removal of options (continue and continue with_actions not needed anymore)
- Easyier style rules
- More POIs in maps
Disadvantages:
- More resources needed for rendering (expert's expectations welcome!)
- More complex source code
- Behaviour may in some times be more difficult to understand than the existing system of continue and continue with_actions
Example:
node id=245429611 ele = 417 historic = memorial name = Wallberg natural = peak tourism = viewpoint
My points file:
... natural=peak {name '${name} (${ele})' |'${name}'} [0x6616 level 1] tourism=viewpoint { set name='Aussicht ${name}' | 'Aussichtspunkt'} [0x2c10 level 3] ...
currently creates only one POI, 0x6616 as the rule test is done with the first line match. If I want to visit a nice viewpoint, I won't find it in Garmin, as for every combination a new line would be necessary. With what can a viewpoint be combined? With a tower, bench, castle, peak, whatever.
Of course it would be easy to tag this peak as two or three individual points, what would be considered as "tagging for the Garmin" by some mappers.
The new system would create both POIs.
Separated objects for ; separated key values
Motivation behind this idea:
- Some objects are ignored due to the separation of different values, which is common tagging practice.
Possible solution:
- After occurence of a ; character in any tag, split the string into two parts and create a new (temporary) object with the remaining tags
- After all temporary objects are created, drop out the identical ones (like described above)
A blacklist may be useful, e.g. for 'opening hours' which would lead to an individual post box for each opening period, or note and description.
Disadvantages:
- More memory usage. With each split, number of objects doubles. However, very little number of objects exist that currently have such taggings. For downtown of Stuttgart, I have found two.
Advantages:
- Better quality of maps, no change of rules needed
- Ready for the future, as details are being mapped more precisely
Change may be combined with the continue improvisation, as described above. (however, an expert should judge)
Example:
node id=267504713 amenity = restaurant created_by = Potlatch 0.9c cuisine = regional;german name = Alte Kanzlei wheelchair = limited
My points file
... amenity=restaurant&cuisine=regional [0x2a02 level 3] amenity=restaurant&cuisine=german [0x2a03 level 3] ...
currently ignores this restaurant. So, if I want some regional food, i'll starve. Ok, later in the rules I have a standard rule which adds a general restaurant POI without any cuisine. But this can be improved to make better maps.