Index: src/uk/me/parabola/mkgmap/main/StyleTester.java
===================================================================
--- src/uk/me/parabola/mkgmap/main/StyleTester.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/main/StyleTester.java	(working copy)
@@ -306,9 +306,6 @@
 		converter.convertRelation(relation);
 	}
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
-	}
-
 	public void setBoundingBox(Area bbox) {
 		converter.setBoundingBox(bbox);
 	}
@@ -701,10 +698,6 @@
 					return true;
 				return false;
 			}
-
-			public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
-			}
-
 		}
 
 		/**
Index: src/uk/me/parabola/mkgmap/osmstyle/ActionRule.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/ActionRule.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/ActionRule.java	(working copy)
@@ -188,8 +188,9 @@
 		return expression.toString().contains(exp);
 	}
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
-		expression.augmentWith(elementSaver);
+	@Override
+	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
+		expression.augmentWith(elementSaver, isLineRule);
 	}
 
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/ExpressionRule.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/ExpressionRule.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/ExpressionRule.java	(working copy)
@@ -117,8 +117,9 @@
 		return expression.toString().contains(exp);
 	}
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
-		expression.augmentWith(elementSaver);
+	@Override
+	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
+		expression.augmentWith(elementSaver, isLineRule);
 	}
 
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/RuleSet.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/RuleSet.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/RuleSet.java	(working copy)
@@ -312,11 +312,12 @@
 		return candidates;
 	}
 	
-    public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
-	if (rules == null)
-	    return;
-	for (Rule rule: rules)
-	    rule.augmentWith(elementSaver);
-    }
+	@Override
+	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
+		if (rules == null)
+			return;
+		for (Rule rule: rules)
+			rule.augmentWith(elementSaver, isLineRule);
+	}
 			     
 } 
Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(working copy)
@@ -698,12 +698,13 @@
 	 *
 	 * @param elementSaver Gives access to the pre-converted OSM data
 	 */
+	@Override
 	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
 		// wayRules doesn't need to be done (or must be done first) because is concat. of line & polygon rules
-		//wayRules.augmentWith(elementSaver);
-		nodeRules.augmentWith(elementSaver);
-		lineRules.augmentWith(elementSaver);
-		polygonRules.augmentWith(elementSaver);
+		//wayRules.augmentWith(elementSaver, both);
+		nodeRules.augmentWith(elementSaver, false);
+		lineRules.augmentWith(elementSaver, true);
+		polygonRules.augmentWith(elementSaver, false);
 	}
 
 	/**
Index: src/uk/me/parabola/mkgmap/osmstyle/eval/AbstractBinaryOp.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/eval/AbstractBinaryOp.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/eval/AbstractBinaryOp.java	(working copy)
@@ -68,9 +68,9 @@
 	}
 
 	@Override
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
-		first.augmentWith(elementSaver);
-		second.augmentWith(elementSaver);
+	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
+		first.augmentWith(elementSaver, isLineRule);
+		second.augmentWith(elementSaver, isLineRule);
 	}
 
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/eval/AbstractOp.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/eval/AbstractOp.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/eval/AbstractOp.java	(working copy)
@@ -218,9 +218,10 @@
 			
 	}
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
+	@Override
+	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
 		if (first != null)
-			first.augmentWith(elementSaver);
+			first.augmentWith(elementSaver, isLineRule);
 	}
 
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/eval/LinkedOp.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/eval/LinkedOp.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/eval/LinkedOp.java	(working copy)
@@ -170,11 +170,12 @@
 		return wrapped.getEvaluatedTagKeys();
 	}
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
+	@Override
+	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
 		if (wrapped != null)	    
-			wrapped.augmentWith(elementSaver);
+			wrapped.augmentWith(elementSaver, isLineRule);
 		if (link != null)	    
-			link.augmentWith(elementSaver);
+			link.augmentWith(elementSaver, isLineRule);
 	}
 
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/eval/Op.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/eval/Op.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/eval/Op.java	(working copy)
@@ -136,6 +136,7 @@
 			return this;
 	}
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver);
+	public default void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
+	}
     
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/function/IsInFunction.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/function/IsInFunction.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/osmstyle/function/IsInFunction.java	(working copy)
@@ -57,6 +57,7 @@
 public class IsInFunction extends StyleFunction {
 	private static final Logger log = Logger.getLogger(IsInFunction.class);
 	private static final boolean SIMULATE_UNIT_TEST = false; 
+	private boolean isLineRule; 
 
 	private ElementQuadTree qt;
 
@@ -241,7 +242,8 @@
 	}
 
 	@Override
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
+	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
+		this.isLineRule = isLineRule;
 		List<Element> matchingPolygons = new ArrayList<>();
 		for (Way w : elementSaver.getWays().values()) {
 			if (w.isComplete() && w.hasIdenticalEndPoints()
Index: src/uk/me/parabola/mkgmap/reader/osm/OsmConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/OsmConverter.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/reader/osm/OsmConverter.java	(working copy)
@@ -54,7 +54,8 @@
 	 */
 	public void convertRelation(Relation relation);
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver);
+	public default void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
+	}
 
 	/**
 	 * Set the bounding box for this map.  This should be set before any other
Index: src/uk/me/parabola/mkgmap/reader/osm/Rule.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/Rule.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/reader/osm/Rule.java	(working copy)
@@ -59,6 +59,7 @@
 
 	public boolean containsExpression(String exp);
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver);
-	
+	public default void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver, boolean isLineRule) {
+	}
+
 }
Index: src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryConverter.java	(revision 4410)
+++ src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryConverter.java	(working copy)
@@ -37,9 +37,6 @@
 	public void convertNode(Node node) {
 	}
 
-	public void augmentWith(uk.me.parabola.mkgmap.reader.osm.ElementSaver elementSaver) {
-	}
-    
 	@Override
 	public void convertRelation(Relation relation) {
 		if (relation instanceof BoundaryRelation) {
