Index: /applications/editors/josm/plugins/seachart/src/render/Rules.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/render/Rules.java	(revision 30991)
+++ /applications/editors/josm/plugins/seachart/src/render/Rules.java	(revision 30992)
@@ -17,4 +17,5 @@
 import java.util.HashMap;
 
+import s57.S57val;
 import s57.S57val.*;
 import s57.S57att.*;
@@ -27,5 +28,6 @@
 public class Rules {
 
-	public static final Color Yland = new Color(0x50b0ff);
+	public static final Color Yland = new Color(0xeca818);
+	public static final Color Bwater = new Color(0x2ea8d8);
 	public static final Color Mline = new Color(0xc480ff);
 	public static final Color Msymb = new Color(0xa30075);
@@ -113,16 +115,38 @@
 	}
 	
+	public static String getAttStr(Feature feature, Obj obj, int idx, Att att) {
+		String str = (String)getAttVal(feature, obj, idx, att);
+		if (str != null) {
+			return str;
+		}
+		return ""; 
+	}
+	
+	public static Enum<?> getAttEnum(Feature feature, Obj obj, int idx, Att att) {
+		ArrayList<?> list = (ArrayList<?>)getAttVal(feature, obj, idx, att);
+		if (list != null) {
+			return ((ArrayList<Enum>)list).get(0);
+		}
+		return S57val.unknAtt(att);
+	}
+	
+	public static ArrayList<?> getAttList(Feature feature, Obj obj, int idx, Att att) {
+		ArrayList<Enum<?>> list = (ArrayList<Enum<?>>)getAttVal(feature, obj, idx, att);
+		if (list != null) {
+			return list;
+		}
+		list = new ArrayList<>();
+		list.add(S57val.unknAtt(att));
+		return list; 
+	}
+	
 	static Scheme getScheme(Feature feature, Obj obj) {
 		ArrayList<Color> colours = new ArrayList<Color>();
-		if (colours.size() > 0) {
-			for (ColCOL col : (ArrayList<ColCOL>) getAttVal(feature, obj, 0, Att.COLOUR)) {
-				colours.add(bodyColours.get(col));
-			}
+		for (ColCOL col : (ArrayList<ColCOL>) getAttList(feature, obj, 0, Att.COLOUR)) {
+			colours.add(bodyColours.get(col));
 		}
 		ArrayList<Patt> patterns = new ArrayList<Patt>();
-		if (patterns.size() > 0) {
-			for (ColPAT pat : (ArrayList<ColPAT>) getAttVal(feature, obj, 0, Att.COLPAT)) {
-				patterns.add(pattMap.get(pat));
-			}
+		for (ColPAT pat : (ArrayList<ColPAT>) getAttList(feature, obj, 0, Att.COLPAT)) {
+			patterns.add(pattMap.get(pat));
 		}
 		return new Scheme(patterns, colours);
@@ -152,4 +176,5 @@
 	public static void rules () {
 		ArrayList<Feature> objects;
+		if ((objects = Renderer.map.features.get(Obj.COALNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature);
 		if ((objects = Renderer.map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) shoreline(feature);
 		if ((objects = Renderer.map.features.get(Obj.PIPSOL)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) pipelines(feature);
@@ -229,4 +254,7 @@
 		String name = getName(feature);
 		switch (feature.type) {
+		case COALNE:
+			Renderer.lineVector(feature, new LineStyle(Color.black, 8, Yland));
+			break;
 		case DRGARE:
 			if (Renderer.zoom < 16)
@@ -274,53 +302,50 @@
 			break;
 		case SEAARE:
-			CatSEA cat;
-			if ((cat = (CatSEA) getAttVal(feature, feature.type, 0, Att.CATSEA)) != null) {
-				switch (cat) {
-				case SEA_RECH:
-					if ((Renderer.zoom >= 10) && (name != null))
-						if (feature.geom.prim == Pflag.LINE) {
-							Renderer.lineText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);
-						} else {
-							Renderer.labelText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
+			switch ((CatSEA) getAttEnum(feature, feature.type, 0, Att.CATSEA)) {
+			case SEA_RECH:
+				if ((Renderer.zoom >= 10) && (name != null))
+					if (feature.geom.prim == Pflag.LINE) {
+						Renderer.lineText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);
+					} else {
+						Renderer.labelText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
+					}
+				break;
+			case SEA_BAY:
+				if ((Renderer.zoom >= 12) && (name != null))
+					if (feature.geom.prim == Pflag.LINE) {
+						Renderer.lineText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);
+					} else {
+						Renderer.labelText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
+					}
+				break;
+			case SEA_SHOL:
+				if (Renderer.zoom >= 14) {
+					if (feature.geom.prim == Pflag.AREA) {
+						Renderer.lineVector(feature, new LineStyle(new Color(0xc480ff), 4, new float[] { 25, 25 }));
+						if (name != null) {
+							Renderer.labelText(feature, name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
+							Renderer.labelText(feature, "(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC));
 						}
-					break;
-				case SEA_BAY:
-					if ((Renderer.zoom >= 12) && (name != null))
-						if (feature.geom.prim == Pflag.LINE) {
-							Renderer.lineText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);
-						} else {
-							Renderer.labelText(feature, name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
+					} else if (feature.geom.prim == Pflag.LINE) {
+						if (name != null) {
+							Renderer.lineText(feature, name, new Font("Arial", Font.ITALIC, 75), Color.black, 0.5, -40);
+							Renderer.lineText(feature, "(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, 0);
 						}
-					break;
-				case SEA_SHOL:
-					if (Renderer.zoom >= 14) {
-						if (feature.geom.prim == Pflag.AREA) {
-							Renderer.lineVector(feature, new LineStyle(new Color(0xc480ff), 4, new float[] { 25, 25 }));
-							if (name != null) {
-								Renderer.labelText(feature, name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
-								Renderer.labelText(feature, "(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC));
-							}
-						} else if (feature.geom.prim == Pflag.LINE) {
-							if (name != null) {
-								Renderer.lineText(feature, name, new Font("Arial", Font.ITALIC, 75), Color.black, 0.5, -40);
-								Renderer.lineText(feature, "(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, 0);
-							}
-						} else {
-							if (name != null) {
-								Renderer.labelText(feature, name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
-								Renderer.labelText(feature, "(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC));
-							}
+					} else {
+						if (name != null) {
+							Renderer.labelText(feature, name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));
+							Renderer.labelText(feature, "(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC));
 						}
 					}
-					break;
-				case SEA_GAT:
-				case SEA_NRRW:
-					addName(feature, 12, new Font("Arial", Font.PLAIN, 100));
-					break;
-				default:
-					break;
-				}
-				break;
-			}
+				}
+				break;
+			case SEA_GAT:
+			case SEA_NRRW:
+				addName(feature, 12, new Font("Arial", Font.PLAIN, 100));
+				break;
+			default:
+				break;
+			}
+			break;
 		case SNDWAV:
 			if (Renderer.zoom >= 12) Renderer.fillPattern(feature, Areas.Sandwaves);
@@ -340,47 +365,42 @@
 	private static void beacons(Feature feature) {
 		if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BCNLAT) || (feature.type == Obj.BCNCAR)))) {
-			CatLAM cat;
-			BcnSHP shape = (BcnSHP) getAttVal(feature, feature.type, 0, Att.BCNSHP);
-			if (shape == null)
+			BcnSHP shape = (BcnSHP)getAttEnum(feature, feature.type, 0, Att.BCNSHP);
+			if (shape == BcnSHP.BCN_UNKN)
 				shape = BcnSHP.BCN_PILE;
 			if ((shape == BcnSHP.BCN_WTHY) && (feature.type == Obj.BCNLAT)) {
-				if ((cat = (CatLAM) getAttVal(feature, feature.type, 0, Att.CATLAM)) != null) {
-					switch (cat) {
-					case LAM_PORT:
-						Renderer.symbol(feature, Beacons.WithyPort);
-						break;
-					case LAM_STBD:
-						Renderer.symbol(feature, Beacons.WithyStarboard);
-						break;
-					default:
-						Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type));
-					}
+				switch ((CatLAM) getAttEnum(feature, feature.type, 0, Att.CATLAM)) {
+				case LAM_PORT:
+					Renderer.symbol(feature, Beacons.WithyPort);
+					break;
+				case LAM_STBD:
+					Renderer.symbol(feature, Beacons.WithyStarboard);
+					break;
+				default:
+					Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type));
 				}
 			} else if ((shape == BcnSHP.BCN_PRCH) && (feature.type == Obj.BCNLAT) && !(feature.objs.containsKey(Obj.TOPMAR))) {
-				if ((cat = (CatLAM) getAttVal(feature, feature.type, 0, Att.CATLAM)) != null) {
-					switch (cat) {
-					case LAM_PORT:
-						Renderer.symbol(feature, Beacons.PerchPort);
-						break;
-					case LAM_STBD:
-						Renderer.symbol(feature, Beacons.PerchStarboard);
-						break;
-					default:
-						Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type));
-					}
-				} else {
-					Renderer.symbol(feature, Beacons.Shapes.get(shape), getScheme(feature, feature.type));
-					if (feature.objs.containsKey(Obj.TOPMAR)) {
-						Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val);
-						if (topmark != null)
-							Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.TOPMAR), Topmarks.BeaconDelta);
-					} else if (feature.objs.containsKey(Obj.DAYMAR)) {
-						Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val);
-						if (topmark != null)
-							Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.DAYMAR), Topmarks.BeaconDelta);
-					}
-				}
-				Signals.addSignals(feature);
-			}
+				switch ((CatLAM) getAttEnum(feature, feature.type, 0, Att.CATLAM)) {
+				case LAM_PORT:
+					Renderer.symbol(feature, Beacons.PerchPort);
+					break;
+				case LAM_STBD:
+					Renderer.symbol(feature, Beacons.PerchStarboard);
+					break;
+				default:
+					Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type));
+				}
+			} else {
+				Renderer.symbol(feature, Beacons.Shapes.get(shape), getScheme(feature, feature.type));
+				if (feature.objs.containsKey(Obj.TOPMAR)) {
+					Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val);
+					if (topmark != null)
+						Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.TOPMAR), Topmarks.BeaconDelta);
+				} else if (feature.objs.containsKey(Obj.DAYMAR)) {
+					Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val);
+					if (topmark != null)
+						Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.DAYMAR), Topmarks.BeaconDelta);
+				}
+			}
+			Signals.addSignals(feature);
 		}
 	}
@@ -388,6 +408,6 @@
 	private static void buoys(Feature feature) {
 		if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BOYLAT) || (feature.type == Obj.BOYCAR)))) {
-			BoySHP shape = (BoySHP) getAttVal(feature, feature.type, 0, Att.BOYSHP);
-			if (shape == null) shape = BoySHP.BOY_PILR;
+			BoySHP shape = (BoySHP) getAttEnum(feature, feature.type, 0, Att.BOYSHP);
+			if (shape == BoySHP.BOY_UNKN) shape = BoySHP.BOY_PILR;
 			Renderer.symbol(feature, Buoys.Shapes.get(shape), getScheme(feature, feature.type));
 			if (feature.objs.containsKey(Obj.TOPMAR)) {
@@ -474,9 +494,7 @@
 		if (Renderer.zoom >= 14) {
 			Symbol symb = Harbours.CallPoint2;
-			TrfTRF trf;
-			if ((trf = (TrfTRF) getAttVal(feature, feature.type, 0, Att.TRAFIC)) != null) {
-				if (trf != TrfTRF.TRF_TWOW) {
-					symb = Harbours.CallPoint1;
-				}
+			TrfTRF trf = (TrfTRF) getAttEnum(feature, feature.type, 0, Att.TRAFIC);
+			if (trf != TrfTRF.TRF_TWOW) {
+				symb = Harbours.CallPoint1;
 			}
 			Double orient = 0.0;
@@ -486,5 +504,5 @@
 			Renderer.symbol(feature, symb, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(orient))));
 			String chn;
-			if ((chn = (String) getAttVal(feature, feature.type, 0, Att.COMCHA)) != null) {
+			if (!(chn = getAttStr(feature, feature.type, 0, Att.COMCHA)).isEmpty()) {
 				Renderer.labelText(feature, ("Ch." + chn), new Font("Arial", Font.PLAIN, 50), Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,50)));
 			}
@@ -571,8 +589,13 @@
 				}
 			}
-			double radius = (Double)getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS);
-			if (radius != 0) {
-				UniHLU units = (UniHLU)getAttVal(feature, Obj.ACHBRT, 0, Att.HUNITS);
-				Renderer.lineCircle (feature, new LineStyle(Mline, 4, new float[] { 10, 10 }, null), radius, units);
+			if (getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS) != null) {
+				double radius;
+				if ((radius = (Double) getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS)) != 0) {
+					UniHLU units = (UniHLU) getAttEnum(feature, Obj.ACHBRT, 0, Att.HUNITS);
+					if (units == UniHLU.HLU_UNKN) {
+						units = UniHLU.HLU_METR;
+					}
+					Renderer.lineCircle(feature, new LineStyle(Mline, 4, new float[] { 10, 10 }, null), radius, units);
+				}
 			}
 			break;
@@ -586,40 +609,38 @@
 				}
 				addName(feature, 15, new Font("Arial", Font.BOLD, 60), Mline, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));
-				ArrayList<StsSTS> sts = (ArrayList<StsSTS>)getAttVal(feature, Obj.ACHARE, 0, Att.STATUS);
-				if ((Renderer.zoom >= 15) && (sts != null) && (sts.contains(StsSTS.STS_RESV))) {
+				ArrayList<StsSTS> sts = (ArrayList<StsSTS>)getAttList(feature, Obj.ACHARE, 0, Att.STATUS);
+				if ((Renderer.zoom >= 15) && (sts.contains(StsSTS.STS_RESV))) {
 					Renderer.labelText(feature, "Reserved", new Font("Arial", Font.PLAIN, 50), Mline, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));
 				}
 			}
-			ArrayList<CatACH> cats;
-			if ((cats = (ArrayList<CatACH>) getAttVal(feature, Obj.ACHARE, 0, Att.CATACH)) != null) {
-				int dy = (cats.size() - 1) * -30;
-				for (CatACH cat : cats) {
-					switch (cat) {
-					case ACH_DEEP:
-						Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
-						dy += 60;
-						break;
-					case ACH_TANK:
-						Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
-						dy += 60;
-						break;
-					case ACH_H24P:
-						Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
-						dy += 60;
-						break;
-					case ACH_EXPL:
-						Renderer.symbol(feature, Harbours.Explosives, new Scheme(Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
-						dy += 60;
-						break;
-					case ACH_QUAR:
-						Renderer.symbol(feature, Harbours.Hospital, new Scheme(Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
-						dy += 60;
-						break;
-					case ACH_SEAP:
-						Renderer.symbol(feature, Areas.Seaplane, new Scheme(Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
-						dy += 60;
-						break;
-					default:
-					}
+			ArrayList<CatACH> cats = (ArrayList<CatACH>) getAttList(feature, Obj.ACHARE, 0, Att.CATACH);
+			int dy = (cats.size() - 1) * -30;
+			for (CatACH cat : cats) {
+				switch (cat) {
+				case ACH_DEEP:
+					Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
+					dy += 60;
+					break;
+				case ACH_TANK:
+					Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
+					dy += 60;
+					break;
+				case ACH_H24P:
+					Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
+					dy += 60;
+					break;
+				case ACH_EXPL:
+					Renderer.symbol(feature, Harbours.Explosives, new Scheme(Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
+					dy += 60;
+					break;
+				case ACH_QUAR:
+					Renderer.symbol(feature, Harbours.Hospital, new Scheme(Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
+					dy += 60;
+					break;
+				case ACH_SEAP:
+					Renderer.symbol(feature, Areas.Seaplane, new Scheme(Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
+					dy += 60;
+					break;
+				default:
 				}
 			}
@@ -634,41 +655,37 @@
 			if (Renderer.zoom >= 16) {
 				ArrayList<Symbol> symbols = new ArrayList<Symbol>();
-				ArrayList<FncFNC> fncs;
-				if ((fncs = (ArrayList<FncFNC>) getAttVal(feature, Obj.BUISGL, 0, Att.FUNCTN)) != null) {
-					for (FncFNC fnc : fncs) {
-						symbols.add(Landmarks.Funcs.get(fnc));
-					}
-					if (feature.objs.containsKey(Obj.SMCFAC)) {
-						ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttVal(feature, Obj.SMCFAC, 0, Att.CATSCF);
-						for (CatSCF scf : scfs) {
-							symbols.add(Facilities.Cats.get(scf));
-						}
-					}
-					Renderer.cluster(feature, symbols);
-				}
+				ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList(feature, Obj.BUISGL, 0, Att.FUNCTN);
+				for (FncFNC fnc : fncs) {
+					symbols.add(Landmarks.Funcs.get(fnc));
+				}
+				if (feature.objs.containsKey(Obj.SMCFAC)) {
+					ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(feature, Obj.SMCFAC, 0, Att.CATSCF);
+					for (CatSCF scf : scfs) {
+						symbols.add(Facilities.Cats.get(scf));
+					}
+				}
+				Renderer.cluster(feature, symbols);
 			}
 			break;
 		case HRBFAC:
 			if (Renderer.zoom >= 12) {
-				ArrayList<CatHAF> cathaf;
-				if ((cathaf = (ArrayList<CatHAF>) getAttVal(feature, Obj.HRBFAC, 0, Att.CATHAF)) != null) {
-					if (cathaf.size() == 1) {
-						switch (cathaf.get(0)) {
-						case HAF_MRNA:
-							Renderer.symbol(feature, Harbours.Marina);
-							break;
-						case HAF_MANF:
-							Renderer.symbol(feature, Harbours.MarinaNF);
-							break;
-						case HAF_FISH:
-							Renderer.symbol(feature, Harbours.Fishing);
-							break;
-						default:
-							Renderer.symbol(feature, Harbours.Harbour);
-							break;
-						}
-					} else {
+				ArrayList<CatHAF> cathaf = (ArrayList<CatHAF>) getAttList(feature, Obj.HRBFAC, 0, Att.CATHAF);
+				if (cathaf.size() == 1) {
+					switch (cathaf.get(0)) {
+					case HAF_MRNA:
+						Renderer.symbol(feature, Harbours.Marina);
+						break;
+					case HAF_MANF:
+						Renderer.symbol(feature, Harbours.MarinaNF);
+						break;
+					case HAF_FISH:
+						Renderer.symbol(feature, Harbours.Fishing);
+						break;
+					default:
 						Renderer.symbol(feature, Harbours.Harbour);
-					}
+						break;
+					}
+				} else {
+					Renderer.symbol(feature, Harbours.Harbour);
 				}
 			}
@@ -680,14 +697,8 @@
 	
 	private static void landmarks(Feature feature) {
-		ArrayList<CatLMK> cats;
-		ArrayList<FncFNC> fncs;
-		Symbol catSym = new Symbol();
-		Symbol fncSym = new Symbol();
-		if ((cats = (ArrayList<CatLMK>) getAttVal(feature, feature.type, 0, Att.CATLMK)) != null) {
-			catSym = Landmarks.Shapes.get(cats.get(0));
-		}
-		if ((fncs = (ArrayList<FncFNC>) getAttVal(feature, feature.type, 0, Att.FUNCTN)) != null) {
-			fncSym = Landmarks.Funcs.get(fncs.get(0));
-		}
+		ArrayList<CatLMK> cats = (ArrayList<CatLMK>) getAttList(feature, feature.type, 0, Att.CATLMK);
+		Symbol catSym = Landmarks.Shapes.get(cats.get(0));
+		ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList(feature, feature.type, 0, Att.FUNCTN);
+		Symbol fncSym = Landmarks.Funcs.get(fncs.get(0));
 		if ((fncs.get(0) == FncFNC.FNC_CHCH) && (cats.get(0) == CatLMK.LMK_TOWR))
 			catSym = Landmarks.ChurchTower;
@@ -738,40 +749,36 @@
 		if (Renderer.zoom >= 16) {
 			ArrayList<Symbol> symbols = new ArrayList<Symbol>();
-			ArrayList<CatSCF> scfs;
-			if ((scfs = (ArrayList<CatSCF>) getAttVal(feature, Obj.SMCFAC, 0, Att.CATSCF)) != null) {
-				for (CatSCF scf : scfs) {
-					symbols.add(Facilities.Cats.get(scf));
-				}
-				Renderer.cluster(feature, symbols);
-			}
+			ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(feature, Obj.SMCFAC, 0, Att.CATSCF);
+			for (CatSCF scf : scfs) {
+				symbols.add(Facilities.Cats.get(scf));
+			}
+			Renderer.cluster(feature, symbols);
 		}
 	}
 	
 	private static void moorings(Feature feature) {
-		CatMOR cat;
-		if ((cat = (CatMOR) getAttVal(feature, feature.type, 0, Att.CATMOR)) != null) {
-			switch (cat) {
-			case MOR_DLPN:
-				Renderer.symbol(feature, Harbours.Dolphin);
-				break;
-			case MOR_DDPN:
-				Renderer.symbol(feature, Harbours.DeviationDolphin);
-				break;
-			case MOR_BLRD:
-			case MOR_POST:
-				Renderer.symbol(feature, Harbours.Bollard);
-				break;
-			case MOR_BUOY:
-				BoySHP shape = (BoySHP) getAttVal(feature, feature.type, 0, Att.BOYSHP);
-				if (shape == BoySHP.BOY_UNKN)
-					shape = BoySHP.BOY_SPHR;
-				Renderer.symbol(feature, Buoys.Shapes.get(shape), getScheme(feature, feature.type));
-				Renderer.symbol(feature, Topmarks.TopMooring, Topmarks.BuoyDeltas.get(shape));
-				break;
-			default:
-				break;
-			}
-			Signals.addSignals(feature);
-		}
+		switch ((CatMOR) getAttEnum(feature, feature.type, 0, Att.CATMOR)) {
+		case MOR_DLPN:
+			Renderer.symbol(feature, Harbours.Dolphin);
+			break;
+		case MOR_DDPN:
+			Renderer.symbol(feature, Harbours.DeviationDolphin);
+			break;
+		case MOR_BLRD:
+		case MOR_POST:
+			Renderer.symbol(feature, Harbours.Bollard);
+			break;
+		case MOR_BUOY:
+			BoySHP shape = (BoySHP) getAttEnum(feature, feature.type, 0, Att.BOYSHP);
+			if (shape == BoySHP.BOY_UNKN) {
+				shape = BoySHP.BOY_SPHR;
+			}
+			Renderer.symbol(feature, Buoys.Shapes.get(shape), getScheme(feature, feature.type));
+			Renderer.symbol(feature, Topmarks.TopMooring, Topmarks.BuoyDeltas.get(shape));
+			break;
+		default:
+			break;
+		}
+		Signals.addSignals(feature);
 	}
 
@@ -845,31 +852,27 @@
 	private static void obstructions(Feature feature) {
 		if ((Renderer.zoom >= 12) && (feature.type == Obj.OBSTRN)) {
-			CatOBS cat;
-			if ((cat = (CatOBS) getAttVal(feature, feature.type, 0, Att.CATOBS)) != null) {
-			switch (cat) {
+			switch ((CatOBS) getAttEnum(feature, feature.type, 0, Att.CATOBS)) {
 			case OBS_BOOM:
 				Renderer.lineVector(feature, new LineStyle(Color.black, 5, new float[] { 20, 20 }, null));
-				if (Renderer.zoom >= 15) Renderer.lineText(feature, "Boom", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20);
+				if (Renderer.zoom >= 15) {
+					Renderer.lineText(feature, "Boom", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20);
+				}
 			default:
 				break;
-	      }
-	    }
+			}
 		}
 		if ((Renderer.zoom >= 14) && (feature.type == Obj.UWTROC)) {
-			WatLEV lvl;
-			if ((lvl = (WatLEV) getAttVal(feature, feature.type, 0, Att.WATLEV)) != null) {
-				switch (lvl) {
-				case LEV_CVRS:
-					Renderer.symbol(feature, Areas.RockC);
-					break;
-				case LEV_AWSH:
-					Renderer.symbol(feature, Areas.RockA);
-					break;
-				default:
-					Renderer.symbol(feature, Areas.Rock);
-				}
-			} else {
+			switch ((WatLEV) getAttEnum(feature, feature.type, 0, Att.WATLEV)) {
+			case LEV_CVRS:
+				Renderer.symbol(feature, Areas.RockC);
+				break;
+			case LEV_AWSH:
+				Renderer.symbol(feature, Areas.RockA);
+				break;
+			default:
 				Renderer.symbol(feature, Areas.Rock);
 			}
+		} else {
+			Renderer.symbol(feature, Areas.Rock);
 		}
 	}
@@ -898,13 +901,11 @@
 
 	private static void platforms(Feature feature) {
-		ArrayList<CatOFP> cats;
-		if ((cats = (ArrayList<CatOFP>) getAttVal(feature, Obj.OFSPLF, 0, Att.CATOFP)) != null) {
-			if ((CatOFP) cats.get(0) == CatOFP.OFP_FPSO)
-				Renderer.symbol(feature, Buoys.Storage);
-			else
-				Renderer.symbol(feature, Landmarks.Platform);
-			addName(feature, 15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50)));
-			Signals.addSignals(feature);
-		}
+		ArrayList<CatOFP> cats = (ArrayList<CatOFP>) getAttList(feature, Obj.OFSPLF, 0, Att.CATOFP);
+		if ((CatOFP) cats.get(0) == CatOFP.OFP_FPSO)
+			Renderer.symbol(feature, Buoys.Storage);
+		else
+			Renderer.symbol(feature, Landmarks.Platform);
+		addName(feature, 15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50)));
+		Signals.addSignals(feature);
 	}
 
@@ -912,5 +913,5 @@
 		if (Renderer.zoom >= 14) {
 			if (feature.type == Obj.CRANES) {
-				if ((CatCRN) getAttVal(feature, feature.type, 0, Att.CATCRN) == CatCRN.CRN_CONT)
+				if ((CatCRN) getAttEnum(feature, feature.type, 0, Att.CATCRN) == CatCRN.CRN_CONT)
 					Renderer.symbol(feature, Harbours.ContainerCrane);
 				else
@@ -953,37 +954,30 @@
 	private static void shoreline(Feature feature) {
 		if (Renderer.zoom >= 12) {
-			CatSLC cat;
-			if ((cat = (CatSLC) getAttVal(feature, feature.type, 0, Att.CATSLC)) != null) {
-				switch (cat) {
-				case SLC_TWAL:
-					WatLEV lev;
-					if ((lev = (WatLEV) getAttVal(feature, feature.type, 0, Att.WATLEV)) != null) {
-						if (lev == WatLEV.LEV_CVRS) {
-							Renderer.lineVector(feature, new LineStyle(Color.black, 10, new float[] { 40, 40 }, null));
-							if (Renderer.zoom >= 15)
-								Renderer.lineText(feature, "(covers)", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, 80);
-						} else {
-							Renderer.lineVector(feature, new LineStyle(Color.black, 10, null, null));
-						}
-						if (Renderer.zoom >= 15)
-							Renderer.lineText(feature, "Training Wall", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -30);
-						break;
-					}
-				case SLC_SWAY:
-					Renderer.lineVector(feature, new LineStyle(Color.black, 2, null, new Color(0xffe000)));
-					if ((Renderer.zoom >= 16) && feature.objs.containsKey(Obj.SMCFAC)) {
-						ArrayList<Symbol> symbols = new ArrayList<Symbol>();
-						ArrayList<CatSCF> scfs;
-						if ((scfs = (ArrayList<CatSCF>) getAttVal(feature, Obj.SMCFAC, 0, Att.CATSCF)) != null) {
-							for (CatSCF scf : scfs) {
-								symbols.add(Facilities.Cats.get(scf));
-							}
-							Renderer.cluster(feature, symbols);
-						}
-					}
-					break;
-				default:
-					break;
-				}
+			switch ((CatSLC) getAttEnum(feature, feature.type, 0, Att.CATSLC)) {
+			case SLC_TWAL:
+				WatLEV lev = (WatLEV) getAttEnum(feature, feature.type, 0, Att.WATLEV);
+				if (lev == WatLEV.LEV_CVRS) {
+					Renderer.lineVector(feature, new LineStyle(Color.black, 10, new float[] { 40, 40 }, null));
+					if (Renderer.zoom >= 15)
+						Renderer.lineText(feature, "(covers)", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, 80);
+				} else {
+					Renderer.lineVector(feature, new LineStyle(Color.black, 10, null, null));
+				}
+				if (Renderer.zoom >= 15)
+					Renderer.lineText(feature, "Training Wall", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -30);
+				break;
+			case SLC_SWAY:
+				Renderer.lineVector(feature, new LineStyle(Color.black, 2, null, new Color(0xffe000)));
+				if ((Renderer.zoom >= 16) && feature.objs.containsKey(Obj.SMCFAC)) {
+					ArrayList<Symbol> symbols = new ArrayList<Symbol>();
+					ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(feature, Obj.SMCFAC, 0, Att.CATSCF);
+					for (CatSCF scf : scfs) {
+						symbols.add(Facilities.Cats.get(scf));
+					}
+					Renderer.cluster(feature, symbols);
+				}
+				break;
+			default:
+				break;
 			}
 		}
@@ -997,25 +991,23 @@
 				Renderer.symbol(feature, Harbours.SignalStation);
 				str = "SS";
-				ArrayList<CatSIT> tcats = (ArrayList<CatSIT>)getAttVal(feature, Obj.SISTAT, 0, Att.CATSIT);
-				if (tcats != null) {
-					switch (tcats.get(0)) {
-					case SIT_IPT:
-						str += "(INT)";
-						break;
-					case SIT_PRTE:
-						str += "(Traffic)";
-						break;
-					case SIT_PRTC:
-						str += "(Port Control)";
-						break;
-					case SIT_LOCK:
-						str += "(Lock)";
-						break;
-					case SIT_BRDG:
-						str += "(Bridge)";
-						break;
-					default:
-						break;
-					}
+				ArrayList<CatSIT> tcats = (ArrayList<CatSIT>) getAttList(feature, Obj.SISTAT, 0, Att.CATSIT);
+				switch (tcats.get(0)) {
+				case SIT_IPT:
+					str += "(INT)";
+					break;
+				case SIT_PRTE:
+					str += "(Traffic)";
+					break;
+				case SIT_PRTC:
+					str += "(Port Control)";
+					break;
+				case SIT_LOCK:
+					str += "(Lock)";
+					break;
+				case SIT_BRDG:
+					str += "(Bridge)";
+					break;
+				default:
+					break;
 				}
 				break;
@@ -1024,40 +1016,38 @@
 				str = "SS";
 				str = "SS";
-				ArrayList<CatSIW> wcats = (ArrayList<CatSIW>)getAttVal(feature, Obj.SISTAW, 0, Att.CATSIW);
-				if (wcats != null) {
-					switch (wcats.get(0)) {
-					case SIW_STRM:
-						str += "(Storm)";
-						break;
-					case SIW_WTHR:
-						str += "(Weather)";
-						break;
-					case SIW_ICE:
-						str += "(Ice)";
-						break;
-					case SIW_TIDG:
-						str = "Tide gauge";
-						break;
-					case SIW_TIDS:
-						str = "Tide scale";
-						break;
-					case SIW_TIDE:
-						str += "(Tide)";
-						break;
-					case SIW_TSTR:
-						str += "(Stream)";
-						break;
-					case SIW_DNGR:
-						str += "(Danger)";
-						break;
-					case SIW_MILY:
-						str += "(Firing)";
-						break;
-					case SIW_TIME:
-						str += "(Time)";
-						break;
-					default:
-						break;
-					}
+				ArrayList<CatSIW> wcats = (ArrayList<CatSIW>) getAttList(feature, Obj.SISTAW, 0, Att.CATSIW);
+				switch (wcats.get(0)) {
+				case SIW_STRM:
+					str += "(Storm)";
+					break;
+				case SIW_WTHR:
+					str += "(Weather)";
+					break;
+				case SIW_ICE:
+					str += "(Ice)";
+					break;
+				case SIW_TIDG:
+					str = "Tide gauge";
+					break;
+				case SIW_TIDS:
+					str = "Tide scale";
+					break;
+				case SIW_TIDE:
+					str += "(Tide)";
+					break;
+				case SIW_TSTR:
+					str += "(Stream)";
+					break;
+				case SIW_DNGR:
+					str += "(Danger)";
+					break;
+				case SIW_MILY:
+					str += "(Firing)";
+					break;
+				case SIW_TIME:
+					str += "(Time)";
+					break;
+				default:
+					break;
 				}
 				break;
@@ -1075,7 +1065,8 @@
 				Renderer.symbol(feature, Harbours.Pilot);
 				addName(feature, 15, new Font("Arial", Font.BOLD, 50), Msymb , new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, -40)));
-				CatPIL cat = (CatPIL) getAttVal(feature, feature.type, 0, Att.CATPIL);
-				if ((cat != null) && (cat == CatPIL.PIL_HELI))
+				CatPIL cat = (CatPIL) getAttEnum(feature, feature.type, 0, Att.CATPIL);
+				if (cat == CatPIL.PIL_HELI) {
 					Renderer.labelText(feature, "H", new Font("Arial", Font.PLAIN, 40), Msymb, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));
+				}
 				break;
 			case CGUSTA:
@@ -1109,6 +1100,5 @@
 			Double ort;
 			if ((ort = (Double) getAttVal(feature, feature.type, 0, Att.ORIENT)) != null) {
-				if (ort != null)
-					str += ort.toString() + "\u0152";
+				str += ort.toString() + "\u0152";
 				if (!str.isEmpty())
 					Renderer.lineText(feature, str, new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20);
@@ -1123,17 +1113,14 @@
 	private static void wrecks(Feature feature) {
 		if (Renderer.zoom >= 14) {
-			CatWRK cat;
-			if ((cat = (CatWRK) getAttVal(feature, feature.type, 0, Att.CATWRK)) != null) {
-				switch (cat) {
-				case WRK_DNGR:
-				case WRK_MSTS:
-					Renderer.symbol(feature, Areas.WreckD);
-					break;
-				case WRK_HULS:
-					Renderer.symbol(feature, Areas.WreckS);
-					break;
-				default:
-					Renderer.symbol(feature, Areas.WreckND);
-				}
+			switch ((CatWRK) getAttEnum(feature, feature.type, 0, Att.CATWRK)) {
+			case WRK_DNGR:
+			case WRK_MSTS:
+				Renderer.symbol(feature, Areas.WreckD);
+				break;
+			case WRK_HULS:
+				Renderer.symbol(feature, Areas.WreckS);
+				break;
+			default:
+				Renderer.symbol(feature, Areas.WreckND);
 			}
 		}
Index: /applications/editors/josm/plugins/seachart/src/render/Signals.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/render/Signals.java	(revision 30991)
+++ /applications/editors/josm/plugins/seachart/src/render/Signals.java	(revision 30992)
@@ -107,5 +107,5 @@
 		String str = "";
 		if (atts.containsKey(Att.CATFOG)) {
-			str += fogSignals.get(atts.get(Att.CATFOG).val);
+			str += fogSignals.get(((ArrayList<?>)(atts.get(Att.CATFOG).val)).get(0));
 		}
 		if (atts.containsKey(Att.SIGGRP)) {
@@ -128,6 +128,6 @@
 		Renderer.symbol(feature, Beacons.RadarStation);
 		String bstr = "";
-		CatRTB cat = (CatRTB) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.CATRTB);
-		String wal = (String) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.RADWAL);
+		CatRTB cat = (CatRTB) Rules.getAttEnum(feature, Obj.RTPBCN, 0, Att.CATRTB);
+		String wal = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.RADWAL);
 		switch (cat) {
 		case RTB_RAMK:
@@ -136,5 +136,5 @@
 		case RTB_RACN:
 			bstr += " Racon";
-			String astr = (String) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.SIGGRP);
+			String astr = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.SIGGRP);
 			if (!astr.isEmpty()) {
 				bstr += "(" + astr + ")";
@@ -142,8 +142,8 @@
 			Double per = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.SIGPER);
 			Double mxr = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.VALMXR);
-			if ((per != 0) || (mxr != 0)) {
+			if ((per != null) || (mxr != null)) {
 				bstr += (astr.isEmpty() ? " " : "");
-				bstr += (per != 0) ? per.toString() + "s" : "";
-				bstr += (mxr != 0) ? mxr.toString() + "M" : "";
+				if (per != null) bstr += (per != 0) ? per.toString() + "s" : "";
+				if (mxr != null) bstr += (mxr != 0) ? mxr.toString() + "M" : "";
 			}
 			break;
@@ -151,5 +151,5 @@
 			break;
 		}
-		if (wal!= null) {
+		if (!wal.isEmpty()) {
 			switch (wal) {
 			case "0.03-X":
@@ -168,5 +168,5 @@
 	public static void radioStations(Feature feature) {
 		Renderer.symbol(feature, Beacons.RadarStation);
-		ArrayList<CatROS> cats = (ArrayList<CatROS>)Rules.getAttVal(feature, Obj.RDOSTA, 0, Att.CATROS);
+		ArrayList<CatROS> cats = (ArrayList<CatROS>)Rules.getAttList(feature, Obj.RDOSTA, 0, Att.CATROS);
 		boolean vais = false;
 		String bstr = "";
Index: /applications/editors/josm/plugins/seachart/src/s57/S57att.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/s57/S57att.java	(revision 30991)
+++ /applications/editors/josm/plugins/seachart/src/s57/S57att.java	(revision 30992)
@@ -363,10 +363,10 @@
 	}
 
-	public static Att decodeAttribute(long attribute) {	// Convert S57 attribute code to OSeaM attribute enumeration
+	public static Att decodeAttribute(long attribute) {	// Convert S57 attribute code to SCM attribute enumeration
 		Att att = S57Att.get((int)attribute);
 		return (att != null) ? att : Att.UNKATT;
 	}
 	
-	public static Integer encodeAttribute(String attribute) {	// Convert OSeaM attribute enumeration to S57 attribute code
+	public static Integer encodeAttribute(String attribute) {	// Convert SCM attribute enumeration to S57 attribute code
 		if (AttS57.containsKey(attribute))
 			return AttS57.get(attribute);
@@ -376,14 +376,14 @@
 	}
 
-	public static Integer encodeAttribute(Att attribute) {	// Convert OSeaM attribute enumeration to S57 attribute code
+	public static Integer encodeAttribute(Att attribute) {	// Convert SCM attribute enumeration to S57 attribute code
 	  return AttS57.get(attribute) != 0 ? AttS57.get(attribute) : AttIENC.get(attribute);
 	}
 
-	public static String stringAttribute(Att attribute) {	// Convert OSeaM enumeration to OSeaM attribute string
+	public static String stringAttribute(Att attribute) {	// Convert SCM enumeration to OSM attribute string
 		String str = AttStr.get(attribute);
 		return str != null ? str : "";
 	}
 	
-	public static Att enumAttribute(String attribute, Obj obj) {	// Convert OSeaM attribute string to OSeaM enumeration
+	public static Att enumAttribute(String attribute, Obj obj) {	// Convert OSM attribute string to SCM enumeration
 	  if ((attribute != null) && !attribute.isEmpty()) {
 			EnumMap<Obj, Att> map = StrAtt.get(attribute);
Index: /applications/editors/josm/plugins/seachart/src/s57/S57obj.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/s57/S57obj.java	(revision 30991)
+++ /applications/editors/josm/plugins/seachart/src/s57/S57obj.java	(revision 30992)
@@ -104,5 +104,5 @@
 		ObjStr.put(Obj.BOYLAT, "buoy_lateral");	ObjStr.put(Obj.BOYSAW, "buoy_safe_water"); ObjStr.put(Obj.BOYSPP, "buoy_special_purpose");
 		ObjStr.put(Obj.CBLARE, "cable_area");	ObjStr.put(Obj.CBLOHD, "cable_overhead");	ObjStr.put(Obj.CBLSUB, "cable_submarine"); ObjStr.put(Obj.CANALS, "canal");
-		ObjStr.put(Obj.CANBNK, "canal_bank");	ObjStr.put(Obj.CTSARE, "cargo_area");	ObjStr.put(Obj.CAUSWY, "causeway");	ObjStr.put(Obj.CTNARE, "caution_area");
+		ObjStr.put(Obj.CANBNK, "canalbank");	ObjStr.put(Obj.CTSARE, "cargo_area");	ObjStr.put(Obj.CAUSWY, "causeway");	ObjStr.put(Obj.CTNARE, "caution_area");
 		ObjStr.put(Obj.CHKPNT, "checkpoint");	ObjStr.put(Obj.CGUSTA, "coastguard_station");	ObjStr.put(Obj.COALNE, "coastline"); ObjStr.put(Obj.CONZNE, "contiguous_zone");
 		ObjStr.put(Obj.COSARE, "continental_shelf"); ObjStr.put(Obj.CTRPNT, "control_point");	ObjStr.put(Obj.CONVYR, "conveyor");	ObjStr.put(Obj.CRANES, "crane");
@@ -127,5 +127,5 @@
 		ObjStr.put(Obj.RAPIDS, "rapids");	ObjStr.put(Obj.RCRTCL, "recommended_route_centreline");	ObjStr.put(Obj.RECTRC, "recommended_track");
 		ObjStr.put(Obj.RCTLPT, "recommended_traffic_lane");	ObjStr.put(Obj.RSCSTA, "rescue_station");	ObjStr.put(Obj.RESARE, "restricted_area");
-		ObjStr.put(Obj.RETRFL, "retro_reflector"); ObjStr.put(Obj.RIVERS, "river");	ObjStr.put(Obj.RIVBNK, "river_bank");	ObjStr.put(Obj.ROADWY, "road");
+		ObjStr.put(Obj.RETRFL, "retro_reflector"); ObjStr.put(Obj.RIVERS, "river");	ObjStr.put(Obj.RIVBNK, "riverbank");	ObjStr.put(Obj.ROADWY, "road");
 		ObjStr.put(Obj.RUNWAY, "runway");	ObjStr.put(Obj.SNDWAV, "sand_waves");	ObjStr.put(Obj.SEAARE, "sea_area");	ObjStr.put(Obj.SPLARE, "seaplane_landing_area");
 		ObjStr.put(Obj.SBDARE, "seabed_area"); ObjStr.put(Obj.SLCONS, "shoreline_construction"); ObjStr.put(Obj.SISTAT, "signal_station_traffic");
@@ -155,10 +155,10 @@
 	}
 	
-	public static Obj decodeType(long objl) { // Convert S57 feature code to OSeaM object enumeration
+	public static Obj decodeType(long objl) { // Convert S57 feature code to SCM object enumeration
 		Obj obj = S57Obj.get((int)objl);
 		return (obj != null) ? obj : Obj.UNKOBJ;
 	}
 
-	public static long encodeType(Obj type) { // Convert OSM object enumeration to S57 feature code
+	public static long encodeType(Obj type) { // Convert SCM object enumeration to S57 feature code
 		if (ObjS57.containsKey(type))
 			return ObjS57.get(type);
@@ -168,10 +168,10 @@
 	}
 
-	public static String stringType(Obj type) { // Convert OSeaM object enumeration to OSeaM object string
+	public static String stringType(Obj type) { // Convert SCM object enumeration to OSM object string
 		String str = ObjStr.get(type);
 			return str != null ? str : "";
 	}
 
-	public static Obj enumType(String type) { // Convert OSeaM object string to OSeaM object enumeration
+	public static Obj enumType(String type) { // Convert OSM object string to SCM object enumeration
 		if ((type != null) && !type.isEmpty() && (StrObj.containsKey(type)))
 			return StrObj.get(type);
Index: /applications/editors/josm/plugins/seachart/src/s57/S57val.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/s57/S57val.java	(revision 30991)
+++ /applications/editors/josm/plugins/seachart/src/s57/S57val.java	(revision 30992)
@@ -1105,5 +1105,5 @@
 	}
 	
-	public static Enum<?> s57Enum(String val, Att att) { // Convert S57 attribute value string to OSeaM enumeration
+	public static Enum<?> s57Enum(String val, Att att) {	// Convert S57 attribute value string to SCM enumeration
 		EnumMap<?, ?> map = keys.get(att).map;
 		Enum<?> unkn = null;
@@ -1125,5 +1125,5 @@
 	}
 
-	public static AttVal<?> decodeValue(String val, Att att) {          // Convert S57 attribute value string to OSeaM attribute value
+	public static AttVal<?> decodeValue(String val, Att att) {	// Convert S57 attribute value string to SCM attribute value
 		Conv conv = keys.get(att).conv;
 		switch (conv) {
@@ -1132,7 +1132,9 @@
 			return new AttVal<String>(att, conv, val);
 		case E:
-			return new AttVal<Enum<?>>(att, Conv.E, s57Enum(val, att));
+			ArrayList<Enum<?>> list = new ArrayList<Enum<?>>();
+			list.add(s57Enum(val, att));
+			return new AttVal<ArrayList<?>>(att, Conv.E, list);
 		case L:
-			ArrayList<Enum<?>> list = new ArrayList<Enum<?>>();
+			list = new ArrayList<Enum<?>>();
 			for (String item : val.split(",")) {
 				list.add(s57Enum(item, att));
@@ -1155,5 +1157,5 @@
 	}
 
-	public static Integer encodeValue(String val, Att att) {        // Convert OSeaM attribute value string to S57 attribute value
+	public static Integer encodeValue(String val, Att att) {	// Convert OSM attribute value string to S57 attribute value
 		EnumMap<?, ?> map = keys.get(att).map;
 		for (Object item : map.keySet()) {
@@ -1165,5 +1167,5 @@
 
 	
-	public static String stringValue(AttVal<?> attval) {                  // Convert OSeaM value object to OSeaM attribute value string
+	public static String stringValue(AttVal<?> attval) {	// Convert SCM value object to OSM attribute value string
 		if (attval != null) {
 			switch (attval.conv) {
@@ -1173,5 +1175,5 @@
 			case E:
 				EnumMap<?, ?> map = keys.get(attval.att).map;
-				return ((S57enum) map.get(attval.val)).val;
+				return ((S57enum) map.get(((ArrayList<?>) attval.val).get(0))).val;
 			case L:
 				String str = "";
@@ -1192,5 +1194,5 @@
 	}
 
-	public static Enum<?> osmEnum(String val, Att att) { // Convert OSeaM attribute value string to OSeaM enumeration
+	public static Enum<?> osmEnum(String val, Att att) {	// Convert OSM attribute value string to SCM enumeration
 		EnumMap<?, ?> map = keys.get(att).map;
 		Enum<?> unkn = null;
@@ -1206,5 +1208,5 @@
 	}
 
-	public static AttVal<?> convertValue(String val, Att att) { 				// Convert OSeaM attribute value string to OSeaM value object
+	public static AttVal<?> convertValue(String val, Att att) {	// Convert OSM attribute value string to SCM attribute value
 		switch (keys.get(att).conv) {
 		case A:
@@ -1212,7 +1214,9 @@
 			return new AttVal<String>(att, Conv.S, val);
 		case E:
-			return new AttVal<Enum<?>>(att, Conv.E, osmEnum(val, att));
+			ArrayList<Enum<?>> list = new ArrayList<Enum<?>>();
+			list.add(osmEnum(val, att));
+			return new AttVal<ArrayList<?>>(att, Conv.E, list);
 		case L:
-			ArrayList<Enum<?>> list = new ArrayList<Enum<?>>();
+			list = new ArrayList<Enum<?>>();
 			for (String item : val.split(";")) {
 				list.add(osmEnum(item, att));
@@ -1234,4 +1238,8 @@
 		return new AttVal<Object>(att, keys.get(att).conv, null);
 	}
+	
+	public static Enum<?> unknAtt(Att att) {
+		return (Enum<?>)(keys.get(att).map.keySet().toArray()[0]);
+	}
 
 }
Index: /applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java
===================================================================
--- /applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java	(revision 30991)
+++ /applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java	(revision 30992)
@@ -30,4 +30,5 @@
 import render.ChartContext;
 import render.Renderer;
+import render.Rules;
 import s57.S57map.*;
 
@@ -65,5 +66,5 @@
 	public void paint(Graphics2D g2, MapView mv, Bounds bb) {
 		Rectangle rect = Main.map.mapView.getBounds();
-		g2.setBackground(new Color(0xb5d0d0));
+		g2.setBackground(Rules.Bwater);
 		g2.clearRect(rect.x, rect.y, rect.width, rect.height);
 		g2.setPaint(Color.black);
