diff --git a/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java b/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
index b265a28..cc4d006 100644
--- a/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
+++ b/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
@@ -244,6 +244,23 @@ public class StyledConverter implements OsmConverter {
 	}
 
 	void addRoad(Way way, GType gt) {
+
+		if("roundabout".equals(way.getTag("junction"))) {
+			String frigFactorTag = way.getTag("mkgmap:frig_roundabout");
+			if(frigFactorTag != null) {
+				// do special roundabout frigging to make gps
+				// routing prompt use the correct exit number
+				double frigFactor = 0.25; // default
+				try {
+					frigFactor = Double.parseDouble(frigFactorTag);
+				}
+				catch (NumberFormatException nfe) {
+					// relax, tag was probably not a number anyway
+				}
+				frigRoundabout(way, frigFactor);
+			}
+		}
+
 		boolean looped = false;
 		List<Coord> wayPoints = way.getPoints();
 		int numPointsInWay = wayPoints.size();
@@ -377,7 +394,7 @@ public class StyledConverter implements OsmConverter {
 					hasInternalNodes = true;
 				Coord coord = points.get(n);
 				Integer nodeId = nodeIdMap.get(coord);
-				boolean boundary = way.isBoolTag("mkg:boundary_node");
+				boolean boundary = way.isBoolTag("mkgmap:boundary_node");
 				points.set(n, new CoordNode(coord.getLatitude(), coord.getLongitude(), nodeId, boundary));
 				//		System.err.println("Road " + road.getRoadId() + " node[" + i + "] " + nodeId + " at " + coord.toDegreeString());
 			}
@@ -417,4 +434,82 @@ public class StyledConverter implements OsmConverter {
 
 		return trailingWay;
 	}
+
+	// function to add points between adjacent nodes in a roundabout
+	// to make gps use correct exit number in routing instructions
+	void frigRoundabout(Way way, double frigFactor) {
+		List<Coord> wayPoints = way.getPoints();
+		int origNumPoints = wayPoints.size();
+
+		if(origNumPoints < 3) {
+			// forget it!
+			return;
+		}
+
+		int[] highWayCounts = new int[origNumPoints];
+		int middleLat = 0;
+		int middleLon = 0;
+		highWayCounts[0] = wayPoints.get(0).getHighwayCount();
+		for(int i = 1; i < origNumPoints; ++i) {
+			Coord p = wayPoints.get(i);
+			middleLat += p.getLatitude();
+			middleLon += p.getLongitude();
+			highWayCounts[i] = p.getHighwayCount();
+		}
+		middleLat /= origNumPoints - 1;
+		middleLon /= origNumPoints - 1;
+		Coord middleCoord = new Coord(middleLat, middleLon);
+
+		// account for fact that roundabout joins itself
+		--highWayCounts[0];
+		--highWayCounts[origNumPoints - 1];
+
+		for(int i = origNumPoints - 2; i >= 0; --i) {
+			Coord p1 = wayPoints.get(i);
+			Coord p2 = wayPoints.get(i + 1);
+			if(highWayCounts[i] > 1 && highWayCounts[i + 1] > 1) {
+				// both points will be nodes so insert
+				// a new point between them that
+				// (approximately) falls on the
+				// roundabout's perimeter
+				int newLat = (p1.getLatitude() + p2.getLatitude()) / 2;
+				int newLon = (p1.getLongitude() + p2.getLongitude()) / 2;
+				// new point has to be "outside" of
+				// existing line joining p1 and p2 -
+				// how far outside is determined by
+				// the ratio of the distance between
+				// p2 and p2 compared to the distance
+				// of p1 from the "middle" of the
+				// roundabout (aka, the approx radius
+				// of the roundabout) - the higher the
+				// value of frigFactor, the further out
+				// the point will be
+				double scale = 1 + frigFactor * p1.distance(p2) / p1.distance(middleCoord);
+				newLat = (int)((newLat - middleLat) * scale) + middleLat;
+				newLon = (int)((newLon - middleLon) * scale) + middleLon;
+				Coord newPoint = new Coord(newLat, newLon);
+				double d1 = p1.distance(newPoint);
+				double d2 = p2.distance(newPoint);
+				double minDistance = 5;
+				double maxDistance = 100;
+				if(d1 >= minDistance && d1 <= maxDistance &&
+				   d2 >= minDistance && d2 <= maxDistance) {
+				    newPoint.incHighwayCount();
+				    wayPoints.add(i + 1, newPoint);
+				}
+				else {
+				    System.err.println("Not inserting point in roundabout after node " +
+						       i + " " +
+						       way.getName() +
+						       " @ " + 
+						       middleCoord.toDegreeString() +
+						       " (d1 = " +
+						       p1.distance(newPoint) +
+						       " d2 = " +
+						       p2.distance(newPoint) +
+						       ")");
+				}
+			}
+		}
+	}
 }
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 57018db..d9d64d9 100644
--- a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
+++ b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
@@ -75,10 +75,12 @@ class Osm5XmlHandler extends DefaultHandler {
 
 	private final boolean ignoreBounds;
 	private final boolean routing;
+	private final String frigRoundabouts;
 
 	public Osm5XmlHandler(EnhancedProperties props) {
 		ignoreBounds = props.getProperty("ignore-osm-bounds", false);
 		routing = props.containsKey("route");
+		frigRoundabouts = props.getProperty("frig-roundabouts");
 	}
 
 	/**
@@ -217,19 +219,25 @@ class Osm5XmlHandler extends DefaultHandler {
 				if(routing &&
 				   (currentWay.getTag("highway") != null ||
 				    "ferry".equals(currentWay.getTag("route")))) {
-				    // the way is a highway (or ferry
-				    // route), so for each of it's
-				    // points, increment the number of
-				    // highways using that point
-				    for(Coord p : currentWay.getPoints())
-					p.incHighwayCount();
-				    // if the way is a roundabout but isn't
-				    // already flagged as "oneway", flag it here
-				    if(currentWay.getTag("oneway") == null) {
-					String junction = currentWay.getTag("junction");
-					if(junction != null && junction.equals("roundabout"))
-					    currentWay.addTag("oneway", "yes");
-				    }
+					// the way is a highway (or
+				    	// ferry route), so for each
+				    	// of it's points, increment
+				    	// the number of highways
+				    	// using that point
+					for(Coord p : currentWay.getPoints())
+						p.incHighwayCount();
+					// if the way is a roundabout
+					// but isn't already flagged
+					// as "oneway", flag it here
+					if("roundabout".equals(currentWay.getTag("junction"))) {
+						if(currentWay.getTag("oneway") == null) {
+							currentWay.addTag("oneway", "yes");
+						}
+						if(currentWay.getTag("mkgmap:frig_roundabout") == null) {
+							if(frigRoundabouts != null)
+								currentWay.addTag("mkgmap:frig_roundabout", frigRoundabouts);
+						}
+					}
 				}
 				currentWay = null;
 				// ways are processed at the end of the document,
