Index: src/uk/me/parabola/mkgmap/osmstyle/actions/PrependFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/PrependFilter.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/PrependFilter.java	(working copy)
@@ -15,6 +15,7 @@
 
 import java.util.HashMap;
 import java.util.Map;
+import uk.me.parabola.mkgmap.reader.osm.Element;
 
 
 /**
@@ -70,7 +71,7 @@
 		prefix = p;
 	}
 
-	public String doFilter(String value) {
+	public String doFilter(String value, Element el) {
 		return value == null ? null : prefix + value;
 	}
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/HeightFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/HeightFilter.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/HeightFilter.java	(working copy)
@@ -13,6 +13,8 @@
 
 package uk.me.parabola.mkgmap.osmstyle.actions;
 
+import uk.me.parabola.mkgmap.reader.osm.Element;
+
 /**
  * A <code>HeightFilter</code> transforms values into Garmin-tagged elevations.
  *
@@ -26,8 +28,8 @@
 		super(s);
     }
 
-	public String doFilter(String value) {
-		String s = super.doFilter(value);
+	public String doFilter(String value, Element el) {
+		String s = super.doFilter(value, el);
 		if (s != null)
 			s = "\u001f" + s;
 		return s;
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/ValueFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/ValueFilter.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/ValueFilter.java	(working copy)
@@ -16,6 +16,8 @@
  */
 package uk.me.parabola.mkgmap.osmstyle.actions;
 
+import uk.me.parabola.mkgmap.reader.osm.Element;
+
 /**
  * Filter a value.  This is used for special effects and not for the majority
  * of substitutions.
@@ -28,14 +30,14 @@
 public abstract class ValueFilter {
 	private ValueFilter next;
 
-	public final String filter(String value) {
-		String res = doFilter(value);
+	public final String filter(String value, Element el) {
+		String res = doFilter(value, el);
 		if (next != null)
-			res = next.doFilter(res);
+			res = next.doFilter(res, el);
 		return res;
 	}
 
-	protected abstract String doFilter(String value);
+	protected abstract String doFilter(String value, Element el);
 
 	public void add(ValueFilter f) {
 		if (next == null)
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/SubstitutionFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/SubstitutionFilter.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/SubstitutionFilter.java	(working copy)
@@ -12,6 +12,8 @@
  */
 package uk.me.parabola.mkgmap.osmstyle.actions;
 
+import uk.me.parabola.mkgmap.reader.osm.Element;
+
 /**
  * Perform simple string substitution on a value.
  *
@@ -32,7 +34,7 @@
 		}
 	}
 
-	public String doFilter(String value) {
+	public String doFilter(String value, Element el) {
 		if (value == null) return null;
 		if (from == null || to == null)
 			// can't happen!
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/ValueBuilder.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/ValueBuilder.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/ValueBuilder.java	(working copy)
@@ -169,6 +169,8 @@
 			item.addFilter(new HighwaySymbolFilter(arg));
 		} else if (cmd.equals("height")) {
 			item.addFilter(new HeightFilter(arg));
+		} else if (cmd.equals("not-equal")) {
+			item.addFilter(new NotEqualFilter(arg));
 		}
 	}
 
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/ConvertFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/ConvertFilter.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/ConvertFilter.java	(working copy)
@@ -17,6 +17,7 @@
 package uk.me.parabola.mkgmap.osmstyle.actions;
 
 import uk.me.parabola.mkgmap.osmstyle.eval.UnitConversions;
+import uk.me.parabola.mkgmap.reader.osm.Element;
 
 /**
  * Convert a numeric quantity from one set of units to another.
@@ -32,7 +33,7 @@
 		factor = UnitConversions.convertFactor(arg);
 	}
 
-	public String doFilter(String value) {
+	public String doFilter(String value, Element el) {
 		if (value == null) return null;
 		
 		try {
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/DefaultFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/DefaultFilter.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/DefaultFilter.java	(working copy)
@@ -16,6 +16,8 @@
  */
 package uk.me.parabola.mkgmap.osmstyle.actions;
 
+import uk.me.parabola.mkgmap.reader.osm.Element;
+
 /**
  * Provide a default value if there is not one present.
  * Do we really need this?
@@ -28,7 +30,7 @@
 		def = d;
 	}
 
-	public String doFilter(String value) {
+	public String doFilter(String value, Element el) {
 		return value == null || value.length() == 0 ? def : value;
 	}
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/ValueItem.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/ValueItem.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/ValueItem.java	(working copy)
@@ -45,7 +45,7 @@
 			Element e = tagname_is_local ? local_el : el;
 			String tagval = e.getTag(tagname);
 			if (filter != null)
-				value = filter.filter(tagval);
+				value = filter.filter(tagval,el);
 			else
 				value = tagval;
 		}
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/HighwaySymbolFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/HighwaySymbolFilter.java	(revision 1437)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/HighwaySymbolFilter.java	(working copy)
@@ -15,6 +15,7 @@
 
 import java.util.HashMap;
 import java.util.Map;
+import uk.me.parabola.mkgmap.reader.osm.Element;
 
 
 /**
@@ -69,7 +70,7 @@
 
 	}
 
-	public String doFilter(String value) {
+	public String doFilter(String value, Element el) {
 		if (value == null) return value;
 
 		// is it mostly alphabetic?
Index: src/uk/me/parabola/mkgmap/osmstyle/actions/NotEqualFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/actions/NotEqualFilter.java	(revision 0)
+++ src/uk/me/parabola/mkgmap/osmstyle/actions/NotEqualFilter.java	(revision 0)
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2009 Clinton Gladstone
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ */
+
+package uk.me.parabola.mkgmap.osmstyle.actions;
+
+import uk.me.parabola.mkgmap.reader.osm.Element;
+
+/**
+ * This can be used to filter out redundant values.
+ *
+ * The filter checks the equality of a value with another tag's value.
+ * If the two values match, a null string is returned.
+ *
+ * @author Clinton Gladstone
+ */
+public class NotEqualFilter extends ValueFilter {
+
+	private final String tagName; 
+
+	public NotEqualFilter(String s) {
+
+		tagName = s;
+
+	}
+
+	public String doFilter(String value, Element el) {
+		if (value == null) return value;
+
+		String tagValue = el.getTag(tagName);
+
+		if (tagValue == null) return value;
+
+		if (value.equals(tagValue))
+			return null;  // Return nothing if value is identical to the tag's value 
+		else
+			return value;
+
+	}
+}
