Index: src/uk/me/parabola/imgfmt/app/net/RoadDef.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/net/RoadDef.java	(revision 4717)
+++ src/uk/me/parabola/imgfmt/app/net/RoadDef.java	(working copy)
@@ -155,6 +155,7 @@
 	// for diagnostic purposes
 	private final long id;
 	private final String name;
+	private final boolean fromRelation;
 	
 	// road/address search data from (house) numbers
 	private List<Numbers> numbersList;
@@ -166,9 +167,10 @@
 	
 	private int lenInMeter; 
 	
-	public RoadDef(long id, String name) {
+	public RoadDef(long id, String name, boolean fromRelation) {
 		this.id = id;
 		this.name = name;
+		this.fromRelation = fromRelation;
 	}
 
 	/**
@@ -182,6 +184,7 @@
 		this.id = id;
 		this.offsetNet1 = net1offset;
 		this.name = name;
+		fromRelation = false;
 	}
 
 	// for diagnostic purposes
@@ -190,7 +193,7 @@
 			return "(generated way)";
 
 		// assumes id is an OSM id
-		return "(" + "http://www.openstreetmap.org/way/" + id + ")";
+		return "(" + "http://www.openstreetmap.org/" + (fromRelation ? "relation" : "way") + "/" + id + ")";
 	}
 
 	public String getName() {
Index: src/uk/me/parabola/mkgmap/general/MapRoad.java
===================================================================
--- src/uk/me/parabola/mkgmap/general/MapRoad.java	(revision 4717)
+++ src/uk/me/parabola/mkgmap/general/MapRoad.java	(working copy)
@@ -44,12 +44,12 @@
 	private boolean skipHousenumberProcessing;
 	private boolean namedByHousenumberProcessing;
 	private final int roadId;
-	
-	public MapRoad(int roadId, long OSMid, MapLine line) {
+
+	public MapRoad(int roadId, long OSMid, MapLine line, boolean fromRelation) {
 		super(line);
 		this.roadId = roadId;
 		setPoints(line.getPoints());
-		roadDef = new RoadDef(OSMid, getName());
+		roadDef = new RoadDef(OSMid, getName(), fromRelation);
 	}
 
 	private MapRoad(MapRoad r) {
@@ -185,7 +185,7 @@
 		}
 		return false;
 	}
-	
+
 	public int getLabelPos(String label){
 		if (label == null)
 			return -1;
@@ -198,7 +198,7 @@
 		}
 		return -1;
 	}
-	
+
 	public String toString(){
 		if ((getName() == null || getName().isEmpty()) && getStreet() != null)
 			return "id="+this.getRoadDef().getId() + ", (" + this.getStreet() + ")";
@@ -208,9 +208,8 @@
 
 	public void resetImgData() {
 		roadDef.resetImgData();
-		
 	}
-	
+
 	public int countNodes() {
 		int n = 0;
 		for (Coord p : getPoints()) {
@@ -220,5 +219,4 @@
 		return n;
 	}
 
-	
 }
Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 4717)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(working copy)
@@ -1322,13 +1322,13 @@
 		if (element.tagIsLikeYes(TKM_HIGHEST_RES_ONLY)){
 			ms.setMinResolution(ms.getMaxResolution());
 		}
-		
+
 		if (ms instanceof MapLine && element.tagIsLikeYes(TKM_SKIP_SIZE_FILTER)){
 			((MapLine)ms).setSkipSizeFilter(true);
 		}
 		
 		// Now try to get some address info for POIs
-		
+
 		String country      = element.getTag(TKM_COUNTRY);
 		String region       = element.getTag(TKM_REGION);
 		String city         = element.getTag(TKM_CITY);
@@ -1849,7 +1849,7 @@
 		MapLine line = new MapLine();
 		elementSetup(line, cw.getGType(), way);
 		line.setPoints(points);
-		MapRoad road = new MapRoad(nextRoadId++, way.getId(), line);
+		MapRoad road = new MapRoad(nextRoadId++, way.getOriginalId(), line, way.getOrigElementType() == Element.TYPE_RELATION);
 		if (!routable) {
 			road.skipAddToNOD(true);
 		}
Index: src/uk/me/parabola/mkgmap/reader/osm/Element.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/Element.java	(revision 4717)
+++ src/uk/me/parabola/mkgmap/reader/osm/Element.java	(working copy)
@@ -28,9 +28,9 @@
 public abstract class Element {
 	private static final Logger log = Logger.getLogger(Element.class);
 	
-	private static final byte TYPE_NODE = 1;
-	private static final byte TYPE_WAY = 2;
-	private static final byte TYPE_RELATION = 3;
+	public static final byte TYPE_NODE = 1;
+	public static final byte TYPE_WAY = 2;
+	public static final byte TYPE_RELATION = 3;
 	
 	private Tags tags;
 	private long id;
@@ -252,6 +252,10 @@
 		}
 	}
 
+	public byte getOrigElementType() {
+		return origType;
+	}
+	
 	public String toTagString() {
 		if (tags == null)
 			return "[]";
Index: src/uk/me/parabola/mkgmap/reader/polish/RoadHelper.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/polish/RoadHelper.java	(revision 4717)
+++ src/uk/me/parabola/mkgmap/reader/polish/RoadHelper.java	(working copy)
@@ -124,7 +124,7 @@
 		if (log.isDebugEnabled())
 			log.debug("finishing road id " + roadId);
 
-		MapRoad road = new MapRoad(roadId, roadId, l);
+		MapRoad road = new MapRoad(roadId, roadId, l, false);
 
 		// Set parameters.
 		road.setRoadClass(roadClass);
Index: test/uk/me/parabola/mkgmap/osmstyle/PrefixSuffixFilterTest.java
===================================================================
--- test/uk/me/parabola/mkgmap/osmstyle/PrefixSuffixFilterTest.java	(revision 4717)
+++ test/uk/me/parabola/mkgmap/osmstyle/PrefixSuffixFilterTest.java	(working copy)
@@ -56,7 +56,7 @@
 	private static MapRoad genRoad(String name, String isoCountry) {
 		MapLine line = new MapLine();
 		line.setPoints(Arrays.asList(new Coord(2.0,2.0), new Coord(2.01, 2.0)));
-		MapRoad r = new MapRoad(1, 1, line);
+		MapRoad r = new MapRoad(1, 1, line, false);
 		r.setName(name);
 		r.setCountry(isoCountry);
 		return r;
