Hi,

there are some rules in include/name, designed to remove "fixme" value from tags. Unfortunately they are executed too late for many cases, for example for highway "name" and "ref".

I propose to add a file include/fixme to default style and include it at the beginning of points, lines and polygon files. This file could contain fixme rules and other rules, that are useful for all objects. I have found these functions useful:
- fixme rules
- setting mkgmap:country tag,
- correction for multipolygon without area=yes
- forcing finalize stage for address

I have attached proposed patch to this mail. It duplicate some rules from other includes, which could be removed there, but I haven't done it yet.

--
Best regards,
Andrzej
Index: resources/styles/default/inc/fixme
===================================================================
--- resources/styles/default/inc/fixme  (nonexistent)
+++ resources/styles/default/inc/fixme  (working copy)
@@ -0,0 +1,13 @@
+# set the country code for country dependent rules
+mkgmap:country!=* & mkgmap:admin_level2=* { set 
mkgmap:country='${mkgmap:admin_level2}' }
+mkgmap:country!=* & addr:country=* { set 
mkgmap:country='${addr:country|country-ISO:}' }
+mkgmap:country!=* & is_in:country=* { set 
mkgmap:country='${is_in:country|country-ISO:}' }
+
+# delete FIXME values (they should be better used in maintenance maps)
+ref ~ '(?i)fix[ _]?+me'                { delete ref; } 
+name ~ '(?i)fix[ _]?+me'       { delete name; }
+
+# correct multipolygons without area=yes
+mkgmap:mp_created=true { add area=yes }
+
+addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
Index: resources/styles/default/lines
===================================================================
--- resources/styles/default/lines      (revision 3834)
+++ resources/styles/default/lines      (working copy)
@@ -8,7 +8,7 @@
 # and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles
 # for more information.
 
-addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
+include 'inc/fixme';
 
 aeroway=runway & highway!=* & is_closed()=false {name '${ref}'} [0x27 
resolution 20]
 (aeroway=taxiway | aeroway=taxilane) & highway!=* & is_closed()=false {name 
'${ref}'} [0x27 resolution 24]
Index: resources/styles/default/points
===================================================================
--- resources/styles/default/points     (revision 3834)
+++ resources/styles/default/points     (working copy)
@@ -8,7 +8,8 @@
 # and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles
 # for more information.
 
-addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
+include 'inc/fixme';
+
 barrier=* & bicycle=*    { set mkgmap:bicycle='${bicycle|subst:private=>no}' }
 barrier=* & foot=*       { set mkgmap:foot='${foot|subst:private=>no}' }       
           
 barrier=* & hgv=*        { set mkgmap:truck='${hgv|subst:private=>no}' }       
           
Index: resources/styles/default/polygons
===================================================================
--- resources/styles/default/polygons   (revision 3834)
+++ resources/styles/default/polygons   (working copy)
@@ -8,7 +8,7 @@
 # and http://wiki.openstreetmap.org/wiki/Mkgmap/help/Custom_styles
 # for more information.
 
-addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
+include 'inc/fixme';
 
 leisure=* & sport=* & name=* { set name='${name} (${sport})' }
 leisure=* & sport=* & name!=* { add name='${sport}' }
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to