Index: plications/editors/josm/plugins/smed2/src/seamap/LightRender.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/LightRender.java	(revision 29339)
+++ 	(revision )
@@ -1,451 +1,0 @@
-/* Copyright 2013 Malcolm Herring
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 3 of the License.
- *
- * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
- */
-
-package seamap;
-
-public class LightRender {
-
-/*
-XY_t radial(XY_t centre, double radius, double angle) {
-  XY_t position;
-  position.x = centre.x - (radius * mile * sin(d2r(angle)));
-  position.y = centre.y - (radius * mile * cos(d2r(angle)));
-  return position;
-}
-
-void renderFlare(Item_t *item) {
-  char *col = light_colours[COL_MAG];
-  Obj_t *obj = getObj(item, LIGHTS, 0);
-  Att_t *att;
-  if (((att = getAtt(obj, COLOUR)) != NULL) && (att->val.val.l->next == NULL)) {
-    col = light_colours[att->val.val.l->val];
-  }
-  renderSymbol(item, LIGHTS, "light", "", col, CC, 0, 0, 120);
-}
-
-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);
-        }
-      }
-    }
-  }
-}
-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 CGUSTA:
-      strcpy(string1, "CG");
-      if ((obj != NULL) && (att = getAtt(obj, COMCHA)) != NULL)
-        sprintf(strchr(string1, 0), " Ch.%s", stringValue(att->val));
-      break;
-    case FOGSIG:
-      if (obj != NULL) {
-        if ((att = getAtt(obj, CATFOG)) != NULL)
-          strcat(string1, fog_signals[att->val.val.e]);
-        if ((att = getAtt(obj, SIGGRP)) != NULL)
-          sprintf(strchr(string1, 0), "(%s)", stringValue(att->val));
-        else 
-          strcat(string1, " ");
-        if ((att = getAtt(obj, SIGPER)) != NULL)
-          sprintf(strchr(string1, 0), "%ss ", stringValue(att->val));
-        if ((att = getAtt(obj, VALMXR)) != NULL)
-          sprintf(strchr(string1, 0), "%sM", stringValue(att->val));
-      }
-      break;
-    case RTPBCN:
-      if (obj != NULL) {
-        if ((att = getAtt(obj, CATRTB)) != NULL)
-          strcat(string1, rtb_map[att->val.val.e]);
-        if ((att = getAtt(obj, SIGGRP)) != NULL)
-          sprintf(strchr(string1, 0), "(%s)", stringValue(att->val));
-        else 
-          strcat(string1, " ");
-        if ((att = getAtt(obj, SIGPER)) != NULL)
-          sprintf(strchr(string1, 0), "%ss ", stringValue(att->val));
-        if ((att = getAtt(obj, VALMXR)) != NULL)
-          sprintf(strchr(string1, 0), "%sM", stringValue(att->val));
-      }
-      break;
-    case SISTAT:
-      strcpy(string1, "SS");
-      if (obj != NULL) {
-        if ((att = getAtt(obj, CATSIT)) != NULL)
-          strcat(string1, sit_map[att->val.val.l->val]);
-        if ((att = getAtt(obj, COMCHA)) != NULL)
-          sprintf(strchr(string1, 0), "\nCh.%s", stringValue(att->val));
-      }
-      break;
-    case SISTAW:
-      strcpy(string1, "SS");
-      if (obj != NULL) {
-        if ((att = getAtt(obj, CATSIW)) != NULL)
-          strcat(string1, siw_map[att->val.val.l->val]);
-        if ((att = getAtt(obj, COMCHA)) != NULL)
-          sprintf(strchr(string1, 0), "\nCh.%s", stringValue(att->val));
-      }
-      break;
-    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/smed2/src/seamap/Lights.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/Lights.java	(revision 29340)
+++ /applications/editors/josm/plugins/smed2/src/seamap/Lights.java	(revision 29340)
@@ -0,0 +1,451 @@
+/* Copyright 2013 Malcolm Herring
+ *
+ * This is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3 of the License.
+ *
+ * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
+ */
+
+package seamap;
+
+public class Lights {
+
+/*
+XY_t radial(XY_t centre, double radius, double angle) {
+  XY_t position;
+  position.x = centre.x - (radius * mile * sin(d2r(angle)));
+  position.y = centre.y - (radius * mile * cos(d2r(angle)));
+  return position;
+}
+
+void renderFlare(Item_t *item) {
+  char *col = light_colours[COL_MAG];
+  Obj_t *obj = getObj(item, LIGHTS, 0);
+  Att_t *att;
+  if (((att = getAtt(obj, COLOUR)) != NULL) && (att->val.val.l->next == NULL)) {
+    col = light_colours[att->val.val.l->val];
+  }
+  renderSymbol(item, LIGHTS, "light", "", col, CC, 0, 0, 120);
+}
+
+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);
+        }
+      }
+    }
+  }
+}
+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 CGUSTA:
+      strcpy(string1, "CG");
+      if ((obj != NULL) && (att = getAtt(obj, COMCHA)) != NULL)
+        sprintf(strchr(string1, 0), " Ch.%s", stringValue(att->val));
+      break;
+    case FOGSIG:
+      if (obj != NULL) {
+        if ((att = getAtt(obj, CATFOG)) != NULL)
+          strcat(string1, fog_signals[att->val.val.e]);
+        if ((att = getAtt(obj, SIGGRP)) != NULL)
+          sprintf(strchr(string1, 0), "(%s)", stringValue(att->val));
+        else 
+          strcat(string1, " ");
+        if ((att = getAtt(obj, SIGPER)) != NULL)
+          sprintf(strchr(string1, 0), "%ss ", stringValue(att->val));
+        if ((att = getAtt(obj, VALMXR)) != NULL)
+          sprintf(strchr(string1, 0), "%sM", stringValue(att->val));
+      }
+      break;
+    case RTPBCN:
+      if (obj != NULL) {
+        if ((att = getAtt(obj, CATRTB)) != NULL)
+          strcat(string1, rtb_map[att->val.val.e]);
+        if ((att = getAtt(obj, SIGGRP)) != NULL)
+          sprintf(strchr(string1, 0), "(%s)", stringValue(att->val));
+        else 
+          strcat(string1, " ");
+        if ((att = getAtt(obj, SIGPER)) != NULL)
+          sprintf(strchr(string1, 0), "%ss ", stringValue(att->val));
+        if ((att = getAtt(obj, VALMXR)) != NULL)
+          sprintf(strchr(string1, 0), "%sM", stringValue(att->val));
+      }
+      break;
+    case SISTAT:
+      strcpy(string1, "SS");
+      if (obj != NULL) {
+        if ((att = getAtt(obj, CATSIT)) != NULL)
+          strcat(string1, sit_map[att->val.val.l->val]);
+        if ((att = getAtt(obj, COMCHA)) != NULL)
+          sprintf(strchr(string1, 0), "\nCh.%s", stringValue(att->val));
+      }
+      break;
+    case SISTAW:
+      strcpy(string1, "SS");
+      if (obj != NULL) {
+        if ((att = getAtt(obj, CATSIW)) != NULL)
+          strcat(string1, siw_map[att->val.val.l->val]);
+        if ((att = getAtt(obj, COMCHA)) != NULL)
+          sprintf(strchr(string1, 0), "\nCh.%s", stringValue(att->val));
+      }
+      break;
+    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: plications/editors/josm/plugins/smed2/src/seamap/NoticeRender.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/NoticeRender.java	(revision 29339)
+++ 	(revision )
@@ -1,216 +1,0 @@
-/* Copyright 2013 Malcolm Herring
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 3 of the License.
- *
- * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
- */
-
-package seamap;
-
-public class NoticeRender {
-	/*void renderNotice(Item_t *item) {
-  double dx = 0.0, dy = 0.0;
-  int n = countObjects(item, "notice");
-  if (n > 2) {
-    renderCluster(item, "notice");
-    return;
-  }
-  switch (item->objs.obj) {
-    case BCNCAR:
-    case BCNISD:
-    case BCNLAT:
-    case BCNSAW:
-    case BCNSPP:
-    case BCNWTW:
-      dy = 45.0;
-      break;
-    case NOTMRK:
-      dy = 0.0;
-      break;
-    default:
-      return;
-  }
-  bool swap = false;
-  if (n == 2) {
-    for (int i = 0; i <=2; i++) {
-      Obj_t *obj = getObj(item, NOTMRK, i);
-      if (obj == NULL) continue;
-      Atta_t add;
-      int idx = 0;
-      while ((add = getAttEnum(obj, ADDMRK, idx++)) != MRK_UNKN) {
-        if ((add == MRK_LTRI) && (i == 2)) swap = true;
-        if ((add == MRK_RTRI) && (i != 2)) swap = true;
-      }
-    }
-  }
-  for (int i = 0; i <=2; i++) {
-    Obj_t *obj = getObj(item, NOTMRK, i);
-    if (obj == NULL) continue;
-    Atta_t category = getAttEnum(obj, CATNMK, i);
-    Atta_t add;
-    int idx = 0;
-    int top=0, bottom=0, left=0, right=0;
-    while ((add = getAttEnum(obj, ADDMRK, idx++)) != MRK_UNKN) {
-      switch (add) {
-        case MRK_TOPB:
-          top = add;
-          break;
-        case MRK_BOTB:
-        case MRK_BTRI:
-          bottom = add;
-          break;
-        case MRK_LTRI:
-          left = add;
-          break;
-        case MRK_RTRI:
-          right = add;
-          break;
-        default:
-          break;
-      }
-    }
-    double orient = getAtt(obj, ORIENT) != NULL ? getAtt(obj, ORIENT)->val.val.f : 0.0;
-    int system = getAtt(obj, MARSYS) != NULL ? getAtt(obj, MARSYS)->val.val.e : 0;
-    double flip = 0.0;
-    char *symb = "";
-    char *base = "";
-    char *colour = "black";
-    if ((system == SYS_BWR2) || (system == SYS_BNWR)) {
-      symb = bniwr_map[category];
-      switch (category) {
-        case NMK_NANK:
-        case NMK_LMHR:
-        case NMK_KTPM...NMK_RSPD:
-        {
-          int bank = getAtt(obj, BNKWTW) != NULL ? getAtt(obj, BNKWTW)->val.val.e : 0;
-          switch (bank) {
-            case BWW_LEFT:
-              base = "notice_blb";
-              colour = "red";
-              break;
-            case BWW_RGHT:
-              base = "notice_brb";
-              colour = "green";
-              break;
-            default:
-              base = "notice_bsi";
-              colour = "black";
-              break;
-          }
-        }
-        default:
-          break;
-      }
-    } else if (system == SYS_PPWB) {
-      int bank = getAtt(obj, BNKWTW) != NULL ? getAtt(obj, BNKWTW)->val.val.e : 0;
-      if (bank != 0) {
-        switch (category) {
-          case NMK_WLAR:
-            if (bank == BNK_LEFT)
-              base = "notice_pwlarl";
-            else
-              base = "notice_pwlarr";
-            break;
-          case NMK_WRAL:
-            if (bank == BNK_LEFT)
-              base = "notice_pwrall";
-            else
-              base = "notice_pwralr";
-            break;
-          case NMK_KTPM:
-            if (bank == BNK_LEFT)
-              base = "notice_ppml";
-            else
-              base = "notice_ppmr";
-            break;
-          case NMK_KTSM:
-            if (bank == BNK_LEFT)
-              base = "notice_psml";
-            else
-              base = "notice_psmr";
-            break;
-          case NMK_KTMR:
-            if (bank == BNK_LEFT)
-              base = "notice_pmrl";
-            else
-              base = "notice_pmrr";
-            break;
-          case NMK_CRTP:
-          if (bank == BNK_LEFT)
-              base = "notice_pcpl";
-            else
-              base = "notice_pcpr";
-            break;
-          case NMK_CRTS:
-            if (bank == BNK_LEFT)
-              base = "notice_pcsl";
-            else
-              base = "notice_pcsr";
-            break;
-          default:
-            break;
-        }
-      }
-    } else {
-      symb = notice_map[category];
-      switch (category) {
-        case NMK_NOVK...NMK_NWSH:
-        case NMK_NMTC...NMK_NLBG:
-          base = "notice_a";
-          break;
-        case NMK_MVTL...NMK_CHDR:
-          base = "notice_b";
-          break;
-        case NMK_PRTL...NMK_PRTR:
-        case NMK_OVHC...NMK_LBGP:
-          base = "notice_e";
-          colour = "white";
-          break;
-        default:
-          break;
-      }
-      switch (category) {
-        case NMK_MVTL:
-        case NMK_ANKP:
-        case NMK_PRTL:
-        case NMK_MWAL:
-        case NMK_MWAR:
-          flip = 180.0;
-          break;
-        case NMK_SWWR:
-        case NMK_WRSL:
-        case NMK_WARL:
-          flip = -90.0;
-          break;
-        case NMK_SWWC:
-        case NMK_SWWL:
-        case NMK_WLSR:
-        case NMK_WALR:
-          flip = 90.0;
-          break;
-        default:
-          break;
-      }
-    }
-    if (n == 2) {
-      dx = (((i != 2) && swap) || ((i == 2) && !swap)) ? -30.0 : 30.0;
-    }
-    if (top == MRK_TOPB)
-      renderSymbol(item, NOTMRK, "notice_board", "", "", BC, dx, dy, orient);
-    if (bottom == MRK_BOTB)
-      renderSymbol(item, NOTMRK, "notice_board", "", "", BC, dx, dy, orient+180);
-    if (bottom == MRK_BTRI)
-      renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient+180);
-    if (left == MRK_LTRI)
-      renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient-90);
-    if (right == MRK_RTRI)
-      renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient+90);
-    renderSymbol(item, NOTMRK, base, "", "", CC, dx, dy, orient);
-    renderSymbol(item, NOTMRK, symb, "", colour, CC, dx, dy, orient+flip);
-  }
-}
-*/
-
-}
Index: /applications/editors/josm/plugins/smed2/src/seamap/Rules.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/seamap/Rules.java	(revision 29339)
+++ /applications/editors/josm/plugins/smed2/src/seamap/Rules.java	(revision 29340)
@@ -15,4 +15,5 @@
 import java.util.ArrayList;
 
+import s57.S57val;
 import s57.S57val.*;
 import s57.S57att.*;
@@ -466,6 +467,218 @@
 */
 	}
+
 	private static void notices(Feature feature) {
 		if (zoom >= 14) {
+			double dx = 0.0, dy = 0.0;
+			switch (feature.type) {
+			case BCNCAR:
+			case BCNISD:
+			case BCNLAT:
+			case BCNSAW:
+			case BCNSPP:
+			case BCNWTW:
+				dy = 45.0;
+				break;
+			case NOTMRK:
+				dy = 0.0;
+				break;
+			default:
+				return;
+			}
+			Symbol s1 = null, s2 = null;
+			MarSYS sys = MarSYS.SYS_CEVN;
+			AttItem att = feature.atts.get(Att.MARSYS);
+			if (att != null) sys = (MarSYS)att.val;
+			ObjTab objs = feature.objs.get(Obj.NOTMRK);
+			int n = objs.size();
+			if (n > 2) {
+				s1 = Notices.Notice;
+				n = 1;
+			} else {
+				for (AttMap atts : objs.values()) {
+					if (atts.get(Att.MARSYS) != null) sys = (MarSYS)atts.get(Att.MARSYS).val;
+					CatNMK cat = CatNMK.NMK_UNKN;
+					if (atts.get(Att.CATNMK) != null) cat = (CatNMK)atts.get(Att.CATNMK).val;
+					s2 = Notices.getNotice(cat, sys);
+				}
+			}
+/*      Obj_t *obj = getObj(item, NOTMRK, i);
+      if (obj == NULL) continue;
+      Atta_t add;
+      int idx = 0;
+      while ((add = getAttEnum(obj, ADDMRK, idx++)) != MRK_UNKN) {
+        if ((add == MRK_LTRI) && (i == 2)) swap = true;
+        if ((add == MRK_RTRI) && (i != 2)) swap = true;
+      }
+    }
+  } else {
+  	
+  }
+  for (int i = 0; i <=2; i++) {
+    Obj_t *obj = getObj(item, NOTMRK, i);
+    if (obj == NULL) continue;
+    Atta_t category = getAttEnum(obj, CATNMK, i);
+    Atta_t add;
+    int idx = 0;
+    int top=0, bottom=0, left=0, right=0;
+    while ((add = getAttEnum(obj, ADDMRK, idx++)) != MRK_UNKN) {
+      switch (add) {
+        case MRK_TOPB:
+          top = add;
+          break;
+        case MRK_BOTB:
+        case MRK_BTRI:
+          bottom = add;
+          break;
+        case MRK_LTRI:
+          left = add;
+          break;
+        case MRK_RTRI:
+          right = add;
+          break;
+        default:
+          break;
+      }
+    }
+    double orient = getAtt(obj, ORIENT) != NULL ? getAtt(obj, ORIENT)->val.val.f : 0.0;
+    int system = getAtt(obj, MARSYS) != NULL ? getAtt(obj, MARSYS)->val.val.e : 0;
+    double flip = 0.0;
+    char *symb = "";
+    char *base = "";
+    char *colour = "black";
+    if ((system == SYS_BWR2) || (system == SYS_BNWR)) {
+      symb = bniwr_map[category];
+      switch (category) {
+        case NMK_NANK:
+        case NMK_LMHR:
+        case NMK_KTPM...NMK_RSPD:
+        {
+          int bank = getAtt(obj, BNKWTW) != NULL ? getAtt(obj, BNKWTW)->val.val.e : 0;
+          switch (bank) {
+            case BWW_LEFT:
+              base = "notice_blb";
+              colour = "red";
+              break;
+            case BWW_RGHT:
+              base = "notice_brb";
+              colour = "green";
+              break;
+            default:
+              base = "notice_bsi";
+              colour = "black";
+              break;
+          }
+        }
+        default:
+          break;
+      }
+    } else if (system == SYS_PPWB) {
+      int bank = getAtt(obj, BNKWTW) != NULL ? getAtt(obj, BNKWTW)->val.val.e : 0;
+      if (bank != 0) {
+        switch (category) {
+          case NMK_WLAR:
+            if (bank == BNK_LEFT)
+              base = "notice_pwlarl";
+            else
+              base = "notice_pwlarr";
+            break;
+          case NMK_WRAL:
+            if (bank == BNK_LEFT)
+              base = "notice_pwrall";
+            else
+              base = "notice_pwralr";
+            break;
+          case NMK_KTPM:
+            if (bank == BNK_LEFT)
+              base = "notice_ppml";
+            else
+              base = "notice_ppmr";
+            break;
+          case NMK_KTSM:
+            if (bank == BNK_LEFT)
+              base = "notice_psml";
+            else
+              base = "notice_psmr";
+            break;
+          case NMK_KTMR:
+            if (bank == BNK_LEFT)
+              base = "notice_pmrl";
+            else
+              base = "notice_pmrr";
+            break;
+          case NMK_CRTP:
+          if (bank == BNK_LEFT)
+              base = "notice_pcpl";
+            else
+              base = "notice_pcpr";
+            break;
+          case NMK_CRTS:
+            if (bank == BNK_LEFT)
+              base = "notice_pcsl";
+            else
+              base = "notice_pcsr";
+            break;
+          default:
+            break;
+        }
+      }
+    } else {
+      symb = notice_map[category];
+      switch (category) {
+        case NMK_NOVK...NMK_NWSH:
+        case NMK_NMTC...NMK_NLBG:
+          base = "notice_a";
+          break;
+        case NMK_MVTL...NMK_CHDR:
+          base = "notice_b";
+          break;
+        case NMK_PRTL...NMK_PRTR:
+        case NMK_OVHC...NMK_LBGP:
+          base = "notice_e";
+          colour = "white";
+          break;
+        default:
+          break;
+      }
+      switch (category) {
+        case NMK_MVTL:
+        case NMK_ANKP:
+        case NMK_PRTL:
+        case NMK_MWAL:
+        case NMK_MWAR:
+          flip = 180.0;
+          break;
+        case NMK_SWWR:
+        case NMK_WRSL:
+        case NMK_WARL:
+          flip = -90.0;
+          break;
+        case NMK_SWWC:
+        case NMK_SWWL:
+        case NMK_WLSR:
+        case NMK_WALR:
+          flip = 90.0;
+          break;
+        default:
+          break;
+      }
+    }
+    if (n == 2) {
+      dx = (((i != 2) && swap) || ((i == 2) && !swap)) ? -30.0 : 30.0;
+    }
+    if (top == MRK_TOPB)
+      renderSymbol(item, NOTMRK, "notice_board", "", "", BC, dx, dy, orient);
+    if (bottom == MRK_BOTB)
+      renderSymbol(item, NOTMRK, "notice_board", "", "", BC, dx, dy, orient+180);
+    if (bottom == MRK_BTRI)
+      renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient+180);
+    if (left == MRK_LTRI)
+      renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient-90);
+    if (right == MRK_RTRI)
+      renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient+90);
+    renderSymbol(item, NOTMRK, base, "", "", CC, dx, dy, orient);
+    renderSymbol(item, NOTMRK, symb, "", colour, CC, dx, dy, orient+flip);
+  }
+*/
 		}
 	}
Index: /applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java	(revision 29339)
+++ /applications/editors/josm/plugins/smed2/src/smed2/Smed2Action.java	(revision 29340)
@@ -50,56 +50,40 @@
 		@Override
 		public void dataChanged(DataChangedEvent e) {
-//			System.out.println("DataChangedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 
 		@Override
 		public void nodeMoved(NodeMovedEvent e) {
-//			System.out.println("NodeMovedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 
 		@Override
 		public void otherDatasetChange(AbstractDatasetChangedEvent e) {
-//			System.out.println("AbstractDatasetChangedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 
 		@Override
 		public void primitivesAdded(PrimitivesAddedEvent e) {
-//			System.out.println("PrimitivesAddedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 
 		@Override
 		public void primitivesRemoved(PrimitivesRemovedEvent e) {
-//			System.out.println("PrimitivesRemovedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 
 		@Override
 		public void relationMembersChanged(RelationMembersChangedEvent e) {
-//			System.out.println("RelationMembersChangedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 
 		@Override
 		public void tagsChanged(TagsChangedEvent e) {
-//			System.out.println("TagsChangedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 
 		@Override
 		public void wayNodesChanged(WayNodesChangedEvent e) {
-//			System.out.println("WayNodesChangedEvent");
-			makeMap();
-			if (rendering != null) rendering.zoomChanged();
+			makeMap();
 		}
 	};
@@ -180,5 +164,4 @@
 			data = newLayer.data;
 			makeMap();
-			if (rendering != null) rendering.zoomChanged();
 		} else {
 			data = null;
@@ -259,4 +242,5 @@
 				map.tagsDone(rel.getUniqueId());
 			}
+			if (rendering != null) rendering.zoomChanged();
 		}
 	}
Index: /applications/editors/josm/plugins/smed2/src/symbols/Notices.java
===================================================================
--- /applications/editors/josm/plugins/smed2/src/symbols/Notices.java	(revision 29339)
+++ /applications/editors/josm/plugins/smed2/src/symbols/Notices.java	(revision 29340)
@@ -15,5 +15,7 @@
 import java.awt.Rectangle;
 import java.awt.geom.*;
-
+import java.util.EnumMap;
+
+import s57.S57val.*;
 import symbols.Symbols.*;
 
@@ -252,4 +254,6 @@
 		NoticeA20.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Waterbike, 1.0, 0, 0, null, null)));
 	}
+	public static final Symbol NoticeB1a = new Symbol();
+	public static final Symbol NoticeB1b = new Symbol();
 	public static final Symbol NoticeB2a = new Symbol();
 	public static final Symbol NoticeB2b = new Symbol();
@@ -259,14 +263,18 @@
 	public static final Symbol NoticeB4b = new Symbol();
 	public static final Symbol NoticeB5 = new Symbol();
+	public static final Symbol NoticeB6 = new Symbol();
 	public static final Symbol NoticeB7 = new Symbol();
 	public static final Symbol NoticeB8 = new Symbol();
-	public static final Symbol NoticeB11a = new Symbol();
-	static {
-		NoticeB11a.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeB, 1.0, 0, 0, null, null)));
-		NoticeB11a.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.VHF, 1.0, 0, 0, null, null)));
+	public static final Symbol NoticeB9a = new Symbol();
+	public static final Symbol NoticeB9b = new Symbol();
+	public static final Symbol NoticeB11 = new Symbol();
+	static {
+		NoticeB11.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeB, 1.0, 0, 0, null, null)));
+		NoticeB11.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.VHF, 1.0, 0, 0, null, null)));
 	}
 	public static final Symbol NoticeC1 = new Symbol();
 	public static final Symbol NoticeC2 = new Symbol();
 	public static final Symbol NoticeC3 = new Symbol();
+	public static final Symbol NoticeC4 = new Symbol();
 	public static final Symbol NoticeC5a = new Symbol();
 	public static final Symbol NoticeC5b = new Symbol();
@@ -275,4 +283,6 @@
 	public static final Symbol NoticeD2a = new Symbol();
 	public static final Symbol NoticeD2b = new Symbol();
+	public static final Symbol NoticeD3a = new Symbol();
+	public static final Symbol NoticeD3b = new Symbol();
 	public static final Symbol NoticeE1 = new Symbol();
 	public static final Symbol NoticeE2 = new Symbol();
@@ -280,4 +290,8 @@
 	public static final Symbol NoticeE4a = new Symbol();
 	public static final Symbol NoticeE4b = new Symbol();
+	public static final Symbol NoticeE5 = new Symbol();
+	public static final Symbol NoticeE5_1 = new Symbol();
+	public static final Symbol NoticeE5_2 = new Symbol();
+	public static final Symbol NoticeE5_3 = new Symbol();
 	public static final Symbol NoticeE5_4 = new Symbol();
 	public static final Symbol NoticeE5_5 = new Symbol();
@@ -292,7 +306,97 @@
 	public static final Symbol NoticeE5_14 = new Symbol();
 	public static final Symbol NoticeE5_15 = new Symbol();
+	public static final Symbol NoticeE6 = new Symbol();
+	public static final Symbol NoticeE7 = new Symbol();
 	public static final Symbol NoticeE7_1 = new Symbol();
-	public static final Symbol Notice11 = new Symbol();
-	public static final Symbol Notice13 = new Symbol();
-	public static final Symbol Notice14 = new Symbol();
+	public static final Symbol NoticeE8 = new Symbol();
+	public static final Symbol NoticeE9a = new Symbol();
+	public static final Symbol NoticeE9b = new Symbol();
+	public static final Symbol NoticeE9c = new Symbol();
+	public static final Symbol NoticeE9d = new Symbol();
+	public static final Symbol NoticeE9e = new Symbol();
+	public static final Symbol NoticeE9f = new Symbol();
+	public static final Symbol NoticeE9g = new Symbol();
+	public static final Symbol NoticeE9h = new Symbol();
+	public static final Symbol NoticeE9i = new Symbol();
+	public static final Symbol NoticeE10a = new Symbol();
+	public static final Symbol NoticeE10b = new Symbol();
+	public static final Symbol NoticeE10c = new Symbol();
+	public static final Symbol NoticeE10d = new Symbol();
+	public static final Symbol NoticeE10e = new Symbol();
+	public static final Symbol NoticeE10f = new Symbol();
+	public static final Symbol NoticeE11 = new Symbol();
+	public static final Symbol NoticeE13 = new Symbol();
+	public static final Symbol NoticeE14 = new Symbol();
+	public static final Symbol NoticeE15 = new Symbol();
+	public static final Symbol NoticeE16 = new Symbol();
+	public static final Symbol NoticeE17 = new Symbol();
+	public static final Symbol NoticeE18 = new Symbol();
+	public static final Symbol NoticeE19 = new Symbol();
+	public static final Symbol NoticeE20 = new Symbol();
+	public static final Symbol NoticeE21 = new Symbol();
+	public static final Symbol NoticeE22 = new Symbol();
+	public static final Symbol NoticeE23 = new Symbol();
+	public static final Symbol NoticeE24 = new Symbol();
+
+	public static final EnumMap<CatNMK, Symbol> NmkCevni = new EnumMap<CatNMK, Symbol>(CatNMK.class);
+	static {
+		NmkCevni.put(CatNMK.NMK_UNKN, Notice); NmkCevni.put(CatNMK.NMK_NENT, NoticeA1); NmkCevni.put(CatNMK.NMK_CLSA, NoticeA1a); NmkCevni.put(CatNMK.NMK_NOVK, NoticeA2);
+		NmkCevni.put(CatNMK.NMK_NCOV, NoticeA3); NmkCevni.put(CatNMK.NMK_NPAS, NoticeA4); NmkCevni.put(CatNMK.NMK_NBRT, NoticeA5); NmkCevni.put(CatNMK.NMK_NBLL, NoticeA5_1);
+		NmkCevni.put(CatNMK.NMK_NANK, NoticeA6); NmkCevni.put(CatNMK.NMK_NMOR, NoticeA7); NmkCevni.put(CatNMK.NMK_NTRN, NoticeA8); NmkCevni.put(CatNMK.NMK_NWSH, NoticeA9);
+		NmkCevni.put(CatNMK.NMK_NPSL, NoticeA10a); NmkCevni.put(CatNMK.NMK_NPSR, NoticeA10b); NmkCevni.put(CatNMK.NMK_NMTC, NoticeA12); NmkCevni.put(CatNMK.NMK_NSPC, NoticeA13);
+		NmkCevni.put(CatNMK.NMK_NWSK, NoticeA14); NmkCevni.put(CatNMK.NMK_NSLC, NoticeA15); NmkCevni.put(CatNMK.NMK_NUPC, NoticeA16); NmkCevni.put(CatNMK.NMK_NSLB, NoticeA17);
+		NmkCevni.put(CatNMK.NMK_NWBK, NoticeA20); NmkCevni.put(CatNMK.NMK_NHSC, NoticeA18); NmkCevni.put(CatNMK.NMK_NLBG, NoticeA19);
+		NmkCevni.put(CatNMK.NMK_MVTL, NoticeB1a); NmkCevni.put(CatNMK.NMK_MVTR, NoticeB1b); NmkCevni.put(CatNMK.NMK_MVTP, NoticeB2a); NmkCevni.put(CatNMK.NMK_MVTS, NoticeB2b);
+		NmkCevni.put(CatNMK.NMK_KPTP, NoticeB3a); NmkCevni.put(CatNMK.NMK_KPTS, NoticeB3b); NmkCevni.put(CatNMK.NMK_CSTP, NoticeB4a); NmkCevni.put(CatNMK.NMK_CSTS, NoticeB4b);
+		NmkCevni.put(CatNMK.NMK_STOP, NoticeB5); NmkCevni.put(CatNMK.NMK_SPDL, NoticeB6); NmkCevni.put(CatNMK.NMK_SHRN, NoticeB7); NmkCevni.put(CatNMK.NMK_KPLO, NoticeB8);
+		NmkCevni.put(CatNMK.NMK_GWJN, NoticeB9a); NmkCevni.put(CatNMK.NMK_GWCS, NoticeB9b); NmkCevni.put(CatNMK.NMK_MKRC, NoticeB11);
+		NmkCevni.put(CatNMK.NMK_LMDP, NoticeC1); NmkCevni.put(CatNMK.NMK_LMHR, NoticeC2);	NmkCevni.put(CatNMK.NMK_LMWD, NoticeC3); NmkCevni.put(CatNMK.NMK_NAVR, NoticeC4);
+		NmkCevni.put(CatNMK.NMK_CHDL, NoticeC5a); NmkCevni.put(CatNMK.NMK_CHDR, NoticeC5b);
+		NmkCevni.put(CatNMK.NMK_CHTW, NoticeD1a); NmkCevni.put(CatNMK.NMK_CHOW, NoticeD1b); NmkCevni.put(CatNMK.NMK_OPTR, NoticeD2a); NmkCevni.put(CatNMK.NMK_OPTL, NoticeD2b);
+		NmkCevni.put(CatNMK.NMK_PRTL, NoticeD3a); NmkCevni.put(CatNMK.NMK_PRTR, NoticeD3b);
+		NmkCevni.put(CatNMK.NMK_ENTP, NoticeE1); NmkCevni.put(CatNMK.NMK_OVHC, NoticeE2);	NmkCevni.put(CatNMK.NMK_WEIR, NoticeE3); NmkCevni.put(CatNMK.NMK_FERN, NoticeE4a);
+		NmkCevni.put(CatNMK.NMK_FERI, NoticeE4b); NmkCevni.put(CatNMK.NMK_BRTP, NoticeE5);	NmkCevni.put(CatNMK.NMK_BTLL, NoticeE5_1); NmkCevni.put(CatNMK.NMK_BTLS, NoticeE5_2);
+		NmkCevni.put(CatNMK.NMK_BTRL, NoticeE5_3); NmkCevni.put(CatNMK.NMK_BTUP, NoticeE5_4);	NmkCevni.put(CatNMK.NMK_BTP1, NoticeE5_5); NmkCevni.put(CatNMK.NMK_BTP2, NoticeE5_6);
+		NmkCevni.put(CatNMK.NMK_BTP3, NoticeE5_7); NmkCevni.put(CatNMK.NMK_BTUN, NoticeE5_8);	NmkCevni.put(CatNMK.NMK_BTN1, NoticeE5_9); NmkCevni.put(CatNMK.NMK_BTN2, NoticeE5_10);
+		NmkCevni.put(CatNMK.NMK_BTN3, NoticeE5_11); NmkCevni.put(CatNMK.NMK_BTUM, NoticeE5_12);	NmkCevni.put(CatNMK.NMK_BTU1, NoticeE5_13); NmkCevni.put(CatNMK.NMK_BTU2, NoticeE5_14);
+		NmkCevni.put(CatNMK.NMK_BTU3, NoticeE5_15); NmkCevni.put(CatNMK.NMK_ANKP, NoticeE6);	NmkCevni.put(CatNMK.NMK_MORP, NoticeE7); NmkCevni.put(CatNMK.NMK_VLBT, NoticeE7_1);
+		NmkCevni.put(CatNMK.NMK_TRNA, NoticeE8); NmkCevni.put(CatNMK.NMK_SWWC, NoticeE9a);	NmkCevni.put(CatNMK.NMK_SWWR, NoticeE9b); NmkCevni.put(CatNMK.NMK_SWWL, NoticeE9c);
+		NmkCevni.put(CatNMK.NMK_WRSA, NoticeE9d); NmkCevni.put(CatNMK.NMK_WLSA, NoticeE9e);	NmkCevni.put(CatNMK.NMK_WRSL, NoticeE9f); NmkCevni.put(CatNMK.NMK_WLSR, NoticeE9g);
+		NmkCevni.put(CatNMK.NMK_WRAL, NoticeE9h); NmkCevni.put(CatNMK.NMK_WLAR, NoticeE9i);	NmkCevni.put(CatNMK.NMK_MWWC, NoticeE10a); NmkCevni.put(CatNMK.NMK_MWWJ, NoticeE10b);
+		NmkCevni.put(CatNMK.NMK_MWAR, NoticeE10c); NmkCevni.put(CatNMK.NMK_MWAL, NoticeE10d);	NmkCevni.put(CatNMK.NMK_WARL, NoticeE10e); NmkCevni.put(CatNMK.NMK_WALR, NoticeE10f);
+		NmkCevni.put(CatNMK.NMK_PEND, NoticeE11); NmkCevni.put(CatNMK.NMK_DWTR, NoticeE13);	NmkCevni.put(CatNMK.NMK_TELE, NoticeE14); NmkCevni.put(CatNMK.NMK_MTCP, NoticeE15);
+		NmkCevni.put(CatNMK.NMK_SPCP, NoticeE16); NmkCevni.put(CatNMK.NMK_WSKP, NoticeE17);	NmkCevni.put(CatNMK.NMK_SLCP, NoticeE18); NmkCevni.put(CatNMK.NMK_UPCP, NoticeE19);
+		NmkCevni.put(CatNMK.NMK_SLBP, NoticeE20); NmkCevni.put(CatNMK.NMK_RADI, NoticeE23);	NmkCevni.put(CatNMK.NMK_WTBP, NoticeE24); NmkCevni.put(CatNMK.NMK_HSCP, NoticeE21);
+		NmkCevni.put(CatNMK.NMK_LBGP, NoticeE22);
+  };
+
+	public static final EnumMap<CatNMK, Symbol> NmkBniwr = new EnumMap<CatNMK, Symbol>(CatNMK.class);
+	static {
+		NmkBniwr.put(CatNMK.NMK_NANK, Notice); NmkBniwr.put(CatNMK.NMK_LMHR, Notice); NmkBniwr.put(CatNMK.NMK_OPTR, Notice); NmkBniwr.put(CatNMK.NMK_OPTL, Notice);
+		NmkBniwr.put(CatNMK.NMK_WRAL, Notice); NmkBniwr.put(CatNMK.NMK_WLAR, Notice); NmkBniwr.put(CatNMK.NMK_KTPM, Notice); NmkBniwr.put(CatNMK.NMK_KTSM, Notice);
+		NmkBniwr.put(CatNMK.NMK_KTMR, Notice); NmkBniwr.put(CatNMK.NMK_CRTP, Notice); NmkBniwr.put(CatNMK.NMK_CRTS, Notice); NmkBniwr.put(CatNMK.NMK_TRBM, Notice);
+		NmkBniwr.put(CatNMK.NMK_RSPD, Notice);
+	}
+
+	public static final EnumMap<CatNMK, Symbol> NmkPpwbc = new EnumMap<CatNMK, Symbol>(CatNMK.class);
+	static {
+		NmkPpwbc.put(CatNMK.NMK_WRAL, Notice); NmkPpwbc.put(CatNMK.NMK_WLAR, Notice); NmkPpwbc.put(CatNMK.NMK_KTPM, Notice); NmkPpwbc.put(CatNMK.NMK_KTSM, Notice);
+		NmkPpwbc.put(CatNMK.NMK_KTMR, Notice); NmkPpwbc.put(CatNMK.NMK_CRTP, Notice); NmkPpwbc.put(CatNMK.NMK_CRTS, Notice);
+	}
+	
+	public static Symbol getNotice(CatNMK cat, MarSYS sys) {
+		Symbol symbol = null;
+		switch (sys) {
+		case SYS_CEVN:
+			symbol = NmkCevni.get(cat);
+			break;
+		case SYS_BNWR:
+			symbol = NmkBniwr.get(cat);
+			break;
+		case SYS_PPWB:
+			symbol = NmkPpwbc.get(cat);
+			break;
+		}
+		return symbol;
+	}
 }
