Index: /applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
===================================================================
--- /applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java	(revision 32087)
+++ /applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java	(revision 32088)
@@ -83,34 +83,34 @@
 	}
 	
+	static final boolean test = true;
+	
 	public static void tileMap(String idir, int zoom) throws IOException {
 		BufferedImage img;
 		context = new Context();
 
-		int size = 768;
-//		for (int i = 0; i < (12 - zoom); i++) size *= 2;
+		int size = 256;
+		for (int i = 0; i < (12 - zoom); i++) size *= 2;
 		Rectangle rect = new Rectangle(size, size);
-//		img = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_ARGB);
-//		Renderer.reRender(img.createGraphics(), rect, zoom, 0.05, map, context);
-//		ByteArrayOutputStream bos = new ByteArrayOutputStream();
-//		ImageIO.write(img, "png", bos);
-//		empty = bos.size();
-//		tile(zoom, 1, 0, 0);
-//		FileOutputStream fos = new FileOutputStream(dstdir + "tst_" + zoom + "-" + xtile + "-" + ytile + ".png");
-//		bos.writeTo(fos);
-//		fos.close();
-
-//		for (int z = 12; z <= 18; z++) {
-			DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
-			Document document = domImpl.createDocument("http://www.w3.org/2000/svg", "svg", null);
-			SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
-//			svgGenerator.setBackground(Symbols.Bwater);
-			svgGenerator.clearRect(rect.x, rect.y, rect.width, rect.height);
-			svgGenerator.setSVGCanvasSize(rect.getSize());
-			svgGenerator.setClip(rect.x, rect.y, rect.width, rect.height);
-//			svgGenerator.translate(-256, -256);
-			Renderer.reRender(svgGenerator, rect, zoom, 1.0, map, context);
-//			svgGenerator.stream(dstdir + "tst_" + zoom + "-" + xtile + "-" + ytile + ".svg");
-svgGenerator.stream(dstdir);
-//		}
+		img = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_ARGB);
+		Renderer.reRender(img.createGraphics(), rect, zoom, 1.0, map, context);
+		ByteArrayOutputStream bos = new ByteArrayOutputStream();
+		ImageIO.write(img, "png", bos);
+		empty = bos.size();
+
+		if (test) {
+			for (int z = 12; z <= 18; z++) {
+				DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
+				Document document = domImpl.createDocument("http://www.w3.org/2000/svg", "svg", null);
+				SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
+				svgGenerator.clearRect(rect.x, rect.y, rect.width, rect.height);
+				svgGenerator.setSVGCanvasSize(rect.getSize());
+				svgGenerator.setClip(rect.x, rect.y, rect.width, rect.height);
+				svgGenerator.translate(-256, -256);
+				Renderer.reRender(svgGenerator, rect, z, 1.0, map, context);
+				svgGenerator.stream(dstdir + "tst_" + z + "-" + xtile + "-" + ytile + ".svg");
+			}
+		} else {
+			tile(zoom, 1, 0, 0);
+		}
 	}
 	
@@ -180,12 +180,11 @@
 		send = new ArrayList<String>();
 		deletes = new HashMap<String, Boolean>();
-//		BufferedReader in = new BufferedReader(new FileReader(srcdir + zoom + "-" + xtile + "-" + ytile + ".osm"));
-BufferedReader in = new BufferedReader(new FileReader(srcdir));
+		BufferedReader in = new BufferedReader(new FileReader(srcdir + zoom + "-" + xtile + "-" + ytile + ".osm"));
 		map = new S57map(true);
 		S57osm.OSMmap(in, map, false);
 		in.close();
-//		if (zoom == 12) {
-//			clean(12, 0, 0);
-//		}
+		if (zoom == 12) {
+			clean(12, 0, 0);
+		}
 		tileMap(dstdir, zoom);
 //		if ((send.size() + deletes.size()) > 0) {
Index: /applications/editors/josm/plugins/seachart/src/render/Renderer.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/render/Renderer.java	(revision 32087)
+++ /applications/editors/josm/plugins/seachart/src/render/Renderer.java	(revision 32088)
@@ -548,7 +548,7 @@
 	}
 	
-	public static void lightSector(Feature feature, Color col1, Color col2, double radius, double s1, double s2, boolean dir, String str) {
+	public static void lightSector(Feature feature, Color col1, Color col2, double radius, double s1, double s2, Double dir, String str) {
 		if ((zoom >= 16) && (radius > 0.2)) {
-			radius = 0.2 / (Math.pow(2, zoom-16));
+			radius /= (Math.pow(2, zoom-15));
 		}
 		double mid = (((s1 + s2)  / 2) + (s1 > s2 ? 180 : 0)) % 360;
@@ -557,6 +557,6 @@
 		Point2D.Double centre = (Point2D.Double) context.getPoint(feature.geom.centre);
 		double radial = radius * context.mile(feature);
-		if (dir) {
-			g2.draw(new Line2D.Double(centre.x, centre.y, centre.x - radial * Math.sin(Math.toRadians(mid)), centre.y + radial * Math.cos(Math.toRadians(mid))));
+		if (dir != null) {
+			g2.draw(new Line2D.Double(centre.x, centre.y, centre.x - radial * Math.sin(Math.toRadians(dir)), centre.y + radial * Math.cos(Math.toRadians(dir))));
 		} else {
 			if ((s1 != 0.0) || (s2 != 360.0)) {
@@ -574,61 +574,30 @@
 		}
 		if ((str != null) && (!str.isEmpty())) {
-			g2.setPaint(Color.black);
-			g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-	    FontRenderContext frc = g2.getFontRenderContext();
-	    Font font = new Font("Arial", Font.PLAIN, 40);
-	    GeneralPath path = new GeneralPath();
-	    GlyphVector gv = font.deriveFont(font.getSize2D() * (float)sScale).createGlyphVector(frc, (" " + str));
-			double gwidth = gv.getLogicalBounds().getWidth();
-			boolean hand = false;
-	    double offset = 0;
-	    Point2D origin;
-			if (dir) {
-				radial += 10 * sScale;
-				if (mid < 180) {
-					radial += gwidth;
-					hand = true;
-				}
-				origin = new Point2D.Double(centre.x - radial * Math.sin(Math.toRadians(mid)), centre.y + radial * Math.cos(Math.toRadians(mid)));
-		    int length = gv.getNumGlyphs();
-		    for (int i = 0; i < length; i++) {
-					Shape shape = gv.getGlyphOutline(i);
-					Point2D point = gv.getGlyphPosition(i);
-					AffineTransform at = AffineTransform.getTranslateInstance(origin.getX(), origin.getY());
-					at.rotate(Math.toRadians(mid + (hand ? -90 : 90)));
-					at.translate(-point.getX() + offset, -point.getY() + (15 * sScale));
-					path.append(at.createTransformedShape(shape), false);
-					offset += gv.getGlyphMetrics(i).getAdvance();
-					g2.fill(path);
-		    }
-			} else {
-				double arc = (s2 > s1) ? (s2 - s1) : (s2 - s1 + 360);
-				double awidth = (Math.toRadians(arc) * radial);
-				if (gwidth < awidth) {
-					offset = 0;
-					double phi = 0;
-					if ((mid > 270) || (mid < 90)) {
-						hand = true;
-						phi = Math.toRadians(s2) - ((awidth - gwidth) / 2) /radial;
-						radial -= 20 * sScale;
-					} else {
-						phi = Math.toRadians(s1) + (((awidth - gwidth) / 2)) /radial;
-						radial += 20 * sScale;
-					}
-					origin = new Point2D.Double(centre.x - radial * Math.sin(phi), centre.y + radial * Math.cos(phi));
-			    int length = gv.getNumGlyphs();
-			    for (int i = 0; i < length; i++) {
-						Shape shape = gv.getGlyphOutline(i);
-						Point2D point = gv.getGlyphPosition(i);
-						AffineTransform at = AffineTransform.getTranslateInstance(origin.getX(), origin.getY());
-						at.rotate(phi + (hand ? 0 : Math.toRadians(180)));
-						at.translate(-point.getX() + offset, -point.getY());
-						path.append(at.createTransformedShape(shape), false);
-						double advance = gv.getGlyphMetrics(i).getAdvance();
-						offset += advance;
-						phi += (hand ? -0.5 : +0.5) * advance / radial;
-						g2.fill(path);
-			    }
-				}
+			FontRenderContext frc = g2.getFontRenderContext();
+			Font font = new Font("Arial", Font.PLAIN, 40);
+			GlyphVector gv = font.deriveFont(font.getSize2D() * (float)sScale).createGlyphVector(frc, str);
+			double arc = (s2 > s1) ? (s2 - s1) : (s2 - s1 + 360);
+			double awidth = (Math.toRadians(arc) * radial);
+			boolean hand = ((mid > 270) || (mid < 90));
+			double phi = Math.toRadians(mid);
+			radial += 30 * sScale;
+			AffineTransform at = AffineTransform.getTranslateInstance(-radial * Math.sin(phi) / sScale, radial * Math.cos(phi) / sScale);
+			if (gv.getLogicalBounds().getWidth() < awidth) {
+				at.rotate(Math.toRadians(mid + (hand ? 0 : 180)));
+				Renderer.labelText(feature, str, font, Color.black, new Delta(Handle.CC, at));
+			} else if (gv.getLogicalBounds().getHeight() < awidth) {
+				hand = (mid < 180);
+				at.rotate(Math.toRadians(mid + (hand ? -90 : 90)));
+				Renderer.labelText(feature, str, font, Color.black, hand ? new Delta(Handle.RC, at) : new Delta(Handle.LC, at));
+			}
+			if (dir != null) {
+				font = new Font("Arial", Font.PLAIN, 30);
+				str = dir + "°";
+				hand = (dir > 180);
+				phi = Math.toRadians(dir + (hand ? -0.5 : 0.5));
+				radial -= 70 * sScale;
+				at = AffineTransform.getTranslateInstance(-radial * Math.sin(phi) / sScale, radial * Math.cos(phi) / sScale);
+				at.rotate(Math.toRadians(dir + (hand ? 90 : -90)));
+				Renderer.labelText(feature, str, font, Color.black, hand ? new Delta(Handle.BR, at) : new Delta(Handle.BL, at));
 			}
 		}
Index: /applications/editors/josm/plugins/seachart/src/render/Signals.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/render/Signals.java	(revision 32087)
+++ /applications/editors/josm/plugins/seachart/src/render/Signals.java	(revision 32088)
@@ -329,7 +329,7 @@
 					Enum<ColCOL> col2 = null;
 					double radius = 0.2;
-					double s1 = 0;
-					double s2 = 0;
-					boolean dir = false;
+					double s1 = 361;
+					double s2 = 361;
+					Double dir = null;
 					if (atts.containsKey(Att.COLOUR)) {
 						ArrayList<Enum<ColCOL>> cols = (ArrayList<Enum<ColCOL>>) atts.get(Att.COLOUR).val;
@@ -343,19 +343,66 @@
 						radius = (Double) atts.get(Att.LITRAD).val;
 					}
-					if (atts.containsKey(Att.SECTR1)) {
-						s1 = (Double) atts.get(Att.SECTR1).val;
-					} else {
-						continue;
-					}
-					if (atts.containsKey(Att.SECTR2)) {
-						s2 = (Double) atts.get(Att.SECTR2).val;
-					} else {
-						continue;
-					}
 					if (atts.containsKey(Att.CATLIT)) {
 						ArrayList<CatLIT> cats = (ArrayList<CatLIT>) atts.get(Att.CATLIT).val;
 						if (cats.contains(CatLIT.LIT_DIR)) {
-							dir = true;
-						}
+							if (atts.containsKey(Att.ORIENT)) {
+								dir = (Double) atts.get(Att.ORIENT).val;
+								s1 = ((dir - 4) + 360) % 360;
+								s2 = (dir + 4) % 360;
+								for (AttMap satts : lights.values()) {
+									double srad = 0.2;
+									double ss1 = 361;
+									double ss2 = 361;
+									Double sdir = null;
+									if (satts == atts) continue;
+									if (satts.containsKey(Att.LITRAD)) {
+										srad = (Double) satts.get(Att.LITRAD).val;
+									}
+									if (srad == radius) {
+										ArrayList<CatLIT> scats = (satts.containsKey(Att.CATLIT)) ? (ArrayList<CatLIT>) satts.get(Att.CATLIT).val : new ArrayList<CatLIT>();
+										if (scats.contains(CatLIT.LIT_DIR)) {
+											if (satts.containsKey(Att.ORIENT)) {
+												sdir = (Double) satts.get(Att.ORIENT).val;
+												ss1 = sdir;
+												ss2 = sdir;
+											}
+										} else {
+											if (satts.containsKey(Att.SECTR1)) {
+												ss1 = (Double) satts.get(Att.SECTR1).val;
+											}
+											if (satts.containsKey(Att.SECTR2)) {
+												ss2 = (Double) satts.get(Att.SECTR2).val;
+											}
+										}
+										if ((ss1 > 360) || (ss2 > 360)) continue;
+										if (sdir != null) {
+											if (((dir - sdir + 360) % 360) < 8) {
+												s1 = ((((sdir > dir) ? 360 : 0) + sdir + dir) / 2) % 360;
+											}
+											if (((sdir - dir + 360) % 360) < 8) {
+												s2 = ((((dir > sdir) ? 360 : 0) + sdir + dir) / 2) % 360;
+											}
+										} else {
+											if (((dir - ss2 + 360) % 360) < 4) {
+												s1 = ss2;
+											}
+											if (((ss1 - dir + 360) % 360) < 4) {
+												s2 = ss1;
+											}
+										}
+									}
+								}
+							}
+						}
+					}
+					if ((s1 > 360) && atts.containsKey(Att.SECTR1)) {
+						s1 = (Double) atts.get(Att.SECTR1).val;
+					} else if (dir == null) {
+						continue;
+					}
+					if ((s2 > 360) && atts.containsKey(Att.SECTR2)) {
+						s2 = (Double) atts.get(Att.SECTR2).val;
+					} else if (dir == null) {
+						continue;
 					}
 					str = "";
@@ -377,18 +424,6 @@
 						str += "." + df.format(atts.get(Att.SIGPER).val) + "s";
 					}
-					if (dir && atts.containsKey(Att.ORIENT)) {
-						double orient = (Double) atts.get(Att.ORIENT).val;
-						str += " " + orient + "°";
-						s1 = (orient - 4 + 360) % 360;
-						s2 = (orient + 4) % 360;
-						double n1 = 360;
-						double n2 = 360;
-						for (AttMap sect : lights.values()) {
-							if (sect != atts) {
-
-							}
-						}
-					}
-					Renderer.lightSector(feature, LightColours.get(col1), LightColours.get(col2), radius, s1, s2, dir, (Renderer.zoom >= 15) ? str : "");
+					if ((s1 <= 360) && (s2 <= 360) && (s1 != s2))
+						Renderer.lightSector(feature, LightColours.get(col1), LightColours.get(col2), radius, s1, s2, dir, (Renderer.zoom >= 15) ? str : "");
 				}
 			if (Renderer.zoom >= 15) {
@@ -403,9 +438,8 @@
 					double hgt;
 				}
-				str = "";
 				ArrayList<LitSect> litatts = new ArrayList<>();
 				for (AttMap atts : lights.values()) {
 					LitSect sect = new LitSect();
-					sect.dir = (atts.containsKey(Att.CATLIT)) && (atts.get(Att.CATLIT).val == CatLIT.LIT_DIR);
+					sect.dir = (atts.containsKey(Att.CATLIT) && ((ArrayList<CatLIT>)atts.get(Att.CATLIT).val).contains(CatLIT.LIT_DIR));
 					sect.chr = atts.containsKey(Att.LITCHR) ? ((ArrayList<LitCHR>) atts.get(Att.LITCHR).val).get(0) : LitCHR.CHR_UNKN;
 					switch (sect.chr) {
@@ -501,6 +535,5 @@
 					}
 					LitSect tmp = group.get(0);
-					if (tmp.dir)
-						str += "Dir";
+					str = (tmp.dir) ? "Dir" : "";
 					str += LightCharacters.get(tmp.chr);
 					if (!tmp.grp.isEmpty())
@@ -531,5 +564,5 @@
 					cats = (ArrayList<CatLIT>) atts.get(Att.CATLIT).val;
 				}
-				str += (cats.contains(CatLIT.LIT_DIR)) ? "Dir" : "";
+				str = (cats.contains(CatLIT.LIT_DIR)) ? "Dir" : "";
 				str += (atts.containsKey(Att.MLTYLT)) ? atts.get(Att.MLTYLT).val : "";
 				if (atts.containsKey(Att.LITCHR)) {
Index: /applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java	(revision 32087)
+++ /applications/editors/josm/plugins/seachart/src/seachart/SeachartAction.java	(revision 32088)
@@ -113,9 +113,9 @@
 	protected void createChartLayer() {
 		rendering = new ChartImage(new ImageryInfo("SeaChart"));
+		rendering.setBackgroundLayer(true);
 		Main.main.addLayer(rendering);
 		MapView.addEditLayerChangeListener(this);
 		MapView.addLayerChangeListener(this);
 		editLayerChanged(Main.main.getEditLayer(), Main.main.getEditLayer());
-		rendering.setBackgroundLayer(true);
 	}
 
Index: /applications/editors/josm/plugins/seachart/src/symbols/Harbours.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/symbols/Harbours.java	(revision 32087)
+++ /applications/editors/josm/plugins/seachart/src/symbols/Harbours.java	(revision 32088)
@@ -38,5 +38,5 @@
 	public static final Symbol Anchorage = new Symbol();
 	static {
-		Anchorage.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, new Scheme(Symbols.Msymb), null)));
+		Anchorage.add(new Instr(Form.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.67, 0, 0, new Scheme(Symbols.Msymb), null)));
 	}
 	public static final Symbol Bollard = new Symbol();
