Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 3803)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(working copy)
@@ -29,6 +29,8 @@
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
 import java.util.logging.Level;
 
 import uk.me.parabola.imgfmt.ExitException;
@@ -69,6 +71,7 @@
 import uk.me.parabola.mkgmap.reader.osm.Rule;
 import uk.me.parabola.mkgmap.reader.osm.Style;
 import uk.me.parabola.mkgmap.reader.osm.TagDict;
+import uk.me.parabola.mkgmap.reader.osm.Tags;
 import uk.me.parabola.mkgmap.reader.osm.TypeResult;
 import uk.me.parabola.mkgmap.reader.osm.Way;
 import uk.me.parabola.util.EnhancedProperties;
@@ -144,7 +147,8 @@
 	private final boolean linkPOIsToWays;
 	private final boolean mergeRoads;
 	private final boolean routable;
-	
+	private final Tags styleOptionTags;
+	private final static String STYLE_OPTION_PREF = "mkgmap:option:";
 
 	private LineAdder lineAdder = new LineAdder() {
 		public void add(MapLine element) {
@@ -211,9 +215,41 @@
 		// undocumented option - usually used for debugging only
 		mergeRoads = props.getProperty("no-mergeroads", false) == false;
 		routable = props.containsKey("route");
-		
+		String styleOption= props.getProperty("style-option",null);
+		styleOptionTags = parseStyleOption(styleOption);
+		checkStyleOptionUsage();
 	}
 
+	private void checkStyleOptionUsage() {
+		style.getUsedTags().stream().filter(s-> s != null && s.startsWith(STYLE_OPTION_PREF)).forEach(s ->{
+			if (styleOptionTags.get(s) == null)
+				System.err.println("Warning: style uses tag " + s + " which is not set with --style-options");
+		});
+	}
+
+	/**
+	 * Handle style option parameter. Create tags which are added to each element
+	 * before style processing starts.
+	 * @param styleOption the user option 
+	 * @return Tags instance created from the option.
+	 */
+	private Tags parseStyleOption(String styleOption) {
+		Tags styleTags = new Tags();
+		if (styleOption != null) {
+			//-style-option=car;farms=more;admin5=10
+			String[] tags = styleOption.split(";");
+			for (String t : tags) {
+				String[] pair = t.split("=");
+				String key = pair[0]; 
+				String val = (pair.length == 1) ? "true" : pair[1]; 
+				String old = styleTags.put(STYLE_OPTION_PREF + key, val);
+				if (old != null)
+					log.error("duplicate tag key", key, "in style option", styleOption);
+			}
+		}
+		return styleTags;
+	}
+
 	/** One type result for ways to avoid recreating one for each way. */ 
 	private final WayTypeResult wayTypeResult = new WayTypeResult();
 	private class WayTypeResult implements TypeResult 
@@ -447,12 +483,18 @@
 		}
 	}
 	
-
 	private static final short nameTagKey = TagDict.getInstance().xlate("name");  
 	/**
 	 * Rules to run before converting the element.
 	 */
 	private void preConvertRules(Element el) {
+		if (styleOptionTags != null && styleOptionTags.size() > 0) {
+			Iterator<Entry<Short, String>> iter = styleOptionTags.entryShortIterator();
+			while (iter.hasNext()) {
+				Entry<Short, String> tag = iter.next();
+				el.addTag(tag.getKey(), tag.getValue());
+			}
+		}
 		if (nameTagList == null)
 			return;
 
@@ -721,8 +763,7 @@
 			if ("right".equals(driveOn) && numDriveOnRightRoads == 0 && numDriveOnLeftRoads > 0)
 				log.warn("The drive-on-left flag is NOT set used but tile contains only drive-on-left roads");
 		}		
-		if (dol == null)
-			dol = false; // should not happen
+		assert dol != null;
 		return dol;
 	}
 
Index: doc/options.txt
===================================================================
--- doc/options.txt	(revision 3803)
+++ doc/options.txt	(working copy)
@@ -251,6 +251,18 @@
 directory or zip file containing multiple styles. If --style-file 
 is not used, it selects one of the built-in styles. 
 <p>
+;--style-option
+: 	Provide a semicolon separated list of tags which can be used in the style.
+The intended use is to make a single style more flexible, e.g.
+you may want to use a slightly different set of rules for a map of
+a whole continent. The tags given will be prefixed with "mkgmap:option:".
+If no value is provided the default "true" is used.  
+This option allows to use rules like
+mkgmap:option:light=true & landuse=farmland {remove landuse}
+Example: -- style-option=light;routing=car
+will add the tags mkgmap:option:light=true and mkgmap:option:routing=car
+to each element before style processing happens. 
+<p>                                                            
 ;--list-styles
 : 	List the available styles. If this option is preceded by a style-file
 option then it lists the styles available within that file.
@@ -271,7 +283,7 @@
 : 	Get the tag that will be used to supply the name.  Useful for
 language variations.  You can supply a list and the first one
 will be used.  e.g. --name-tag-list=name:en,int_name,name
-<p>
+<p>                                                            
 ;--map-features=file
 : 	This option is ignored; use the --style-file option instead.
 <p>
Index: doc/styles/internal-tags.txt
===================================================================
--- doc/styles/internal-tags.txt	(revision 3803)
+++ doc/styles/internal-tags.txt	(working copy)
@@ -134,4 +134,5 @@
 | +mkgmap:execute_finalize_rules+  | If set to +true+ mkgmap will execute the finalize rules even if no object is created fot the element.
 | +mkgmap:numbers+  | If set to +false+ for a node or way mkgmap will ignore the object in the calculations for the --housenumber option   
 | +mkgmap:drawLevel+  | Set to a number from 1 to 100. Overrides the polygon area that is used by --order-by-decreasing-area. 1..50 are larger than typical polygons and be overwritten by them, 51..100 are smaller and will show. Higher drawLevels will show over lower values.
+| +mkgmap:option:<key>+  | Tag generated by the --style-option option. 
 |=========================================================
Index: resources/help/en/options
===================================================================
--- resources/help/en/options	(revision 3803)
+++ resources/help/en/options	(working copy)
@@ -249,6 +249,18 @@
 	directory or zip file containing multiple styles. If --style-file 
 	is not used, it selects one of the built-in styles. 
 
+--style-option
+	Provide a semicolon separated list of tags which can be used in the style.
+	The intended use is to make a single style more flexible, e.g.
+	you may want to use a slightly different set of rules for a map of
+	a whole continent. The tags given will be prefixed with "mkgmap:option:".
+	If no value is provided the default "true" is used.  
+	This option allows to use rules like
+	mkgmap:option:light=true & landuse=farmland {remove landuse}
+	Example: -- style-option=light;routing=car
+	will add the tags mkgmap:option:light=true and mkgmap:option:routing=car
+	to each element before style processing happens. 
+
 --list-styles
 	List the available styles. If this option is preceded by a style-file
 	option then it lists the styles available within that file.
