[mkgmap-dev] value (string) handling via style file
From Marko Mäkelä marko.makela at iki.fi on Fri Nov 4 17:15:00 GMT 2011
On Fri, Nov 04, 2011 at 05:19:07PM +0100, Minko wrote: >Is it possible to use wildcards in key tags (like key:*=value or >*key*=value) with regular expression? Side note: that looks like a shell glob pattern, not a regular expression. Currently, I don't think so. As far as I understand, the style rule matcher and even the OSM data parser want to see a complete list of keys in advance, so that irrelevant tags can be dropped quickly. >It can be useful with key tags like oneway:*=yes (with * = bicycle, >cycleway etc) or cycleway:*= or more complicated *:cycleway:* or any >kind of vehicle key tags like bicycle:* or maybe name:* (to cover items >with name: on an object if name is unset) Technically, the parser's tag-list could be extended or replaced with a tag-regexp. The parser would drop all non-matching keys based on a regexp match instead of based on a tag-list lookup. But, I am not sure how this could be implemented in the style rule matcher. Steve is the expert there. I guess that this should be reasonable, provided that the rules do contain some constant keys as well. If you had a hypotethical rule cycleway:.* ~~ .* { echo } then it would have to be checked against every object in the input, which is probably way too expensive. Best regards, Marko
- Previous message: [mkgmap-dev] value (string) handling via style file
- Next message: [mkgmap-dev] Commit: r2065: Renaming Areas2POIHook to prepare the addition of the new add-pois-to-line option
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list