Index: /applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
===================================================================
--- /applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java	(revision 31027)
+++ /applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java	(revision 31028)
@@ -12,4 +12,5 @@
 import java.awt.Dimension;
 import java.awt.Graphics2D;
+import java.awt.Rectangle;
 import java.awt.geom.Point2D;
 import java.awt.image.BufferedImage;
@@ -209,23 +210,27 @@
 		}
 		
-/*		img = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
-		Renderer.reRender(img.createGraphics(), 12, 1, map, context);
+//		img = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB);
+		Rectangle rect = new Rectangle(2048, 2048);
+		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);
-*/
+//		empty = bos.size();
+//		tile(zoom, 1, 0, 0);
+		FileOutputStream fos = new FileOutputStream(dstdir + "tst_" + zoom + ".png");
+		bos.writeTo(fos);
+		fos.close();
+
 //		for (int z = 12; z <= 18; z++) {
-int z = 9;
 			DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
 			Document document = domImpl.createDocument("http://www.w3.org/2000/svg", "svg", null);
 			SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
 			svgGenerator.setBackground(Rules.Bwater);
-			svgGenerator.clearRect(0, 0, 2048, 2048);
-			svgGenerator.setSVGCanvasSize(new Dimension(2048, 2048));
-			svgGenerator.setClip(0, 0, 2048, 2048);
-//			svgGenerator.translate(-2048, -2048);
-			Renderer.reRender(svgGenerator, z, 0.05, map, context);
-			svgGenerator.stream(dstdir + "tst_" + z + ".svg");
+			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, 0.05, map, context);
+			svgGenerator.stream(dstdir + "tst_" + zoom + ".svg");
 //		}
 	}
@@ -239,5 +244,5 @@
 		g2.scale(s, s);
 		g2.translate(-(256 + (xn * 256 / s)), -(256 + (yn * 256 / s)));
-		Renderer.reRender(g2, zoom, 1, map, context);
+		Renderer.reRender(g2, new Rectangle(256, 256), zoom, 1, map, context);
 		ByteArrayOutputStream bos = new ByteArrayOutputStream();
 		ImageIO.write(img, "png", bos);
Index: /applications/editors/josm/plugins/seachart/src/render/Renderer.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/render/Renderer.java	(revision 31027)
+++ /applications/editors/josm/plugins/seachart/src/render/Renderer.java	(revision 31028)
@@ -19,5 +19,4 @@
 import s57.S57val.*;
 import s57.S57map;
-import s57.S57obj.Obj;
 import s57.S57map.*;
 import symbols.Areas;
@@ -37,5 +36,5 @@
 	static int zoom;
 
-	public static void reRender(Graphics2D g, int z, double factor, S57map m, ChartContext c) {
+	public static void reRender(Graphics2D g, Rectangle rect, int z, double factor, S57map m, ChartContext c) {
 		g2 = g;
 		zoom = z;
@@ -44,4 +43,6 @@
 		sScale = symbolScale[zoom] * factor;
 		if (map != null) {
+			g2.setBackground(Rules.Bwater);
+			g2.clearRect(rect.x, rect.y, rect.width, rect.height);
 			g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
 			g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
Index: /applications/editors/josm/plugins/seachart/src/render/Rules.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/render/Rules.java	(revision 31027)
+++ /applications/editors/josm/plugins/seachart/src/render/Rules.java	(revision 31028)
@@ -282,5 +282,5 @@
 		switch (feature.type) {
 		case BUAARE:
-			Renderer.lineVector(feature, new LineStyle(new Color(0x40000000, true)));
+			Renderer.lineVector(feature, new LineStyle(new Color(0x20000000, true)));
 			break;
 		case COALNE:
@@ -289,5 +289,5 @@
 		case DEPARE:
 			Double depmax = 0.0;
-			if (((depmax = (Double) getAttVal(feature, feature.type, 0, Att.DRVAL2)) != null) && (depmax <= 0.0)) {
+			if (((depmax = (Double) getAttVal(feature, Obj.DEPARE, 0, Att.DRVAL2)) != null) && (depmax <= 0.0)) {
 				Renderer.lineVector(feature, new LineStyle(Gdries));
 			}
Index: /applications/editors/josm/plugins/seachart/src/s57/S57map.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 31027)
+++ /applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 31028)
@@ -233,6 +233,4 @@
 	}
 	
-	ArrayList<OSMtag> osmtags;
-
 	public NodeTab nodes;
 	public EdgeTab edges;
@@ -389,5 +387,4 @@
 		feature.geom.prim = Pflag.POINT;
 		feature.geom.elems.add(new Prim(id));
-		osmtags = new ArrayList<OSMtag>();
 		edge = null;
 	}
@@ -398,5 +395,4 @@
 		feature.geom.prim = Pflag.LINE;
 		feature.geom.elems.add(new Prim(id));
-		osmtags = new ArrayList<OSMtag>();
 		edge = new Edge();
 	}
@@ -418,5 +414,4 @@
 		feature.reln = Rflag.UNKN;
 		feature.geom.prim = Pflag.AREA;
-		osmtags = new ArrayList<OSMtag>();
 		edge = null;
 	}
@@ -479,11 +474,5 @@
 			}
 		} else {
-			osmtags.add(new OSMtag(key, val));
-		}
-	}
-
-	public void tagsDone(long id) {
-		for (OSMtag tag : osmtags) {
-			KeyVal kv = S57osm.OSMtag(tag.key, tag.val);
+			KeyVal kv = S57osm.OSMtag(key, val);
 			if (kv.obj != Obj.UNKOBJ) {
 				if (feature.type == Obj.UNKOBJ) {
@@ -503,7 +492,9 @@
 					atts.put(kv.att, new AttVal(kv.att, kv.conv, kv.val));
 				}
-				break;
-			}
-		}
+			}
+		}
+	}
+
+	public void tagsDone(long id) {
 		switch (feature.geom.prim) {
 		case POINT:
Index: /applications/editors/josm/plugins/seachart/src/s57/S57osm.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/s57/S57osm.java	(revision 31027)
+++ /applications/editors/josm/plugins/seachart/src/s57/S57osm.java	(revision 31028)
@@ -38,5 +38,5 @@
 		OSMtags.put("waterway=canal", new KeyVal<>(Obj.CANALS, Att.UNKATT, null, null)); OSMtags.put("waterway=dock", new KeyVal<>(Obj.HRBBSN, Att.UNKATT, null, null));
 		OSMtags.put("waterway=lock", new KeyVal<>(Obj.HRBBSN, Att.UNKATT, null, null)); 
-		OSMtags.put("wetland=tidalflat", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (double)0)); OSMtags.put("tidal=yes", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (double)0));
+		OSMtags.put("wetland=tidalflat", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (double)0)); OSMtags.put("tidal=yes", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (Double)0.0));
 		OSMtags.put("natural=mud", new KeyVal<>(Obj.DEPARE, Att.UNKATT, null, null)); OSMtags.put("natural=sand", new KeyVal<>(Obj.DEPARE, Att.UNKATT, null, null));
 		OSMtags.put("highway=motorway", new KeyVal<>(Obj.ROADWY, Att.CATROD, Conv.E, CatROD.ROD_MWAY)); OSMtags.put("highway=trunk", new KeyVal<>(Obj.ROADWY, Att.CATROD, Conv.E, CatROD.ROD_MAJR));
Index: /applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java	(revision 31027)
+++ /applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java	(revision 31028)
@@ -66,7 +66,5 @@
 	public void paint(Graphics2D g2, MapView mv, Bounds bb) {
 		Rectangle rect = Main.map.mapView.getBounds();
-		g2.setBackground(Rules.Bwater);
-		g2.clearRect(rect.x, rect.y, rect.width, rect.height);
-		Renderer.reRender(g2, zoom, Math.pow(2, (zoom-12)), SeachartAction.map, this);
+		Renderer.reRender(g2, rect, zoom, Math.pow(2, (zoom-12)), SeachartAction.map, this);
 		g2.setPaint(Color.black);
 		g2.setFont(new Font("Arial", Font.BOLD, 20));
