diff --git a/src/uk/me/parabola/imgfmt/app/Coord.java b/src/uk/me/parabola/imgfmt/app/Coord.java
index 335284d..788f058 100644
--- a/src/uk/me/parabola/imgfmt/app/Coord.java
+++ b/src/uk/me/parabola/imgfmt/app/Coord.java
@@ -39,6 +39,7 @@ public class Coord implements Comparable<Coord> {
 	private final int longitude;
 	private byte highwayCount; // number of highways that use this point
 	private boolean onBoundary;	// true if point lies on a boundary
+	private boolean locatedAtNode; // true if point is located at a routing node
 
 	/**
 	 * Construct from co-ordinates that are already in map-units.
@@ -90,6 +91,14 @@ public class Coord implements Comparable<Coord> {
 		this.onBoundary = onBoundary;
 	}
 
+	public boolean locatedAtNode() {
+		return locatedAtNode;
+	}
+
+	public void locatedAtNode(boolean locatedAtNode) {
+		this.locatedAtNode = locatedAtNode;
+	}
+
 	public int hashCode() {
 		return latitude+longitude;
 	}
diff --git a/src/uk/me/parabola/imgfmt/app/CoordNode.java b/src/uk/me/parabola/imgfmt/app/CoordNode.java
index ebcfd58..1207e55 100644
--- a/src/uk/me/parabola/imgfmt/app/CoordNode.java
+++ b/src/uk/me/parabola/imgfmt/app/CoordNode.java
@@ -24,8 +24,6 @@ package uk.me.parabola.imgfmt.app;
  */
 public class CoordNode extends Coord {
 	private final long id;
-	//private int roadCount;
-	private final boolean boundary;
 
 	/**
 	 * Construct from co-ordinates that are already in map-units.
@@ -38,14 +36,11 @@ public class CoordNode extends Coord {
 	public CoordNode(int latitude, int longitude, long id, boolean boundary) {
 		super(latitude, longitude);
 		this.id = id;
-		this.boundary = boundary;
+		setOnBoundary(boundary);
+		locatedAtNode(true);
 	}
 
 	public long getId() {
 		return id;
 	}
-
-	public boolean isBoundary() {
-		return boundary;
-	}
 }
diff --git a/src/uk/me/parabola/imgfmt/app/net/RouteNode.java b/src/uk/me/parabola/imgfmt/app/net/RouteNode.java
index b8ffdcc..4ea1e03 100644
--- a/src/uk/me/parabola/imgfmt/app/net/RouteNode.java
+++ b/src/uk/me/parabola/imgfmt/app/net/RouteNode.java
@@ -80,7 +80,7 @@ public class RouteNode implements Comparable<RouteNode> {
 	public RouteNode(Coord coord) {
 		this.coord = (CoordNode) coord;
 		nodeId = nodeCount++; // XXX: take coord.getId() instead?
-		setBoundary(this.coord.isBoundary());
+		setBoundary(this.coord.getOnBoundary());
 	}
 
 	private boolean haveLargeOffsets() {
diff --git a/src/uk/me/parabola/mkgmap/filters/DouglasPeuckerFilter.java b/src/uk/me/parabola/mkgmap/filters/DouglasPeuckerFilter.java
index 9a9c141..513bf2f 100644
--- a/src/uk/me/parabola/mkgmap/filters/DouglasPeuckerFilter.java
+++ b/src/uk/me/parabola/mkgmap/filters/DouglasPeuckerFilter.java
@@ -79,7 +79,7 @@ public class DouglasPeuckerFilter implements MapFilter {
 			
 			// If a node in the line use the douglas peucker algorithm for upper segment
 			// TODO: Should consider only nodes connected to roads visible at current resolution.
-			if (p instanceof CoordNode) {
+			if (p.locatedAtNode()) {
 				douglasPeucker(coords, i, endIndex, maxErrorDistance);
 				endIndex = i;
 			}
diff --git a/src/uk/me/parabola/mkgmap/filters/RoundCoordsFilter.java b/src/uk/me/parabola/mkgmap/filters/RoundCoordsFilter.java
index 2cdb95b..2f0ed95 100644
--- a/src/uk/me/parabola/mkgmap/filters/RoundCoordsFilter.java
+++ b/src/uk/me/parabola/mkgmap/filters/RoundCoordsFilter.java
@@ -53,7 +53,7 @@ public class RoundCoordsFilter implements MapFilter {
 				int lon = (p.getLongitude() + half) & mask;
 				Coord newP;
 				if(p instanceof CoordNode)
-					newP = new CoordNode(lat, lon, ((CoordNode)p).getId(), ((CoordNode)p).isBoundary());
+					newP = new CoordNode(lat, lon, ((CoordNode)p).getId(), p.getOnBoundary());
 				else
 					newP = new Coord(lat, lon);
 				// only add the new point if it has different
diff --git a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
index 946b883..1bb8128 100644
--- a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
+++ b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
@@ -746,6 +746,7 @@ class Osm5XmlHandler extends DefaultHandler {
 							// or are closer than the minimum distance
 							// allowed but they are not the same point
 							// object
+							p.locatedAtNode(true);
 							if(p != previousNode &&
 							   (p.equals(previousNode) ||
 								(minArcLength > 0 &&
