Index: src/uk/me/parabola/mkgmap/osmstyle/NearbyPoiHandler.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/NearbyPoiHandler.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/osmstyle/NearbyPoiHandler.java	(working copy)
@@ -431,7 +431,7 @@
 		if (n != null) {
 			sb.append(" for element ");
 			if (FakeIdGenerator.isFakeId(n.getId())) {
-				sb.append("generated from ").append(n.getOriginalId());
+				sb.append(n.getBasicLogInformation());
 			} else {
 				sb.append(n.toBrowseURL()).append(" at ").append(n.getLocation().toOSMURL());
 			}
Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(working copy)
@@ -825,7 +825,7 @@
 		while (pos < points.size()) {
 			int right = Math.min(points.size(), pos + max);
 			Way w = new Way(orig.getId(), points.subList(pos, right));
-			w.setFakeId();
+			w.markAsGeneratedFrom(orig);
 			clippedBorders.add(w);
 			pos += max - 1;
 			if (pos + 1 == points.size())
Index: src/uk/me/parabola/mkgmap/osmstyle/housenumber/HousenumberIvl.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/housenumber/HousenumberIvl.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/osmstyle/housenumber/HousenumberIvl.java	(working copy)
@@ -323,7 +323,7 @@
 		for (Coord co : interpolatedPoints) {
 			hn += usedStep;
 			Node generated = new Node(interpolationWay.getId(), co);
-			generated.setFakeId();
+			generated.markAsGeneratedFrom(interpolationWay);
 			generated.addTag(TKM_STREET, streetName);
 			String number = String.valueOf(hn);
 			generated.addTag(TKM_HOUSENUMBER, number);
@@ -545,7 +545,7 @@
 			else {
 				// create a Node instance 
 				Node toAdd = new Node(houseToAdd.getElement().getId(), houseToAdd.getLocation());
-				toAdd.setFakeId();
+				toAdd.markAsGeneratedFrom(houseToAdd.getElement());
 				toAdd.copyTags(houseToAdd.element);
 				HousenumberElem hnElem = new HousenumberElem(toAdd, houseToAdd.getCityInfo());
 				hnm = new HousenumberMatch(hnElem);
Index: src/uk/me/parabola/mkgmap/reader/osm/CoastlineFileLoader.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/CoastlineFileLoader.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/CoastlineFileLoader.java	(working copy)
@@ -123,7 +123,7 @@
 		for (CoastlineWay w : coastlines) {
 			if (w.getBbox().intersects(bbox)) {
 				Way x = new Way(w.getOriginalId(), w.getPoints());
-				x.setFakeId();
+				x.markAsGeneratedFrom(w);
 				x.addTag("natural", "coastline");
 				ways.add(x);
 			}
Index: src/uk/me/parabola/mkgmap/reader/osm/Element.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/Element.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/Element.java	(working copy)
@@ -28,9 +28,14 @@
 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;
+	
 	private Tags tags;
 	private long id;
 	private long originalId;
+	private byte origType;
 
 	/**
 	 * returns a copy of the tags or a new instance if the element has no tags
@@ -215,10 +220,38 @@
 		originalId = id;
 	}
 
-	public void setFakeId() {
+	/**
+	 * Mark this element as generated from another element. 
+	 * @param orig the original element (used to extract the type) 
+	 */
+	public void markAsGeneratedFrom(Element orig) {
 		id = FakeIdGenerator.makeFakeId();
+		origType = elementToType(orig);
 	}
 	
+	private static byte elementToType(Element orig) {
+		if (orig instanceof Node)
+			return TYPE_NODE;
+		if (orig instanceof Way)
+			return TYPE_WAY;
+		if (orig instanceof Relation)
+			return TYPE_RELATION;
+		throw new IllegalArgumentException("invalid type");
+	}
+
+	public String getOrigElement() {
+		switch (origType) {
+		case TYPE_NODE:
+			return "node";
+		case TYPE_WAY:
+			return "way";
+		case TYPE_RELATION:
+			return "relation";
+		default:
+			throw new IllegalArgumentException("invalid type");
+		}
+	}
+
 	public String toTagString() {
 		if (tags == null)
 			return "[]";
@@ -242,6 +275,7 @@
 	protected void copyIds(Element other) {
 		id = other.id;
 		originalId = other.originalId;
+		origType = other.origType;
 	}
 
 	public String getName() {
@@ -313,6 +347,6 @@
 	public String getBasicLogInformation() {
 		String className = getClass().getSimpleName();
 		return ("GeneralRelation".equals(className)) ? "Relation" : className 
-				+ (FakeIdGenerator.isFakeId(getId()) ? " generated from " : " ") + getOriginalId();
+				+ (FakeIdGenerator.isFakeId(getId()) ? " generated from " + getOrigElement(): "") + " " +  originalId;
 	}
 }
Index: src/uk/me/parabola/mkgmap/reader/osm/LinkDestinationHook.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/LinkDestinationHook.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/LinkDestinationHook.java	(working copy)
@@ -267,7 +267,7 @@
 			if (dist <= maxLength) {
 				// create a new way with the first two points and identical tags
 				Way precedingWay = new Way(w.getOriginalId(), w.getPoints().subList(0, 1 + 1));
-				precedingWay.setFakeId();
+				precedingWay.markAsGeneratedFrom(w);
 				precedingWay.copyTags(w);
 
 				saver.addWay(precedingWay);
@@ -306,7 +306,7 @@
 				// create the new way with identical tags
 				w.getPoints().add(i, cConnection);
 				Way precedingWay = new Way(w.getOriginalId(), new ArrayList<>(w.getPoints().subList(0, i + 1)));
-				precedingWay.setFakeId();
+				precedingWay.markAsGeneratedFrom(w);
 				precedingWay.copyTags(w);
 				
 				saver.addWay(precedingWay);
Index: src/uk/me/parabola/mkgmap/reader/osm/LocationHook.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/LocationHook.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/LocationHook.java	(working copy)
@@ -148,7 +148,7 @@
 				if (mpCenter != null && saver.getBoundingBox().contains(mpCenter)){
 					// create a fake node for which the bounds information is collected
 					Node mpNode = new Node(r.getOriginalId(), mpCenter);
-					mpNode.setFakeId();
+					mpNode.markAsGeneratedFrom(r);
 					processElem(mpNode);
 					// copy the bounds tags back to the multipolygon
 					for (String boundsTag : BoundaryQuadTree.mkgmapTagsArray) {
Index: src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonCutter.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonCutter.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonCutter.java	(working copy)
@@ -237,7 +237,7 @@
 		for (Area area : finishedAreas) {
 			Way w = singularAreaToWay(area, rel.getOriginalId());
 			if (w != null) {
-				w.setFakeId();
+				w.markAsGeneratedFrom(rel);
 				// make sure that equal coords are changed to identical coord instances
 				// this allows merging in the ShapeMerger
 				int n = w.getPoints().size();
Index: src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java	(working copy)
@@ -1070,7 +1070,7 @@
 		// the simple line information should be used.
 		for (Way orgOuterWay : outerWaysForLineTagging) {
 			Way lineTagWay =  new Way(getOriginalId(), orgOuterWay.getPoints());
-			lineTagWay.setFakeId();
+			lineTagWay.markAsGeneratedFrom(this);
 			lineTagWay.addTag(STYLE_FILTER_TAG, STYLE_FILTER_LINE);
 			lineTagWay.addTag(TKM_MP_CREATED, "true");
 			if (mpAreaSizeStr != null) {
@@ -1806,7 +1806,7 @@
 		// the simple line information should be used.
 		for (Way orgOuterWay : outerWaysForLineTagging) {
 			Way lineTagWay =  new Way(getOriginalId(), orgOuterWay.getPoints());
-			lineTagWay.setFakeId();
+			lineTagWay.markAsGeneratedFrom(this);
 			lineTagWay.addTag(STYLE_FILTER_TAG, STYLE_FILTER_LINE);
 			lineTagWay.addTag(TKM_MP_CREATED, "true");
 			for (Entry<String, String> tag : tags.entrySet()) {
@@ -1951,7 +1951,7 @@
 
 		public JoinedWay(Way originalWay) {
 			super(originalWay.getOriginalId(), originalWay.getPoints());
-			setFakeId();
+			markAsGeneratedFrom(originalWay);
 			originalWays = new ArrayList<>();
 			addWay(originalWay);
 
Index: src/uk/me/parabola/mkgmap/reader/osm/POIGeneratorHook.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/POIGeneratorHook.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/POIGeneratorHook.java	(working copy)
@@ -400,7 +400,7 @@
 
 	private Node addPOI(Element source, Coord poiCoord, short poiTypeTagKey, double wayLength) {
 		Node poi = new Node(source.getOriginalId(), poiCoord);
-		poi.setFakeId();
+		poi.markAsGeneratedFrom(source);
 		poi.copyTags(source);
 		poi.deleteTag(MultiPolygonRelation.STYLE_FILTER_TAG);
 		poi.addTag(poiTypeTagKey, "true");
Index: src/uk/me/parabola/mkgmap/reader/osm/SeaGenerator.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/SeaGenerator.java	(revision 4550)
+++ src/uk/me/parabola/mkgmap/reader/osm/SeaGenerator.java	(working copy)
@@ -443,7 +443,7 @@
 			 */
 			// create copy of way that has only the natural=coastline tag
 			Way shore = new Way(way.getOriginalId(), way.getPoints());
-			shore.setFakeId();
+			shore.markAsGeneratedFrom(way);
 			shore.addTag("natural", "coastline");
 			saver.addWay(shore);
 			
@@ -468,7 +468,7 @@
 		if (way.hasIdenticalEndPoints()){
 			// add a copy of this way to be able to draw it as a shape
 			Way shapeWay = new Way(way.getOriginalId(), way.getPoints());
-			shapeWay.setFakeId();
+			shapeWay.markAsGeneratedFrom(way);
 			shapeWay.copyTags(way);
 			// change the tag so that only special rules looking for it are firing
 			shapeWay.deleteTag("natural"); 
@@ -673,7 +673,7 @@
 				for (Way w : seaPrecompWays) {
 					// set a new id to be sure that the precompiled ids do not
 					// interfere with the ids of this run
-					w.setFakeId();
+					w.markAsGeneratedFrom(w);
 
 					if ("land".equals(w.getTag("natural"))) {
 						landWays.add(w);
@@ -791,7 +791,7 @@
 			wm = w1;
 		} else {
 			wm = new Way(w1.getOriginalId(), w1.getPoints());
-			wm.setFakeId();
+			wm.markAsGeneratedFrom(w1);
 			beginMap.put(wm.getFirstPoint(), wm);
 		}
 		beginMap.remove(w2.getFirstPoint());
@@ -1001,7 +1001,7 @@
 				toBeRemoved.add(segment);
 				for (List<Coord> pts : clipped) {
 					Way shore = new Way(segment.getOriginalId(), pts);
-					shore.setFakeId();
+					shore.markAsGeneratedFrom(segment);
 					toBeAdded.add(shore);
 				}
 			}
@@ -1090,7 +1090,7 @@
 				wm = w1;
 			} else {
 				wm = new Way(w1.getOriginalId());
-				wm.setFakeId();
+				wm.markAsGeneratedFrom(w1);
 				shoreline.remove(w1);
 				shoreline.add(wm);
 				wm.getPoints().addAll(w1.getPoints());
