Index: applications/editors/josm/plugins/seachart/js57toosm/src/js57toosm/Js57toosm.java
===================================================================
--- applications/editors/josm/plugins/seachart/js57toosm/src/js57toosm/Js57toosm.java	(revision 31062)
+++ applications/editors/josm/plugins/seachart/js57toosm/src/js57toosm/Js57toosm.java	(revision 31063)
@@ -173,5 +173,5 @@
 		for (Map.Entry<Att, AttVal<?>> item : feature.atts.entrySet()) {
 			String attstr = S57att.stringAttribute(item.getKey());
-			String valstr = S57val.stringValue(item.getValue());
+			String valstr = S57val.stringValue(item.getValue(), item.getKey());
 			if (!attstr.isEmpty() && !valstr.isEmpty())
 				out.format("    <tag k='seamark:%s:%s' v='%s'/>%n", type, attstr, valstr);
@@ -184,5 +184,5 @@
 				for (Map.Entry<Att, AttVal<?>> item : atts.entrySet()) {
 					String attstr = S57att.stringAttribute(item.getKey());
-					String valstr = S57val.stringValue(item.getValue());
+					String valstr = S57val.stringValue(item.getValue(), item.getKey());
 					if (!attstr.isEmpty() && !valstr.isEmpty()) {
 						if ((ix == 0) && (tab.size() == 1)) {
Index: applications/editors/josm/plugins/seachart/src/render/Signals.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/render/Signals.java	(revision 31062)
+++ applications/editors/josm/plugins/seachart/src/render/Signals.java	(revision 31063)
@@ -54,5 +54,5 @@
 	static final EnumMap<LitCHR, String> lightCharacters = new EnumMap<LitCHR, String>(LitCHR.class);
 	static {
-		lightCharacters.put(LitCHR.CHR_F, "W");
+		lightCharacters.put(LitCHR.CHR_F, "F");
 		lightCharacters.put(LitCHR.CHR_FL, "Fl");
 		lightCharacters.put(LitCHR.CHR_LFL, "LFl");
@@ -285,6 +285,6 @@
 		Enum<ColCOL> col = null;
 		Enum<ColCOL> tcol = null;
-		ObjTab objs = feature.objs.get(Obj.LIGHTS);
-		for (AttMap atts : objs.values()) {
+		ObjTab lights = feature.objs.get(Obj.LIGHTS);
+		for (AttMap atts : lights.values()) {
 			if (atts.containsKey(Att.COLOUR)) {
 				ArrayList<Enum<ColCOL>> cols = (ArrayList<Enum<ColCOL>>) atts.get(Att.COLOUR).val;
@@ -304,6 +304,6 @@
 		}
 		Renderer.symbol(feature, Beacons.LightFlare, new Scheme(lightColours.get(col)), new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120))));
-		if (objs.get(1) != null) {
-			for (AttMap atts : objs.values()) {
+		if (lights.get(1) != null) {
+			for (AttMap atts : lights.values()) {
 				Enum<ColCOL> col1 = null;
 				Enum<ColCOL> col2 = null;
@@ -360,5 +360,5 @@
 					double n1 = 360;
 					double n2 = 360;
-					for (AttMap sect : objs.values()) {
+					for (AttMap sect : lights.values()) {
 						if (sect != atts) {
 							
@@ -369,374 +369,57 @@
 			}
 		}
-	}
-
-	/*
-void renderSector(Item_t *item, int s, char *text, char *style, double offset, int dy) {
-  Obj_t *sector;
-  double start, end;
-  Att_t *att;
-  XY_t p0, p1;
-  double r0, r1;
-  double b0, b1, span;
-  char *col;
-  XY_t pos = findCentroid(item);
-  if ((sector = getObj(item, LIGHTS, s)) != NULL) {
-    strcpy(string1, (att = getAtt(sector, LITRAD)) != NULL ? att->val.val.a : "0.2");
-    if (((att = getAtt(sector, CATLIT)) != NULL) && (testAtt(att, LIT_DIR)) && ((att = getAtt(sector, ORIENT)) != NULL)) {
-      b0 = fmod(540.0 - att->val.val.f, 360.0);
-      if ((att = getAtt(sector, COLOUR)) != NULL) {
-        col = light_colours[att->val.val.l->val];
-        r0 = atof(string1);
-        p0 = radial(pos, r0, b0);
-        printf("<path d=\"M %g,%g L %g,%g\" style=\"fill:none;stroke:#808080;stroke-width:%g;stroke-dasharray:%g\"/>\n",
-               pos.x, pos.y, p0.x, p0.y, (4 * symbolScale[zoom]), (20 * symbolScale[zoom]));
-        start = fmod(b0 + 2.0, 360.0);
-        end = fmod(360.0 + b0 - 2.0, 360.0);
-        Obj_t *adj;
-        for (int i = s-1; i <= s+1; i++) {
-          if (i == s) continue;
-          if ((adj = getObj(item, LIGHTS, i)) == NULL) continue;
-          Att_t *att;
-          if (((att = getAtt(adj, CATLIT)) != NULL) && (testAtt(att, LIT_DIR)) && ((att = getAtt(adj, ORIENT)) != NULL)) {
-            b1 = fmod(540.0 - att->val.val.f, 360.0);
-            if (fabs(b0 - b1) > 180.0) {
-              if (b0 < b1) b0 += 360.0;
-              else b1 += 360.0;
-            }
-            if (fabs(b0 - b1) < 4.0) {
-              if (b1 > b0) start = fmod((720.0 + b0 + b1) / 2.0, 360.0);
-              else end = fmod((720.0 + b0 + b1) / 2.0, 360.0);
-            }
-          }
-        }
-        p0 = radial(pos, r0, start);
-        p1 = radial(pos, r0, end);
-        printf("<path id=\"%d\" d=\"M %g,%g A %g,%g,0,0,1,%g,%g\" style=\"fill:none;stroke:%s;stroke-width:%g\"/>\n",
-               ++ref, p0.x, p0.y, r0*mile, r0*mile, p1.x, p1.y, col, (20 * symbolScale[zoom]));
-        if (att->val.val.l->next != NULL) {
-          char *col = light_colours[att->val.val.l->next->val];
-          r1 = r0 - (20 * symbolScale[zoom]/mile);
-          p0 = radial(pos, r1, start);
-          p1 = radial(pos, r1, end);
-          printf("<path d=\"M %g,%g A %g,%g,0,0,1,%g,%g\" style=\"fill:none;stroke:%s;stroke-width:%g\"/>\n",
-                 p0.x, p0.y, r1*mile, r1*mile, p1.x, p1.y, col, (20 * symbolScale[zoom]));
-        }
-      }
-    } else if ((att = getAtt(sector, SECTR1)) != NULL) {
-      start = fmod(540.0 - att->val.val.f, 360.0);
-      if ((att = getAtt(sector, SECTR2)) != NULL) {
-        end = fmod(540.0 - att->val.val.f, 360.0);
-        start += start < end ? 360.0 : 0.0;
-        if ((att = getAtt(sector, COLOUR)) != NULL) {
-          char *ttok, *etok;
-          char *radstr = strdup(string1);
-          int arc = 0;
-          col = light_colours[att->val.val.l->val];
-          r0 = 0.0;
-          b0 = b1 = start;
-          for (char *tpl = strtok_r(radstr, ";", &ttok); tpl != NULL; tpl = strtok_r(NULL, ";", &ttok)) {
-            p0 = radial(pos, r0, b0);
-            span = 0.0;
-            char *ele = strtok_r(tpl, ":", &etok);
-            if ((*tpl == ':') && (r0 == 0.0)) {
-              r1 = 0.2;
-            } else if (*tpl != ':') {
-              r1 = atof(tpl);
-              ele = strtok_r(NULL, ":", &etok);
-            }
-            while (ele != NULL) {
-              if (isalpha(*ele)) {
-                if (strcmp(ele, "suppress") == 0) arc = 2;
-                else if (strcmp(ele, "dashed") == 0) arc = 1;
-                else arc = 0;
-              } else {
-                span = atof(ele);
-              }
-              ele = strtok_r(NULL, ":", &etok);
-            }
-            if (span == 0.0) {
-              char *back = (ttok != NULL) ? strstr(ttok, "-") : NULL;
-              if (back != NULL) {
-                span = b0 - end + atof(back);
-              } else {
-                span = b0 - end;
-              }
-            }
-            if (r1 != r0) {
-              p1 = radial(pos, r1, b0);
-              if (!((start == 180.0) && (end == 180.0)))
-                printf("<path d=\"M %g,%g L %g,%g\" style=\"fill:none;stroke:#808080;stroke-width:%g;stroke-dasharray:%g\"/>\n",
-                       p0.x, p0.y, p1.x, p1.y, (4 * symbolScale[zoom]), (20 * symbolScale[zoom]));
-              r0 = r1;
-              p0 = p1;
-            }
-            if (span < 0.0) {
-              b1 = end - span;
-              b1 = b1 > b0 ? b0 : b1;
-              b0 = b1;
-              b1 = end;
-              p0 = radial(pos, r0, b0);
-            } else {
-              b1 = b0 - span;
-              b1 = b1 < end ? end : b1;
-            }
-            p1 = radial(pos, r1, b1);
-            if ((b0 == 180.0) && (b1 == 180.0)) {
-              span = 360.0;
-              p1 = radial(pos, r1, b1+0.01);
-            }
-            if (arc == 0) {
-              if (p0.x < p1.x)
-                printf("<path id=\"%d\" d=\"M %g,%g A %g,%g,0,%d,1,%g,%g\" style=\"fill:none;stroke:%s;stroke-width:%g\"/>\n",
-                       ++ref, p0.x, p0.y, r1*mile, r1*mile, span>180.0, p1.x, p1.y, col, (20 * symbolScale[zoom]));
-              else
-                printf("<path id=\"%d\" d=\"M %g,%g A %g,%g,0,%d,0,%g,%g\" style=\"fill:none;stroke:%s;stroke-width:%g\"/>\n",
-                       ++ref, p1.x, p1.y, r1*mile, r1*mile, span>180.0, p0.x, p0.y, col, (20 * symbolScale[zoom]));
-              if (text != NULL) {
-                double chord = sqrt(pow((p0.x - p1.x), 2) + pow((p0.y - p1.y), 2));
-                if ((chord > (strlen(text) * textScale[zoom] * 50)) || ((b0 == 180.0) && (b1 == 180.0)))
-                  drawLineText(item, text, style, offset, dy, ref);
-              }
-            } else if (arc == 1) {
-              printf("<path d=\"M %g,%g A %g,%g,0,%d,1,%g,%g\" style=\"fill:none;stroke:%s;stroke-width:%g;stroke-opacity:0.5;stroke-dasharray:%g\"/>\n",
-                     p0.x, p0.y, r1*mile, r1*mile, span>180.0, p1.x, p1.y, col, (10 * symbolScale[zoom]), (30 * symbolScale[zoom]));
-            }
-            if ((arc == 0) && (att->val.val.l->next != NULL)) {
-              char *col = light_colours[att->val.val.l->next->val];
-              double r2 = r1 - (20 * symbolScale[zoom]/mile);
-              XY_t p2 = radial(pos, r2, b0);
-              XY_t p3 = radial(pos, r2, b1);
-              printf("<path d=\"M %g,%g A %g,%g,0,%d,1,%g,%g\" style=\"fill:none;stroke:%s;stroke-width:%g\"/>\n",
-                     p2.x, p2.y, r1*mile, r1*mile, span>180.0, p3.x, p3.y, col, (20 * symbolScale[zoom]));
-            }
-            b0 = b1;
-            if (b0 == end) break;
-          }
-          if (!((start == 180.0) && (end == 180.0)))
-            printf("<path d=\"M %g,%g L %g,%g\" style=\"fill:none;stroke:#808080;stroke-width:%g;stroke-dasharray:%g\"/>\n",
-                   pos.x, pos.y, p1.x, p1.y, (4 * symbolScale[zoom]), (20 * symbolScale[zoom]));
-          free(radstr);
-        }
-      }
-    }
-  }
+		final Att matches[] = { Att.SIGPER, Att.SIGGRP, Att.MLTYLT, Att.LITCHR, Att.CATLIT, Att.HEIGHT };
+		ArrayList<ArrayList<AttMap>> groups = new ArrayList<ArrayList<AttMap>>();
+		for (AttMap sector : lights.values()) {
+			if (sector.containsKey(Att.COLOUR)) {
+				boolean equal = false;
+				for (ArrayList<AttMap> group : groups) {
+					AttMap member = group.get(0);
+					for (Att match : matches) {
+						if (!((sector.containsKey(match) && member.containsKey(match) && sector.get(match).val.equals(member.get(match).val)) || (!sector.containsKey(match) && !member.containsKey(match)))) {
+							equal = false;
+							break;
+						} else {
+							equal = true;
+						}
+					}
+					if (equal) {
+						group.add(sector);
+						break;
+					}
+				}
+				if (!equal) {
+					ArrayList<AttMap> group = new ArrayList<AttMap>();
+					group.add(sector);
+					groups.add(group);
+				}
+			}
+		}
+		for (boolean sorted = false; !sorted;) {
+			sorted = true;
+			for (int i = 0; i < groups.size()-1; i ++) {
+				if (groups.get(i).size() < groups.get(i+1).size()) {
+					ArrayList<AttMap> tmp = groups.remove(i);
+					groups.add(i+1, tmp);
+					sorted = false;
+				}
+			}
+		}
+		for (ArrayList<AttMap> group : groups) {
+			for (boolean sorted = false; !sorted;) {
+				sorted = true;
+				for (int i = 0; i < group.size()-1; i ++) {
+					AttMap m0 = group.get(i);
+					AttMap m1 = group.get(i+1);
+					if (((m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR) && ((int)m0.get(Att.VALNMR).val < (int)m1.get(Att.VALNMR).val)))
+							|| (!m0.containsKey(Att.VALNMR) && m1.containsKey(Att.VALNMR))) {
+						AttMap tmp = group.remove(i);
+						group.add(i+1, tmp);
+						sorted = false;
+					}
+				}
+			}
+		}
+	}
+
 }
-char *charString(Item_t *item, char *type, int idx) {
-  strcpy(string1, "");
-  Att_t *att = NULL;
-  Obj_t *obj = getObj(item, enumType(type), idx);
-  switch (enumType(type)) {
-    case LIGHTS:
-    {
-      int secmax = countObjects(item, "light");
-      if ((idx == 0) && (secmax > 0)) {
-        struct SECT {
-          struct SECT *next;
-          int dir;
-          LitCHR_t chr;
-          ColCOL_t col;
-          ColCOL_t alt;
-          char *grp;
-          double per;
-          double rng;
-        } *lights = NULL;
-        for (int i = secmax; i > 0; i--) {
-          struct SECT *tmp = calloc(1, sizeof(struct SECT));
-          tmp->next = lights;
-          lights = tmp;
-          obj = getObj(item, LIGHTS, i);
-          if ((att = getAtt(obj, CATLIT)) != NULL) {
-            lights->dir = testAtt(att, LIT_DIR);
-          }
-          if ((att = getAtt(obj, LITCHR)) != NULL) {
-            lights->chr = att->val.val.e;
-            switch (lights->chr) {
-              case CHR_AL:
-                lights->chr = CHR_F;
-                break;
-              case CHR_ALOC:
-                lights->chr = CHR_OC;
-                break;
-              case CHR_ALLFL:
-                lights->chr = CHR_LFL;
-                break;
-              case CHR_ALFL:
-                lights->chr = CHR_FL;
-                break;
-              case CHR_ALFFL:
-                lights->chr = CHR_FFL;
-                break;
-              default:
-                break;
-            }
-          }
-          if ((att = getAtt(obj, SIGGRP)) != NULL) {
-            lights->grp = att->val.val.a;
-          } else {
-            lights->grp = "";
-          }
-          if ((att = getAtt(obj, SIGPER)) != NULL) {
-            lights->per = att->val.val.f;
-          }
-          if ((att = getAtt(obj, VALNMR)) != NULL) {
-            lights->rng = att->val.val.f;
-          }
-          if ((att = getAtt(obj, COLOUR)) != NULL) {
-            lights->col = att->val.val.l->val;
-            if (att->val.val.l->next != NULL)
-              lights->alt = att->val.val.l->next->val;
-          }
-        }
-        struct COLRNG {
-          int col;
-          double rng;
-        } colrng[14];
-        while (lights != NULL) {
-          strcpy(string2, "");
-          bzero(colrng, 14*sizeof(struct COLRNG));
-          colrng[lights->col].col = 1;
-          colrng[lights->col].rng = lights->rng;
-          struct SECT *this = lights;
-          struct SECT *next = lights->next;
-          while (next != NULL) {
-            if ((this->dir == next->dir) && (this->chr == next->chr) &&
-                (strcmp(this->grp, next->grp) == 0) && (this->per == next->per)) {
-              colrng[next->col].col = 1;
-              if (next->rng > colrng[next->col].rng)
-                colrng[next->col].rng = next->rng;
-              struct SECT *tmp = lights;
-              while (tmp->next != next) tmp = tmp->next;
-              tmp->next = next->next;
-              free(next);
-              next = tmp->next;
-            } else {
-              next = next->next;
-            }
-          }
-          if (this->chr != CHR_UNKN) {
-            if (this->dir) strcpy(string2, "Dir.");
-            strcat(string2, light_characters[this->chr]);
-            if (strcmp(this->grp, "") != 0) {
-              if (this->grp[0] == '(')
-                sprintf(strchr(string2, 0), "%s", this->grp);
-              else
-                sprintf(strchr(string2, 0), "(%s)", this->grp);
-            } else {
-              if (strlen(string2) > 0) strcat(string2, ".");
-            }
-            int n = 0;
-            for (int i = 0; i < 14; i++) if (colrng[i].col) n++;
-            double max = 0.0;
-            for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng > max)) max = colrng[i].rng;
-            double min = max;
-            for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng > 0.0) && (colrng[i].rng < min)) min = colrng[i].rng;
-            if (min == max) {
-              for (int i = 0; i < 14; i++) if (colrng[i].col) strcat(string2, light_letters[i]);
-            } else {
-              for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng == max)) strcat(string2, light_letters[i]);
-              for (int i = 0; i < 14; i++) if (colrng[i].col && (colrng[i].rng < max) && (colrng[i].rng > min)) strcat(string2, light_letters[i]);
-              for (int i = 0; i < 14; i++) if (colrng[i].col && colrng[i].rng == min) strcat(string2, light_letters[i]);
-            }
-            strcat(string2, ".");
-            if (this->per > 0.0) sprintf(strchr(string2, 0), "%gs", this->per);
-            if (max > 0.0) {
-              sprintf(strchr(string2, 0), "%g", max);
-              if (min != max) {
-                if (n == 2) strcat(string2, "/");
-                else if (n > 2) strcat(string2, "-");
-                if (min < max) sprintf(strchr(string2, 0), "%g", min);
-              }
-              strcat(string2, "M");
-            }
-            if (strlen(string1) > 0) strcat(string1, "\n");
-            strcat(string1, string2);
-          }
-          lights = this->next;
-          free(this);
-          this = lights;
-        }
-      } else {
-        if ((att = getAtt(obj, CATLIT)) != NULL) {
-          if (testAtt(att, LIT_DIR))
-            strcat(string1, "Dir");
-        }
-        if ((att = getAtt(obj, MLTYLT)) != NULL)
-          sprintf(strchr(string1, 0), "%s", stringValue(att->val));
-        if ((att = getAtt(obj, LITCHR)) != NULL) {
-          char *chrstr = strdup(stringValue(att->val));
-          Att_t *grp = getAtt(obj, SIGGRP);
-          if (grp != NULL) {
-            char *strgrp = strdup(stringValue(grp->val));
-            char *grpstr = strtok(strgrp, "()");
-            switch (att->val.val.e) {
-              case CHR_QLFL:
-                sprintf(strchr(string1, 0), "Q(%s)+LFl", grpstr);
-                break;
-              case CHR_VQLFL:
-                sprintf(strchr(string1, 0), "VQ(%s)+LFl", grpstr);
-                break;
-              case CHR_UQLFL:
-                sprintf(strchr(string1, 0), "UQ(%s)+LFl", grpstr);
-                break;
-              default:
-                sprintf(strchr(string1, 0), "%s(%s)", chrstr, grpstr);
-                break;
-            }
-            free(strgrp);
-          } else {
-            sprintf(strchr(string1, 0), "%s", chrstr);
-          }
-          free(chrstr);
-        }
-        if ((att = getAtt(obj, COLOUR)) != NULL) {
-          int n = countValues(att);
-          if (!((n == 1) && (idx == 0) && (testAtt(att, COL_WHT)))) {
-            if ((strlen(string1) > 0) && ((string1[strlen(string1)-1] != ')')))
-              strcat(string1, ".");
-            Lst_t *lst = att->val.val.l;
-            while (lst != NULL) {
-              strcat(string1, light_letters[lst->val]);
-              lst = lst->next;
-            }
-          }
-        }
-        if ((idx == 0) && (att = getAtt(obj, CATLIT)) != NULL) {
-          if (testAtt(att, LIT_VERT))
-            strcat(string1, "(vert)");
-          if (testAtt(att, LIT_HORI))
-            strcat(string1, "(hor)");
-        }
-        if ((strlen(string1) > 0) &&
-            ((getAtt(obj, SIGPER) != NULL) ||
-             (getAtt(obj, HEIGHT) != NULL) ||
-             (getAtt(obj, VALMXR) != NULL)) &&
-            (string1[strlen(string1)-1] != ')'))
-          strcat(string1, ".");
-        if ((att = getAtt(obj, SIGPER)) != NULL)
-          sprintf(strchr(string1, 0), "%ss", stringValue(att->val));
-        if ((idx == 0) && (item->objs.obj != LITMIN)) {
-          if ((att = getAtt(obj, HEIGHT)) != NULL)
-            sprintf(strchr(string1, 0), "%sm", stringValue(att->val));
-          if ((att = getAtt(obj, VALNMR)) != NULL)
-            sprintf(strchr(string1, 0), "%sM", stringValue(att->val));
-        }
-        if ((idx == 0) && (att = getAtt(obj, CATLIT)) != NULL) {
-          if (testAtt(att, LIT_FRNT))
-            strcat(string1, "(Front)");
-          if (testAtt(att, LIT_REAR))
-            strcat(string1, "(Rear)");
-          if (testAtt(att, LIT_UPPR))
-            strcat(string1, "(Upper)");
-          if (testAtt(att, LIT_LOWR))
-            strcat(string1, "(Lower)");
-        }
-      }
-    }
-      break;
-    default: break;
- }
-  return string1;
-}
-*/
-	
-}
Index: applications/editors/josm/plugins/seachart/src/s57/S57dat.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/s57/S57dat.java	(revision 31062)
+++ applications/editors/josm/plugins/seachart/src/s57/S57dat.java	(revision 31063)
@@ -11,7 +11,5 @@
 
 import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.EnumMap;
+import java.util.*;
 
 public class S57dat {
Index: applications/editors/josm/plugins/seachart/src/s57/S57dec.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/s57/S57dec.java	(revision 31062)
+++ applications/editors/josm/plugins/seachart/src/s57/S57dec.java	(revision 31063)
@@ -22,6 +22,6 @@
 		byte[] leader = new byte[24];
 		boolean ddr = false;
-		int length;
-		int fields;
+		int length = 0;
+		int fields = 0;;
 		int mapfl, mapfp, mapts, entry;
 		String tag;
@@ -39,7 +39,12 @@
 		
 		while (in.read(leader) == 24) {
+			try {
 			length = Integer.parseInt(new String(leader, 0, 5)) - 24;
 			ddr = (leader[6] == 'L');
 			fields = Integer.parseInt(new String(leader, 12, 5)) - 24;
+			} catch (Exception e) {
+				System.err.println("Invalid file format - Encrypted/compressed ENC file?");
+				System.exit(-1);
+			}
 			mapfl = leader[20] - '0';
 			mapfp = leader[21] - '0';
Index: applications/editors/josm/plugins/seachart/src/s57/S57map.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 31062)
+++ applications/editors/josm/plugins/seachart/src/s57/S57map.java	(revision 31063)
@@ -524,5 +524,5 @@
 					}
 					if (osm.att != Att.UNKATT) {
-						atts.put(osm.att, new AttVal<>(osm.att, osm.conv, osm.val));
+						atts.put(osm.att, new AttVal<>(osm.conv, osm.val));
 					}
 				} else {
@@ -536,5 +536,5 @@
 					objs.put(0, atts);
 					if (osm.att != Att.UNKATT) {
-						atts.put(osm.att, new AttVal<>(osm.att, osm.conv, osm.val));
+						atts.put(osm.att, new AttVal<>(osm.conv, osm.val));
 					}
 					index.put(++xref, base);
Index: applications/editors/josm/plugins/seachart/src/s57/S57val.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/s57/S57val.java	(revision 31062)
+++ applications/editors/josm/plugins/seachart/src/s57/S57val.java	(revision 31063)
@@ -35,9 +35,12 @@
 	
 	public static class AttVal<V> {
-		public Att att;
+//		public Att att;
 		public Conv conv;
 		public V val;
-		AttVal(Att a, Conv c, V v) {
-			att = a; conv = c; val = v;
+//		AttVal(Att a, Conv c, V v) {
+//			att = a; conv = c; val = v;
+//		}
+		AttVal(Conv c, V v) {
+			conv = c; val = v;
 		}
 	}
@@ -1129,9 +1132,9 @@
 		case A:
 		case S:
-			return new AttVal<String>(att, conv, val);
+			return new AttVal<String>(conv, val);
 		case E:
 			ArrayList<Enum<?>> list = new ArrayList<Enum<?>>();
 			list.add(s57Enum(val, att));
-			return new AttVal<ArrayList<?>>(att, Conv.E, list);
+			return new AttVal<ArrayList<?>>(Conv.E, list);
 		case L:
 			list = new ArrayList<Enum<?>>();
@@ -1139,8 +1142,8 @@
 				list.add(s57Enum(item, att));
 			}
-			return new AttVal<ArrayList<?>>(att, Conv.L, list);
+			return new AttVal<ArrayList<?>>(Conv.L, list);
 		case I:
 			try {
-				return new AttVal<Long>(att, Conv.I, Long.parseLong(val));
+				return new AttVal<Long>(Conv.I, Long.parseLong(val));
 			} catch (Exception e) {
 				break;
@@ -1148,5 +1151,5 @@
 		case F:
 			try {
-				return new AttVal<Double>(att, Conv.F, Double.parseDouble(val));
+				return new AttVal<Double>(Conv.F, Double.parseDouble(val));
 			} catch (Exception e) {
 				break;
@@ -1165,6 +1168,5 @@
 	}
 
-	
-	public static String stringValue(AttVal<?> attval) {	// Convert SCM value object to OSM attribute value string
+	public static String stringValue(AttVal<?> attval, Att att) {	// Convert SCM value object to OSM attribute value string
 		if (attval != null) {
 			switch (attval.conv) {
@@ -1173,9 +1175,9 @@
 				return (String) attval.val;
 			case E:
-				EnumMap<?, ?> map = keys.get(attval.att).map;
+				EnumMap<?, ?> map = keys.get(att).map;
 				return ((S57enum) map.get(((ArrayList<?>) attval.val).get(0))).val;
 			case L:
 				String str = "";
-				map = keys.get(attval.att).map;
+				map = keys.get(att).map;
 				for (Object item : (ArrayList<?>) attval.val) {
 					if (!str.isEmpty())
@@ -1211,9 +1213,9 @@
 		case A:
 		case S:
-			return new AttVal<String>(att, Conv.S, val);
+			return new AttVal<String>(Conv.S, val);
 		case E:
 			ArrayList<Enum<?>> list = new ArrayList<Enum<?>>();
 			list.add(osmEnum(val, att));
-			return new AttVal<ArrayList<?>>(att, Conv.E, list);
+			return new AttVal<ArrayList<?>>(Conv.E, list);
 		case L:
 			list = new ArrayList<Enum<?>>();
@@ -1221,8 +1223,8 @@
 				list.add(osmEnum(item, att));
 			}
-			return new AttVal<ArrayList<?>>(att, Conv.L, list);
+			return new AttVal<ArrayList<?>>(Conv.L, list);
 		case I:
 			try {
-				return new AttVal<Long>(att, Conv.I, Long.parseLong(val));
+				return new AttVal<Long>(Conv.I, Long.parseLong(val));
 			} catch (Exception e) {
 				break;
@@ -1230,10 +1232,10 @@
 		case F:
 			try {
-				return new AttVal<Double>(att, Conv.F, Double.parseDouble(val));
+				return new AttVal<Double>(Conv.F, Double.parseDouble(val));
 			} catch (Exception e) {
 				break;
 			}
 		}
-		return new AttVal<Object>(att, keys.get(att).conv, null);
+		return new AttVal<Object>(keys.get(att).conv, null);
 	}
 	
Index: applications/editors/josm/plugins/seachart/src/symbols/Symbols.java
===================================================================
--- applications/editors/josm/plugins/seachart/src/symbols/Symbols.java	(revision 31062)
+++ applications/editors/josm/plugins/seachart/src/symbols/Symbols.java	(revision 31063)
@@ -20,5 +20,5 @@
 public class Symbols {
 
-	public static final Color Yland = new Color(0xf1c010);
+	public static final Color Yland = new Color(0xedbc0c);
 	public static final Color Bwater = new Color(0x78acd2);
 	public static final Color Gdries = new Color(0x689868);
