Index: /applications/editors/josm/plugins/smed2/src/panels/ShowFrame.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/panels/ShowFrame.java	(revision 30024)
+++ /applications/editors/josm/plugins/smed2/src/panels/ShowFrame.java	(revision 30025)
@@ -12,5 +12,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 
-import seamap.MapHelper;
+import seamap.MapContext;
 import seamap.Renderer;
 import seamap.SeaMap;
@@ -22,5 +22,5 @@
 	Picture picture;
 
-	class Picture extends JPanel implements MapHelper {
+	class Picture extends JPanel implements MapContext {
 		
 		public void drawPicture(OsmPrimitive osm, SeaMap map) {
Index: /applications/editors/josm/plugins/smed2/src/seamap/Lights.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/Lights.java	(revision 30024)
+++ /applications/editors/josm/plugins/smed2/src/seamap/Lights.java	(revision 30025)
@@ -17,6 +17,6 @@
 
 	private static Point2D.Double radial(Snode centre, double radius, double angle) {
-		Point2D origin = Renderer.helper.getPoint(centre);
-		double mile = Renderer.helper.getPoint(Renderer.map.new Snode((centre.lat + Math.toRadians(1/60)), centre.lon)).getY() - origin.getY();
+		Point2D origin = Renderer.context.getPoint(centre);
+		double mile = Renderer.context.getPoint(Renderer.map.new Snode((centre.lat + Math.toRadians(1/60)), centre.lon)).getY() - origin.getY();
 		return new Point2D.Double(origin.getX() - (radius * mile * Math.sin(angle)), origin.getY() - (radius * mile * Math.cos(angle)));
 	}
Index: /applications/editors/josm/plugins/smed2/src/seamap/MapContext.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/MapContext.java	(revision 30025)
+++ /applications/editors/josm/plugins/smed2/src/seamap/MapContext.java	(revision 30025)
@@ -0,0 +1,10 @@
+package seamap;
+
+import java.awt.geom.Point2D;
+
+import seamap.SeaMap.*;
+
+public interface MapContext {
+	Point2D getPoint(Snode coord);
+	double mile(Feature feature);
+}
Index: plications/editors/josm/plugins/smed2/src/seamap/MapHelper.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/MapHelper.java	(revision 30024)
+++ 	(revision )
@@ -1,10 +1,0 @@
-package seamap;
-
-import java.awt.geom.Point2D;
-
-import seamap.SeaMap.*;
-
-public interface MapHelper {
-	Point2D getPoint(Snode coord);
-	double mile(Feature feature);
-}
Index: /applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/Renderer.java	(revision 30024)
+++ /applications/editors/josm/plugins/smed2/src/seamap/Renderer.java	(revision 30025)
@@ -65,5 +65,5 @@
 	public enum LabelStyle { NONE, RRCT, RECT, ELPS, CIRC }
 
-	static MapHelper helper;
+	static MapContext context;
 	static SeaMap map;
 	static double sScale;
@@ -72,8 +72,8 @@
 	static int zoom;
 
-	public static void reRender(Graphics2D g, int z, double factor, SeaMap m, MapHelper h) {
+	public static void reRender(Graphics2D g, int z, double factor, SeaMap m, MapContext c) {
 		g2 = g;
 		zoom = z;
-		helper = h;
+		context = c;
 		map = m;
 		sScale = symbolScale[zoom] * factor;
@@ -107,5 +107,5 @@
 
 	public static void symbol(Feature feature, Symbol symbol, Obj obj, Delta delta, Scheme scheme) {
-		Point2D point = helper.getPoint(feature.centre);
+		Point2D point = context.getPoint(feature.centre);
 		if (obj == null) {
 			Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), delta, scheme);
@@ -177,5 +177,5 @@
 				while (bit.hasNext()) {
 					prev = next;
-					next = helper.getPoint(bit.next());
+					next = context.getPoint(bit.next());
 					angle = Math.atan2(next.getY() - prev.getY(), next.getX() - prev.getX());
 					piv = true;
@@ -233,8 +233,8 @@
 		case LINE:
 			EdgeIterator eit = map.new EdgeIterator(map.edges.get(feature.refs), true);
-			point = helper.getPoint(eit.next());
+			point = context.getPoint(eit.next());
 			p.moveTo(point.getX(), point.getY());
 			while (eit.hasNext()) {
-				point = helper.getPoint(eit.next());
+				point = context.getPoint(eit.next());
 				p.lineTo(point.getX(), point.getY());
 			}
@@ -243,8 +243,8 @@
 			for (Bound bound : map.areas.get(feature.refs)) {
 				BoundIterator bit = map.new BoundIterator(bound);
-				point = helper.getPoint(bit.next());
+				point = context.getPoint(bit.next());
 				p.moveTo(point.getX(), point.getY());
 				while (bit.hasNext()) {
-					point = helper.getPoint(bit.next());
+					point = context.getPoint(bit.next());
 					p.lineTo(point.getX(), point.getY());
 				}
@@ -292,5 +292,5 @@
 			break;
 		}
-		radius *= helper.mile(feature);
+		radius *= context.mile(feature);
 		Symbol circle = new Symbol();
 		if (style.fill != null) {
@@ -301,6 +301,6 @@
 		circle.add(new Instr(Prim.STRK, new BasicStroke(style.width, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, style.dash, 0)));
 		circle.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-radius,-radius,radius*2,radius*2)));
-		Point2D point = helper.getPoint(feature.centre);
-		Symbols.drawSymbol(g2, circle, sScale, point.getX(), point.getY(), null, null);
+		Point2D point = context.getPoint(feature.centre);
+		Symbols.drawSymbol(g2, circle, 1, point.getX(), point.getY(), null, null);
 	}
 
@@ -312,5 +312,5 @@
 		switch (feature.flag) {
 		case POINT:
-			point = helper.getPoint(feature.centre);
+			point = context.getPoint(feature.centre);
 			g2.drawImage(image, new AffineTransformOp(AffineTransform.getScaleInstance(sScale, sScale), AffineTransformOp.TYPE_NEAREST_NEIGHBOR),
 					(int)(point.getX() - (50 * sScale)), (int)(point.getY() - (50 * sScale)));
@@ -319,8 +319,8 @@
 			for (Bound bound : map.areas.get(feature.refs)) {
 				BoundIterator bit = map.new BoundIterator(bound);
-				point = helper.getPoint(bit.next());
+				point = context.getPoint(bit.next());
 				p.moveTo(point.getX(), point.getY());
 				while (bit.hasNext()) {
-					point = helper.getPoint(bit.next());
+					point = context.getPoint(bit.next());
 					p.lineTo(point.getX(), point.getY());
 				}
@@ -340,44 +340,44 @@
     GlyphVector gv = font.deriveFont((float)(font.getSize())).createGlyphVector(frc, str.equals(" ") ? "M" : str);
     Rectangle2D bounds = gv.getVisualBounds();
-    double width = bounds.getWidth() * 1.5;
-    double height = bounds.getHeight() * 1.5;
-    double dx = 0;
-    double dy = 0;
+    double width = bounds.getWidth();
+    double height = bounds.getHeight();
+    double dx = 0.25 * width;
+    double dy = 0.25 * height;
 		switch (delta.h) {
 		case CC:
-			dx = width / 2.0;
-			dy = height / 2.0;
+			dx += width / 2.0;
+			dy += height / 2.0;
 			break;
 		case TL:
-			dx = 0;
-			dy = 0;
+			dx += 0;
+			dy += 0;
 			break;
 		case TR:
-			dx = width;
-			dy = 0;
+			dx += width;
+			dy += 0;
 			break;
 		case TC:
-			dx = width / 2.0;
-			dy = 0;
+			dx += width / 2.0;
+			dy += 0;
 			break;
 		case LC:
-			dx = 0;
-			dy = height / 2.0;
+			dx += 0;
+			dy += height / 2.0;
 			break;
 		case RC:
-			dx = width;
-			dy = height / 2.0;
+			dx += width;
+			dy += height / 2.0;
 			break;
 		case BL:
-			dx = 0;
-			dy = height;
+			dx += 0;
+			dy += height;
 			break;
 		case BR:
-			dx = width;
-			dy = height;
+			dx += width;
+			dy += height;
 			break;
 		case BC:
-			dx = width / 2.0;
-			dy = height;
+			dx += width / 2.0;
+			dy += height;
 			break;
 		}
@@ -386,13 +386,15 @@
 		case RRCT:
 			if (width < height) width = height;
+			width *= 1.5;
+			height *= 1.5;
 			label.add(new Instr(Prim.FILL, bg));
-			label.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(-dx,-dy/1.25,width,height,height,height)));
+			label.add(new Instr(Prim.RSHP, new RoundRectangle2D.Double(-dx,-dy,width,height,height,height)));
 			label.add(new Instr(Prim.FILL, fg));
 			label.add(new Instr(Prim.STRK, new BasicStroke(1 + (int)(height/10), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
-			label.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-dx,-dy/1.25,width,height,height,height)));
+			label.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-dx,-dy,width,height,height,height)));
 			break;
 		}
 		label.add(new Instr(Prim.TEXT, new Caption(str, font, fg, delta)));
-		Point2D point = helper.getPoint(feature.centre);
+		Point2D point = context.getPoint(feature.centre);
 		Symbols.drawSymbol(g2, label, sScale, point.getX(), point.getY(), null, null);
 	}
@@ -431,5 +433,5 @@
 				while (bit.hasNext()) {
 					prev = next;
-					next = helper.getPoint(bit.next());
+					next = context.getPoint(bit.next());
 					angle = Math.atan2(next.getY() - prev.getY(), next.getX() - prev.getX());
 					piv = true;
Index: /applications/editors/josm/plugins/smed2/src/seamap/Rules.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/Rules.java	(revision 30024)
+++ /applications/editors/josm/plugins/smed2/src/seamap/Rules.java	(revision 30025)
@@ -34,5 +34,4 @@
 		ArrayList<Feature> objects;
 		if ((objects = map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) shoreline(feature);
-		if ((objects = map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) shoreline(feature);;
 		if ((objects = map.features.get(Obj.PIPSOL)) != null) for (Feature feature : objects) pipelines(feature);
 		if ((objects = map.features.get(Obj.CBLSUB)) != null) for (Feature feature : objects) cables(feature);
@@ -62,4 +61,5 @@
 		if ((objects = map.features.get(Obj.ACHARE)) != null) for (Feature feature : objects) harbours(feature);
 		if ((objects = map.features.get(Obj.ACHBRT)) != null) for (Feature feature : objects) harbours(feature);
+		if ((objects = map.features.get(Obj.BERTHS)) != null) for (Feature feature : objects) harbours(feature);
 		if ((objects = map.features.get(Obj.LOKBSN)) != null) for (Feature feature : objects) locks(feature);
 		if ((objects = map.features.get(Obj.LKBSPT)) != null) for (Feature feature : objects) locks(feature);
@@ -245,5 +245,6 @@
 			
 		}
-/*      Att_t *attv = getAtt(getObj(item, BRIDGE, 0), VERCLR);
+/*    case BRIDGE: {
+      Att_t *attv = getAtt(getObj(item, BRIDGE, 0), VERCLR);
       if (attv == NULL) attv = getAtt(getObj(item, BRIDGE, 0), VERCSA);
       Att_t *attc = getAtt(getObj(item, BRIDGE, 0), VERCCL);
@@ -254,12 +255,17 @@
       }
       else if ((attc != NULL) && (atto == NULL)) {
+        char *string=strdup(stringValue(attc->val));
+        string = realloc(string, strlen(string) + 3); strcat(string, "/-");
         renderSymbol(item, obja, "clear_v", "", "", CC, 0, 0, 0);
-        drawText(item, stringValue(attc->val), "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 0, 12);
+        drawText(item, string, "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 0, 12);
+        free(string);
       }
       else if ((attc != NULL) && (atto != NULL)) {
-        renderSymbol(item, obja, "clear_v", "", "", RC, 5, 0, 0);
-        drawText(item, stringValue(attc->val), "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", -35, 12);
-        renderSymbol(item, obja, "clear_v", "", "", LC, -5, 0, 0);
-        drawText(item, stringValue(atto->val), "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 35, 12);
+        char *string=strdup(stringValue(attc->val));
+        string = realloc(string, strlen(string) + 2); strcat(string, "/");
+        string = realloc(string, strlen(string) + strlen(stringValue(atto->val)) + 1); strcat(string, stringValue(atto->val));
+        renderSymbol(item, obja, "clear_v", "", "", CC, 0, 0, 0);
+        drawText(item, string, "font-family:Arial; font-weight:normal; font-size:60; text-anchor:middle", 0, 10);
+        free(string);
       }
     }
@@ -318,5 +324,5 @@
 			if (radius != 0) {
 				UniHLU units = (UniHLU)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.HUNITS);
-				Renderer.lineCircle (feature, new LineStyle(new Color(0xc480ff), 10, new float[] { 25, 25 }, null), radius, units);
+				Renderer.lineCircle (feature, new LineStyle(new Color(0xc480ff), 4, new float[] { 10, 10 }, null), radius, units);
 			}
 			break;
@@ -366,4 +372,9 @@
 					break;
 				}
+			}
+			break;
+		case BERTHS:
+			if (zoom >= 14) {
+				Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 40), LabelStyle.RRCT, new Color(0xc480ff), Color.white, null);
 			}
 			break;
@@ -895,49 +906,49 @@
 						break;
 					case ROS_VAIS:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						break;
 					case ROS_VANC:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopNorth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VASC:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopSouth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VAEC:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopEast, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VAWC:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopWest, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VAPL:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopCan, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VASL:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopCone, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VAID:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopIsol, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VASW:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopSphere, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VASP:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopX, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					case ROS_VAWK:
-						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 80)));
+						Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
 						Renderer.symbol(feature, Topmarks.TopCross, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
 						break;
 					}
 				}
-				if (!str.isEmpty()) Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -80)));
+				if (!str.isEmpty()) Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -70)));
 				break;
 			case RADSTA:
Index: /applications/editors/josm/plugins/smed2/src/smed2/MapImage.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/smed2/MapImage.java	(revision 30024)
+++ /applications/editors/josm/plugins/smed2/src/smed2/MapImage.java	(revision 30025)
@@ -29,9 +29,9 @@
 import org.openstreetmap.josm.gui.layer.ImageryLayer;
 
-import seamap.MapHelper;
+import seamap.MapContext;
 import seamap.Renderer;
 import seamap.SeaMap.*;
 
-public class MapImage extends ImageryLayer implements ZoomChangeListener, MapHelper {
+public class MapImage extends ImageryLayer implements ZoomChangeListener, MapContext {
 
 	private Smed2Action dlg;
@@ -102,5 +102,5 @@
 
 	public double mile(Feature feature) {
-		return Math.pow(2, zoom) * 256 / (21600 * Math.abs(Math.cos(feature.centre.lat)));
+		return 185000 / Main.map.mapView.getDist100Pixel();
 	}
 }
Index: /applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java	(revision 30024)
+++ /applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java	(revision 30025)
@@ -12,10 +12,7 @@
 import java.awt.*;
 import java.awt.event.*;
-import java.awt.image.BufferedImage;
-import java.io.File;
 import java.util.*;
 import java.util.Map.Entry;
 
-import javax.imageio.ImageIO;
 import javax.swing.*;
 
