| 1 | /* Copyright 2013 Malcolm Herring
|
|---|
| 2 | *
|
|---|
| 3 | * This is free software: you can redistribute it and/or modify
|
|---|
| 4 | * it under the terms of the GNU General Public License as published by
|
|---|
| 5 | * the Free Software Foundation, version 3 of the License.
|
|---|
| 6 | *
|
|---|
| 7 | * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | package seamap;
|
|---|
| 11 |
|
|---|
| 12 | import java.awt.Color;
|
|---|
| 13 | import java.awt.Font;
|
|---|
| 14 | import java.awt.geom.AffineTransform;
|
|---|
| 15 | import java.util.ArrayList;
|
|---|
| 16 |
|
|---|
| 17 | import s57.S57val.*;
|
|---|
| 18 | import s57.S57att.*;
|
|---|
| 19 | import s57.S57obj.*;
|
|---|
| 20 |
|
|---|
| 21 | import seamap.Renderer.*;
|
|---|
| 22 | import seamap.SeaMap.*;
|
|---|
| 23 | import symbols.*;
|
|---|
| 24 | import symbols.Symbols.*;
|
|---|
| 25 |
|
|---|
| 26 | public class Rules {
|
|---|
| 27 |
|
|---|
| 28 | static SeaMap map;
|
|---|
| 29 | static int zoom;
|
|---|
| 30 |
|
|---|
| 31 | public static void rules (SeaMap m, int z) {
|
|---|
| 32 | map = m;
|
|---|
| 33 | zoom = z;
|
|---|
| 34 | ArrayList<Feature> objects;
|
|---|
| 35 | if ((objects = map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) shoreline(feature);
|
|---|
| 36 | if ((objects = map.features.get(Obj.PIPSOL)) != null) for (Feature feature : objects) pipelines(feature);
|
|---|
| 37 | if ((objects = map.features.get(Obj.CBLSUB)) != null) for (Feature feature : objects) cables(feature);
|
|---|
| 38 | if ((objects = map.features.get(Obj.PIPOHD)) != null) for (Feature feature : objects) pipelines(feature);
|
|---|
| 39 | if ((objects = map.features.get(Obj.CBLOHD)) != null) for (Feature feature : objects) cables(feature);
|
|---|
| 40 | if ((objects = map.features.get(Obj.TSEZNE)) != null) for (Feature feature : objects) separation(feature);
|
|---|
| 41 | if ((objects = map.features.get(Obj.TSSCRS)) != null) for (Feature feature : objects) separation(feature);
|
|---|
| 42 | if ((objects = map.features.get(Obj.TSSRON)) != null) for (Feature feature : objects) separation(feature);
|
|---|
| 43 | if ((objects = map.features.get(Obj.TSELNE)) != null) for (Feature feature : objects) separation(feature);
|
|---|
| 44 | if ((objects = map.features.get(Obj.TSSLPT)) != null) for (Feature feature : objects) separation(feature);
|
|---|
| 45 | if ((objects = map.features.get(Obj.TSSBND)) != null) for (Feature feature : objects) separation(feature);
|
|---|
| 46 | if ((objects = map.features.get(Obj.ISTZNE)) != null) for (Feature feature : objects) separation(feature);
|
|---|
| 47 | if ((objects = map.features.get(Obj.SNDWAV)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 48 | if ((objects = map.features.get(Obj.OSPARE)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 49 | if ((objects = map.features.get(Obj.FAIRWY)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 50 | if ((objects = map.features.get(Obj.DRGARE)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 51 | if ((objects = map.features.get(Obj.RESARE)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 52 | if ((objects = map.features.get(Obj.SPLARE)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 53 | if ((objects = map.features.get(Obj.SEAARE)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 54 | if ((objects = map.features.get(Obj.OBSTRN)) != null) for (Feature feature : objects) obstructions(feature);
|
|---|
| 55 | if ((objects = map.features.get(Obj.UWTROC)) != null) for (Feature feature : objects) obstructions(feature);
|
|---|
| 56 | if ((objects = map.features.get(Obj.MARCUL)) != null) for (Feature feature : objects) areas(feature);
|
|---|
| 57 | if ((objects = map.features.get(Obj.WTWAXS)) != null) for (Feature feature : objects) waterways(feature);
|
|---|
| 58 | if ((objects = map.features.get(Obj.RECTRC)) != null) for (Feature feature : objects) transits(feature);
|
|---|
| 59 | if ((objects = map.features.get(Obj.NAVLNE)) != null) for (Feature feature : objects) transits(feature);
|
|---|
| 60 | if ((objects = map.features.get(Obj.HRBFAC)) != null) for (Feature feature : objects) harbours(feature);
|
|---|
| 61 | if ((objects = map.features.get(Obj.ACHARE)) != null) for (Feature feature : objects) harbours(feature);
|
|---|
| 62 | if ((objects = map.features.get(Obj.ACHBRT)) != null) for (Feature feature : objects) harbours(feature);
|
|---|
| 63 | if ((objects = map.features.get(Obj.BERTHS)) != null) for (Feature feature : objects) harbours(feature);
|
|---|
| 64 | if ((objects = map.features.get(Obj.LOKBSN)) != null) for (Feature feature : objects) locks(feature);
|
|---|
| 65 | if ((objects = map.features.get(Obj.LKBSPT)) != null) for (Feature feature : objects) locks(feature);
|
|---|
| 66 | if ((objects = map.features.get(Obj.GATCON)) != null) for (Feature feature : objects) locks(feature);
|
|---|
| 67 | if ((objects = map.features.get(Obj.DISMAR)) != null) for (Feature feature : objects) distances(feature);
|
|---|
| 68 | if ((objects = map.features.get(Obj.HULKES)) != null) for (Feature feature : objects) ports(feature);
|
|---|
| 69 | if ((objects = map.features.get(Obj.CRANES)) != null) for (Feature feature : objects) ports(feature);
|
|---|
| 70 | if ((objects = map.features.get(Obj.LNDMRK)) != null) for (Feature feature : objects) landmarks(feature);
|
|---|
| 71 | if ((objects = map.features.get(Obj.MORFAC)) != null) for (Feature feature : objects) moorings(feature);
|
|---|
| 72 | if ((objects = map.features.get(Obj.NOTMRK)) != null) for (Feature feature : objects) notices(feature);
|
|---|
| 73 | if ((objects = map.features.get(Obj.SMCFAC)) != null) for (Feature feature : objects) marinas(feature);
|
|---|
| 74 | if ((objects = map.features.get(Obj.BRIDGE)) != null) for (Feature feature : objects) bridges(feature);
|
|---|
| 75 | if ((objects = map.features.get(Obj.LITMAJ)) != null) for (Feature feature : objects) lights(feature);
|
|---|
| 76 | if ((objects = map.features.get(Obj.LITMIN)) != null) for (Feature feature : objects) lights(feature);
|
|---|
| 77 | if ((objects = map.features.get(Obj.LIGHTS)) != null) for (Feature feature : objects) lights(feature);
|
|---|
| 78 | if ((objects = map.features.get(Obj.SISTAT)) != null) for (Feature feature : objects) signals(feature);
|
|---|
| 79 | if ((objects = map.features.get(Obj.SISTAW)) != null) for (Feature feature : objects) signals(feature);
|
|---|
| 80 | if ((objects = map.features.get(Obj.CGUSTA)) != null) for (Feature feature : objects) signals(feature);
|
|---|
| 81 | if ((objects = map.features.get(Obj.RDOSTA)) != null) for (Feature feature : objects) signals(feature);
|
|---|
| 82 | if ((objects = map.features.get(Obj.RADSTA)) != null) for (Feature feature : objects) signals(feature);
|
|---|
| 83 | if ((objects = map.features.get(Obj.RSCSTA)) != null) for (Feature feature : objects) signals(feature);
|
|---|
| 84 | if ((objects = map.features.get(Obj.PILBOP)) != null) for (Feature feature : objects) signals(feature);
|
|---|
| 85 | if ((objects = map.features.get(Obj.WTWGAG)) != null) for (Feature feature : objects) gauges(feature);
|
|---|
| 86 | if ((objects = map.features.get(Obj.OFSPLF)) != null) for (Feature feature : objects) platforms(feature);
|
|---|
| 87 | if ((objects = map.features.get(Obj.WRECKS)) != null) for (Feature feature : objects) wrecks(feature);
|
|---|
| 88 | if ((objects = map.features.get(Obj.LITVES)) != null) for (Feature feature : objects) floats(feature);
|
|---|
| 89 | if ((objects = map.features.get(Obj.LITFLT)) != null) for (Feature feature : objects) floats(feature);
|
|---|
| 90 | if ((objects = map.features.get(Obj.BOYINB)) != null) for (Feature feature : objects) floats(feature);
|
|---|
| 91 | if ((objects = map.features.get(Obj.BOYLAT)) != null) for (Feature feature : objects) buoys(feature);
|
|---|
| 92 | if ((objects = map.features.get(Obj.BOYCAR)) != null) for (Feature feature : objects) buoys(feature);
|
|---|
| 93 | if ((objects = map.features.get(Obj.BOYISD)) != null) for (Feature feature : objects) buoys(feature);
|
|---|
| 94 | if ((objects = map.features.get(Obj.BOYSAW)) != null) for (Feature feature : objects) buoys(feature);
|
|---|
| 95 | if ((objects = map.features.get(Obj.BOYSPP)) != null) for (Feature feature : objects) buoys(feature);
|
|---|
| 96 | if ((objects = map.features.get(Obj.BOYWTW)) != null) for (Feature feature : objects) buoys(feature);
|
|---|
| 97 | if ((objects = map.features.get(Obj.BCNLAT)) != null) for (Feature feature : objects) beacons(feature);
|
|---|
| 98 | if ((objects = map.features.get(Obj.BCNCAR)) != null) for (Feature feature : objects) beacons(feature);
|
|---|
| 99 | if ((objects = map.features.get(Obj.BCNISD)) != null) for (Feature feature : objects) beacons(feature);
|
|---|
| 100 | if ((objects = map.features.get(Obj.BCNSAW)) != null) for (Feature feature : objects) beacons(feature);
|
|---|
| 101 | if ((objects = map.features.get(Obj.BCNSPP)) != null) for (Feature feature : objects) beacons(feature);
|
|---|
| 102 | if ((objects = map.features.get(Obj.BCNWTW)) != null) for (Feature feature : objects) beacons(feature);
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | private static void areas(Feature feature) {
|
|---|
| 106 | AttItem name = feature.atts.get(Att.OBJNAM);
|
|---|
| 107 | switch (feature.type) {
|
|---|
| 108 | case DRGARE:
|
|---|
| 109 | if (zoom < 16)
|
|---|
| 110 | Renderer.lineVector(feature, new LineStyle(Color.black, 8, new float[] { 25, 25 }, new Color(0x40ffffff, true)));
|
|---|
| 111 | else
|
|---|
| 112 | Renderer.lineVector(feature, new LineStyle(Color.black, 8, new float[] { 25, 25 }, null));
|
|---|
| 113 | if ((zoom >= 12) && (name != null))
|
|---|
| 114 | Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.PLAIN, 100), LabelStyle.NONE, Color.black, null, null);
|
|---|
| 115 | break;
|
|---|
| 116 | case FAIRWY:
|
|---|
| 117 | if (feature.area > 2.0) {
|
|---|
| 118 | if (zoom < 16)
|
|---|
| 119 | Renderer.lineVector(feature, new LineStyle(new Color(0xc480ff), 8, new float[] { 50, 50 }, new Color(0x40ffffff, true)));
|
|---|
| 120 | else
|
|---|
| 121 | Renderer.lineVector(feature, new LineStyle(new Color(0xc480ff), 8, new float[] { 50, 50 }, null));
|
|---|
| 122 | } else {
|
|---|
| 123 | if (zoom >= 14)
|
|---|
| 124 | Renderer.lineVector(feature, new LineStyle(new Color(0x40ffffff, true), 0, null, null));
|
|---|
| 125 | }
|
|---|
| 126 | break;
|
|---|
| 127 | case MARCUL:
|
|---|
| 128 | if (zoom >= 14)
|
|---|
| 129 | Renderer.symbol(feature, Areas.MarineFarm, Obj.MARCUL, null, null);
|
|---|
| 130 | if (zoom >= 16)
|
|---|
| 131 | Renderer.lineVector(feature, new LineStyle( Color.black, 4, new float[] { 10, 10 }, null));
|
|---|
| 132 | break;
|
|---|
| 133 | case OSPARE:
|
|---|
| 134 | if ((CatPRA)Renderer.getAttVal(feature, feature.type, 0, Att.CATPRA) == CatPRA.PRA_WFRM) {
|
|---|
| 135 | Renderer.symbol(feature, Areas.WindFarm, Obj.OSPARE, null, null);
|
|---|
| 136 | Renderer.lineVector(feature, new LineStyle(Color.black, 20, new float[] { 40, 40 }, null));
|
|---|
| 137 | if ((zoom >= 15) && (name != null))
|
|---|
| 138 | Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 10)));
|
|---|
| 139 | }
|
|---|
| 140 | break;
|
|---|
| 141 | case RESARE:
|
|---|
| 142 | if (zoom >= 12) {
|
|---|
| 143 | Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0, new Color(0x80c480));
|
|---|
| 144 | // if ((CatREA)Renderer.getAttVal(feature, feature.type, 0, Att.CATREA) == CatREA.REA_NWAK)
|
|---|
| 145 | // Renderer.symbol(feature, Areas.NoWake, Obj.RESARE, null);
|
|---|
| 146 | }
|
|---|
| 147 | break;
|
|---|
| 148 | case SEAARE:
|
|---|
| 149 | switch ((CatSEA) Renderer.getAttVal(feature, feature.type, 0, Att.CATSEA)) {
|
|---|
| 150 | case SEA_RECH:
|
|---|
| 151 | break;
|
|---|
| 152 | case SEA_BAY:
|
|---|
| 153 | break;
|
|---|
| 154 | case SEA_SHOL:
|
|---|
| 155 | break;
|
|---|
| 156 | case SEA_GAT:
|
|---|
| 157 | case SEA_NRRW:
|
|---|
| 158 | break;
|
|---|
| 159 | }
|
|---|
| 160 | break;
|
|---|
| 161 | /*
|
|---|
| 162 | if (is_type("sea_area")) {
|
|---|
| 163 | if (has_attribute("category")) {
|
|---|
| 164 | make_string("");
|
|---|
| 165 | attribute_switch("category")
|
|---|
| 166 | attribute_case("reach") { if (zoom >= 10) add_string("font-family:Arial;font-weight:normal;font-style:italic;font-size:150;text-anchor:middle") }
|
|---|
| 167 | attribute_case("bay") { if (zoom >= 12) add_string("font-family:Arial;font-weight:normal;font-style:italic;font-size:150;text-anchor:middle") }
|
|---|
| 168 | attribute_case("shoal") { if (zoom >= 14) {
|
|---|
| 169 | if (is_area) {
|
|---|
| 170 | area("stroke:#c480ff;stroke-width:4;stroke-dasharray:25,25;fill:none");
|
|---|
| 171 | if (has_item_attribute("name")) text(item_attribute("name"), "font-family:Arial;font-weight:normal;font-style:italic;font-size:75;text-anchor:middle", 0, -40);
|
|---|
| 172 | text("(Shoal)", "font-family:Arial;font-weight:normal;font-size:60;text-anchor:middle", 0, 0);
|
|---|
| 173 | } else if (is_line) {
|
|---|
| 174 | if (has_item_attribute("name")) way_text(item_attribute("name"), "font-family:Arial;font-weight:normal;font-style:italic;font-size:75;text-anchor:middle", 0.5, -40, line("stroke:none;fill:none"));
|
|---|
| 175 | way_text("(Shoal)", "font-family:Arial;font-weight:normal;font-size:60;text-anchor:middle", 0.5, 0, line("stroke:none;fill:none"));
|
|---|
| 176 | } else {
|
|---|
| 177 | if (has_item_attribute("name")) text(item_attribute("name"), "font-family:Arial;font-weight:normal;font-style:italic;font-size:75;text-anchor:middle", 0, -40);
|
|---|
| 178 | text("(Shoal)", "font-family:Arial;font-weight:normal;font-size:60;text-anchor:middle", 0, 0);
|
|---|
| 179 | }
|
|---|
| 180 | }
|
|---|
| 181 | }
|
|---|
| 182 | attribute_case("gat|narrows") { if (zoom >= 12) add_string("font-family:Arial;font-weight:normal;font-style:italic;font-size:100;text-anchor:middle") }
|
|---|
| 183 | end_switch
|
|---|
| 184 | if ((strlen(string) > 0) && !attribute_test("category", "shoal")) {
|
|---|
| 185 | int ref = line("stroke:none;fill:none");
|
|---|
| 186 | if (ref != 0) {
|
|---|
| 187 | if (has_item_attribute("name")) way_text(item_attribute("name"), string, 0.5, 0, ref);
|
|---|
| 188 | } else {
|
|---|
| 189 | if (has_item_attribute("name")) text(item_attribute("name"), string, 0, 0);
|
|---|
| 190 | }
|
|---|
| 191 | }
|
|---|
| 192 | free_string
|
|---|
| 193 | }
|
|---|
| 194 | }
|
|---|
| 195 | */
|
|---|
| 196 | case SNDWAV:
|
|---|
| 197 | if (zoom >= 12) Renderer.fillPattern(feature, Areas.Sandwaves);
|
|---|
| 198 | break;
|
|---|
| 199 | case SPLARE:
|
|---|
| 200 | if (zoom >= 12) {
|
|---|
| 201 | Renderer.symbol(feature, Areas.Plane, Obj.SPLARE, null, null);
|
|---|
| 202 | Renderer.lineSymbols(feature, Areas.Restricted, 0.5, Areas.LinePlane, 10, new Color(0x80c480));
|
|---|
| 203 | }
|
|---|
| 204 | if ((zoom >= 15) && (name != null))
|
|---|
| 205 | Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90)));
|
|---|
| 206 | break;
|
|---|
| 207 | }
|
|---|
| 208 | }
|
|---|
| 209 |
|
|---|
| 210 | private static void beacons(Feature feature) {
|
|---|
| 211 | BcnSHP shape = (BcnSHP) Renderer.getAttVal(feature, feature.type, 0, Att.BCNSHP);
|
|---|
| 212 | if (((shape == BcnSHP.BCN_PRCH) || (shape == BcnSHP.BCN_WTHY)) && (feature.type == Obj.BCNLAT)) {
|
|---|
| 213 | CatLAM cat = (CatLAM) Renderer.getAttVal(feature, feature.type, 0, Att.CATLAM);
|
|---|
| 214 | switch (cat) {
|
|---|
| 215 | case LAM_PORT:
|
|---|
| 216 | if (shape == BcnSHP.BCN_PRCH)
|
|---|
| 217 | Renderer.symbol(feature, Beacons.PerchPort, null, null, null);
|
|---|
| 218 | else
|
|---|
| 219 | Renderer.symbol(feature, Beacons.WithyPort, null, null, null);
|
|---|
| 220 | break;
|
|---|
| 221 | case LAM_STBD:
|
|---|
| 222 | if (shape == BcnSHP.BCN_PRCH)
|
|---|
| 223 | Renderer.symbol(feature, Beacons.PerchStarboard, null, null, null);
|
|---|
| 224 | else
|
|---|
| 225 | Renderer.symbol(feature, Beacons.WithyStarboard, null, null, null);
|
|---|
| 226 | break;
|
|---|
| 227 | default:
|
|---|
| 228 | Renderer.symbol(feature, Beacons.Stake, feature.type, null, null);
|
|---|
| 229 | }
|
|---|
| 230 | } else {
|
|---|
| 231 | Renderer.symbol(feature, Beacons.Shapes.get(shape), feature.type, null, null);
|
|---|
| 232 | if (feature.objs.get(Obj.TOPMAR) != null)
|
|---|
| 233 | Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), Obj.TOPMAR, Topmarks.Beacons, null);
|
|---|
| 234 | }
|
|---|
| 235 | }
|
|---|
| 236 | private static void buoys(Feature feature) {
|
|---|
| 237 | BoySHP shape = (BoySHP) Renderer.getAttVal(feature, feature.type, 0, Att.BOYSHP);
|
|---|
| 238 | Renderer.symbol(feature, Buoys.Shapes.get(shape), feature.type, null, null);
|
|---|
| 239 | if (feature.objs.get(Obj.TOPMAR) != null) {
|
|---|
| 240 | Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), Obj.TOPMAR, Topmarks.Buoys.get(shape), null);
|
|---|
| 241 | }
|
|---|
| 242 | }
|
|---|
| 243 | private static void bridges(Feature feature) {
|
|---|
| 244 | if (zoom >= 16) {
|
|---|
| 245 |
|
|---|
| 246 | }
|
|---|
| 247 | /* case BRIDGE: {
|
|---|
| 248 | Att_t *attv = getAtt(getObj(item, BRIDGE, 0), VERCLR);
|
|---|
| 249 | if (attv == NULL) attv = getAtt(getObj(item, BRIDGE, 0), VERCSA);
|
|---|
| 250 | Att_t *attc = getAtt(getObj(item, BRIDGE, 0), VERCCL);
|
|---|
| 251 | Att_t *atto = getAtt(getObj(item, BRIDGE, 0), VERCOP);
|
|---|
| 252 | if (attv != NULL) {
|
|---|
| 253 | renderSymbol(item, obja, "clear_v", "", "", CC, 0, 0, 0);
|
|---|
| 254 | drawText(item, stringValue(attv->val), "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 0, 12);
|
|---|
| 255 | }
|
|---|
| 256 | else if ((attc != NULL) && (atto == NULL)) {
|
|---|
| 257 | char *string=strdup(stringValue(attc->val));
|
|---|
| 258 | string = realloc(string, strlen(string) + 3); strcat(string, "/-");
|
|---|
| 259 | renderSymbol(item, obja, "clear_v", "", "", CC, 0, 0, 0);
|
|---|
| 260 | drawText(item, string, "font-family:Arial; font-weight:normal; font-size:70; text-anchor:middle", 0, 12);
|
|---|
| 261 | free(string);
|
|---|
| 262 | }
|
|---|
| 263 | else if ((attc != NULL) && (atto != NULL)) {
|
|---|
| 264 | char *string=strdup(stringValue(attc->val));
|
|---|
| 265 | string = realloc(string, strlen(string) + 2); strcat(string, "/");
|
|---|
| 266 | string = realloc(string, strlen(string) + strlen(stringValue(atto->val)) + 1); strcat(string, stringValue(atto->val));
|
|---|
| 267 | renderSymbol(item, obja, "clear_v", "", "", CC, 0, 0, 0);
|
|---|
| 268 | drawText(item, string, "font-family:Arial; font-weight:normal; font-size:60; text-anchor:middle", 0, 10);
|
|---|
| 269 | free(string);
|
|---|
| 270 | }
|
|---|
| 271 | }
|
|---|
| 272 | */
|
|---|
| 273 | }
|
|---|
| 274 | private static void cables(Feature feature) {
|
|---|
| 275 | if (zoom >= 14) {
|
|---|
| 276 | if (feature.type == Obj.CBLSUB) {
|
|---|
| 277 | Renderer.lineSymbols(feature, Areas.Cable, 0.0, null, 0, new Color(0x80c480));
|
|---|
| 278 | } else if (feature.type == Obj.CBLOHD) {
|
|---|
| 279 |
|
|---|
| 280 | }
|
|---|
| 281 | }
|
|---|
| 282 | }
|
|---|
| 283 | private static void distances(Feature feature) {
|
|---|
| 284 | /*object_rules(distances) {
|
|---|
| 285 | if ((zoom>=16) && (has_attribute("category"))) {
|
|---|
| 286 | attribute_switch("category")
|
|---|
| 287 | attribute_case("installed") symbol("distance_i");
|
|---|
| 288 | attribute_default symbol("distance_u");
|
|---|
| 289 | end_switch
|
|---|
| 290 | }
|
|---|
| 291 | }
|
|---|
| 292 | */
|
|---|
| 293 | }
|
|---|
| 294 | private static void floats(Feature feature) {
|
|---|
| 295 | switch (feature.type) {
|
|---|
| 296 | case LITVES:
|
|---|
| 297 | Renderer.symbol(feature, Buoys.Super, feature.type, null, null);
|
|---|
| 298 | break;
|
|---|
| 299 | case LITFLT:
|
|---|
| 300 | Renderer.symbol(feature, Buoys.Float, feature.type, null, null);
|
|---|
| 301 | break;
|
|---|
| 302 | case BOYINB:
|
|---|
| 303 | Renderer.symbol(feature, Buoys.Super, feature.type, null, null);
|
|---|
| 304 | break;
|
|---|
| 305 | }
|
|---|
| 306 | if (feature.objs.get(Obj.TOPMAR) != null)
|
|---|
| 307 | Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), Obj.TOPMAR, Topmarks.Floats, null);
|
|---|
| 308 | }
|
|---|
| 309 | private static void gauges(Feature feature) {
|
|---|
| 310 | /*object_rules(gauge) {
|
|---|
| 311 | if (zoom >= 14) symbol("tide_gauge");
|
|---|
| 312 | }
|
|---|
| 313 | */
|
|---|
| 314 | }
|
|---|
| 315 | private static void harbours(Feature feature) {
|
|---|
| 316 | AttItem name = feature.atts.get(Att.OBJNAM);
|
|---|
| 317 | switch (feature.type) {
|
|---|
| 318 | case ACHBRT:
|
|---|
| 319 | if (zoom >= 14) {
|
|---|
| 320 | Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(new Color(0xc480ff)));
|
|---|
| 321 | Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 30), LabelStyle.RRCT, new Color(0xc480ff), Color.white, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 0)));
|
|---|
| 322 | }
|
|---|
| 323 | double radius = (Double)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS);
|
|---|
| 324 | if (radius != 0) {
|
|---|
| 325 | UniHLU units = (UniHLU)Renderer.getAttVal(feature, Obj.ACHBRT, 0, Att.HUNITS);
|
|---|
| 326 | Renderer.lineCircle (feature, new LineStyle(new Color(0xc480ff), 4, new float[] { 10, 10 }, null), radius, units);
|
|---|
| 327 | }
|
|---|
| 328 | break;
|
|---|
| 329 | case ACHARE:
|
|---|
| 330 | if (zoom >= 12) {
|
|---|
| 331 | if (feature.flag != Fflag.AREA) {
|
|---|
| 332 | Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(Color.black));
|
|---|
| 333 | } else {
|
|---|
| 334 | Renderer.symbol(feature, Harbours.Anchorage, null, null, new Scheme(new Color(0xc480ff)));
|
|---|
| 335 | Renderer.lineSymbols(feature, Areas.Restricted, 1.0, Areas.LineAnchor, 10, new Color(0xc480ff));
|
|---|
| 336 | }
|
|---|
| 337 | if ((zoom >= 15) && ((name) != null)) {
|
|---|
| 338 | Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 60), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));
|
|---|
| 339 | }
|
|---|
| 340 | ArrayList<StsSTS> sts = (ArrayList<StsSTS>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.STATUS);
|
|---|
| 341 | if ((zoom >= 15) && (sts != null) && (sts.contains(StsSTS.STS_RESV))) {
|
|---|
| 342 | Renderer.labelText(feature, "Reserved", new Font("Arial", Font.PLAIN, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));
|
|---|
| 343 | }
|
|---|
| 344 | }
|
|---|
| 345 | ArrayList<CatACH> cats = (ArrayList<CatACH>)Renderer.getAttVal(feature, Obj.ACHARE, 0, Att.CATACH);
|
|---|
| 346 | int dy = (cats.size() - 1) * -30;
|
|---|
| 347 | for (CatACH cat : cats) {
|
|---|
| 348 | switch (cat) {
|
|---|
| 349 | case ACH_DEEP:
|
|---|
| 350 | Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
|
|---|
| 351 | dy += 60;
|
|---|
| 352 | break;
|
|---|
| 353 | case ACH_TANK:
|
|---|
| 354 | Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
|
|---|
| 355 | dy += 60;
|
|---|
| 356 | break;
|
|---|
| 357 | case ACH_H24P:
|
|---|
| 358 | Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), LabelStyle.NONE, new Color(0xc480ff), null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));
|
|---|
| 359 | dy += 60;
|
|---|
| 360 | break;
|
|---|
| 361 | case ACH_EXPL:
|
|---|
| 362 | Renderer.symbol(feature, Harbours.Explosives, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
|
|---|
| 363 | dy += 60;
|
|---|
| 364 | break;
|
|---|
| 365 | case ACH_QUAR:
|
|---|
| 366 | Renderer.symbol(feature, Harbours.Hospital, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
|
|---|
| 367 | dy += 60;
|
|---|
| 368 | break;
|
|---|
| 369 | case ACH_SEAP:
|
|---|
| 370 | Renderer.symbol(feature, Areas.Seaplane, null, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)), new Scheme(new Color(0xc480ff)));
|
|---|
| 371 | dy += 60;
|
|---|
| 372 | break;
|
|---|
| 373 | }
|
|---|
| 374 | }
|
|---|
| 375 | break;
|
|---|
| 376 | case BERTHS:
|
|---|
| 377 | if (zoom >= 14) {
|
|---|
| 378 | Renderer.labelText(feature, name == null ? " " : (String) name.val, new Font("Arial", Font.PLAIN, 40), LabelStyle.RRCT, new Color(0xc480ff), Color.white, null);
|
|---|
| 379 | }
|
|---|
| 380 | break;
|
|---|
| 381 | }
|
|---|
| 382 | }
|
|---|
| 383 | /*
|
|---|
| 384 | if ((zoom >= 16) && is_type("anchor_berth")) symbol("anchor_berth");
|
|---|
| 385 | if ((zoom >= 12) && is_type("harbour")) {
|
|---|
| 386 | if (has_attribute("category")) {
|
|---|
| 387 | attribute_switch("category")
|
|---|
| 388 | attribute_case("marina|yacht") symbol("marina");
|
|---|
| 389 | attribute_case("marina_no_facilities") symbol("marina_nf");
|
|---|
| 390 | attribute_default symbol("harbour");
|
|---|
| 391 | end_switch
|
|---|
| 392 | } else symbol("harbour");
|
|---|
| 393 | if ((zoom >= 15) && (has_item_attribute("name")))
|
|---|
| 394 | text(item_attribute("name"), "font-family:Arial; font-weight:bold; font-size:80; text-anchor:middle", 0, -90);
|
|---|
| 395 | }
|
|---|
| 396 | */
|
|---|
| 397 | private static void landmarks(Feature feature) {
|
|---|
| 398 | ArrayList<CatLMK> cats = (ArrayList<CatLMK>) Renderer.getAttVal(feature, feature.type, 0, Att.CATLMK);
|
|---|
| 399 | Symbol catSym = Landmarks.Shapes.get(cats.get(0));
|
|---|
| 400 | ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) Renderer.getAttVal(feature, feature.type, 0, Att.FUNCTN);
|
|---|
| 401 | Symbol fncSym = Landmarks.Funcs.get(fncs.get(0));
|
|---|
| 402 | if ((fncs.get(0) == FncFNC.FNC_CHCH) && (cats.get(0) == CatLMK.LMK_TOWR))
|
|---|
| 403 | catSym = Landmarks.ChurchTower;
|
|---|
| 404 | if ((cats.get(0) == CatLMK.LMK_UNKN) && (fncs.get(0) == FncFNC.FNC_UNKN) && (feature.objs.get(Obj.LIGHTS) != null))
|
|---|
| 405 | catSym = Beacons.LightMajor;
|
|---|
| 406 | if (cats.get(0) == CatLMK.LMK_RADR)
|
|---|
| 407 | fncSym = Landmarks.RadioTV;
|
|---|
| 408 | Renderer.symbol(feature, catSym, null, null, null);
|
|---|
| 409 | Renderer.symbol(feature, fncSym, null, null, null);
|
|---|
| 410 | /* if (!has_attribute("function") && !has_attribute("category") && has_object("light")) {
|
|---|
| 411 | symbol("lighthouse");
|
|---|
| 412 | if ((zoom >= 15) && has_item_attribute("name"))
|
|---|
| 413 | text(item_attribute("name"), "font-family:Arial; font-weight:bold; font-size:80; text-anchor:middle", 0, -70);
|
|---|
| 414 | } else {
|
|---|
| 415 | if ((zoom >= 15) && has_item_attribute("name"))
|
|---|
| 416 | text(item_attribute("name"), "font-family:Arial; font-weight:bold; font-size:80; text-anchor:start", 60, -50);
|
|---|
| 417 | }
|
|---|
| 418 | if (has_object("fog_signal")) object(fogs);
|
|---|
| 419 | if (has_object("radar_transponder")) object(rtbs);
|
|---|
| 420 | if (has_object("radar_station") && (zoom >= 12)) symbol("radar_station");
|
|---|
| 421 | if (has_object("light")) object(lights);
|
|---|
| 422 | }
|
|---|
| 423 | */
|
|---|
| 424 | }
|
|---|
| 425 | private static void lights(Feature feature) {
|
|---|
| 426 | switch (feature.type) {
|
|---|
| 427 | case LITMAJ:
|
|---|
| 428 | Renderer.symbol(feature, Beacons.LightMajor, null, null, null);
|
|---|
| 429 | break;
|
|---|
| 430 | case LITMIN:
|
|---|
| 431 | case LIGHTS:
|
|---|
| 432 | Renderer.symbol(feature, Beacons.LightMinor, null, null, null);
|
|---|
| 433 | break;
|
|---|
| 434 | }
|
|---|
| 435 | }
|
|---|
| 436 | private static void locks(Feature feature) {
|
|---|
| 437 | /*object_rules(locks) {
|
|---|
| 438 | if ((zoom>=13) && is_type("lock_basin|lock_basin_part")) symbol("lock");
|
|---|
| 439 | if ((zoom>=15) && is_type("gate")) symbol("lock_gate");
|
|---|
| 440 | }
|
|---|
| 441 | */
|
|---|
| 442 | }
|
|---|
| 443 | private static void marinas(Feature feature) {
|
|---|
| 444 | if (zoom >= 16) {
|
|---|
| 445 |
|
|---|
| 446 | }
|
|---|
| 447 | /* int n = countObjects(item, type);
|
|---|
| 448 | Atta_t atta = enumAttribute("category", obja);
|
|---|
| 449 | char **map = cluster_map(obja);
|
|---|
| 450 | if (map == NULL) return;
|
|---|
| 451 | switch (n) {
|
|---|
| 452 | case 0: {
|
|---|
| 453 | Obj_t *obj = getObj(item, obja, 0);
|
|---|
| 454 | int n = countValues(getAtt(obj, atta));
|
|---|
| 455 | switch (n) {
|
|---|
| 456 | case 1:
|
|---|
| 457 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 0)], "", "", CC, 0, 0, 0);
|
|---|
| 458 | break;
|
|---|
| 459 | case 2:
|
|---|
| 460 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 0)], "", "", RC, 0, 0, 0);
|
|---|
| 461 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 1)], "", "", LC, 0, 0, 0);
|
|---|
| 462 | break;
|
|---|
| 463 | case 3:
|
|---|
| 464 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 0)], "", "", BC, 0, 0, 0);
|
|---|
| 465 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 1)], "", "", TR, 0, 0, 0);
|
|---|
| 466 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 2)], "", "", TL, 0, 0, 0);
|
|---|
| 467 | break;
|
|---|
| 468 | case 4:
|
|---|
| 469 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 0)], "", "", BR, 0, 0, 0);
|
|---|
| 470 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 1)], "", "", BL, 0, 0, 0);
|
|---|
| 471 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 2)], "", "", TR, 0, 0, 0);
|
|---|
| 472 | renderSymbol(item, obja, map[getAttEnum(obj, atta, 3)], "", "", TL, 0, 0, 0);
|
|---|
| 473 | break;
|
|---|
| 474 | }
|
|---|
| 475 | }
|
|---|
| 476 | break;
|
|---|
| 477 | case 1:
|
|---|
| 478 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 1), atta, 0)], "", "", CC, 0, 0, 0);
|
|---|
| 479 | break;
|
|---|
| 480 | case 2:
|
|---|
| 481 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 1), atta, 0)], "", "", RC, 0, 0, 0);
|
|---|
| 482 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 2), atta, 0)], "", "", LC, 0, 0, 0);
|
|---|
| 483 | break;
|
|---|
| 484 | case 3:
|
|---|
| 485 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 1), atta, 0)], "", "", BC, 0, 0, 0);
|
|---|
| 486 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 2), atta, 0)], "", "", TR, 0, 0, 0);
|
|---|
| 487 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 3), atta, 0)], "", "", TL, 0, 0, 0);
|
|---|
| 488 | break;
|
|---|
| 489 | case 4:
|
|---|
| 490 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 1), atta, 0)], "", "", BR, 0, 0, 0);
|
|---|
| 491 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 2), atta, 0)], "", "", BL, 0, 0, 0);
|
|---|
| 492 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 3), atta, 0)], "", "", TR, 0, 0, 0);
|
|---|
| 493 | renderSymbol(item, obja, map[getAttEnum(getObj(item, obja, 4), atta, 0)], "", "", TL, 0, 0, 0);
|
|---|
| 494 | break;
|
|---|
| 495 | }
|
|---|
| 496 | */
|
|---|
| 497 | }
|
|---|
| 498 | private static void moorings(Feature feature) {
|
|---|
| 499 | CatMOR cat = (CatMOR) Renderer.getAttVal(feature, feature.type, 0, Att.CATMOR);
|
|---|
| 500 | switch (cat) {
|
|---|
| 501 | case MOR_DLPN:
|
|---|
| 502 | Renderer.symbol(feature, Harbours.Dolphin, null, null, null);
|
|---|
| 503 | break;
|
|---|
| 504 | case MOR_DDPN:
|
|---|
| 505 | Renderer.symbol(feature, Harbours.DeviationDolphin, null, null, null);
|
|---|
| 506 | break;
|
|---|
| 507 | case MOR_BLRD:
|
|---|
| 508 | case MOR_POST:
|
|---|
| 509 | Renderer.symbol(feature, Harbours.Bollard, null, null, null);
|
|---|
| 510 | break;
|
|---|
| 511 | case MOR_BUOY:
|
|---|
| 512 | BoySHP shape = (BoySHP) Renderer.getAttVal(feature, feature.type, 0, Att.BOYSHP);
|
|---|
| 513 | if (shape == BoySHP.BOY_UNKN)
|
|---|
| 514 | shape = BoySHP.BOY_SPHR;
|
|---|
| 515 | Renderer.symbol(feature, Buoys.Shapes.get(shape), feature.type, null, null);
|
|---|
| 516 | break;
|
|---|
| 517 | }
|
|---|
| 518 | /* if (has_object("fog_signal")) object(fogs);
|
|---|
| 519 | if (has_object("radar_transponder")) object(rtbs);
|
|---|
| 520 | if (has_object("light")) object(lights);
|
|---|
| 521 | }
|
|---|
| 522 | */
|
|---|
| 523 | }
|
|---|
| 524 |
|
|---|
| 525 | private static void notices(Feature feature) {
|
|---|
| 526 | if (zoom >= 14) {
|
|---|
| 527 | double dx = 0.0, dy = 0.0;
|
|---|
| 528 | switch (feature.type) {
|
|---|
| 529 | case BCNCAR:
|
|---|
| 530 | case BCNISD:
|
|---|
| 531 | case BCNLAT:
|
|---|
| 532 | case BCNSAW:
|
|---|
| 533 | case BCNSPP:
|
|---|
| 534 | case BCNWTW:
|
|---|
| 535 | dy = 45.0;
|
|---|
| 536 | break;
|
|---|
| 537 | case NOTMRK:
|
|---|
| 538 | dy = 0.0;
|
|---|
| 539 | break;
|
|---|
| 540 | default:
|
|---|
| 541 | return;
|
|---|
| 542 | }
|
|---|
| 543 | Symbol s1 = null, s2 = null;
|
|---|
| 544 | MarSYS sys = MarSYS.SYS_CEVN;
|
|---|
| 545 | BnkWTW bnk = BnkWTW.BWW_UNKN;
|
|---|
| 546 | AttItem att = feature.atts.get(Att.MARSYS);
|
|---|
| 547 | if (att != null) sys = (MarSYS)att.val;
|
|---|
| 548 | ObjTab objs = feature.objs.get(Obj.NOTMRK);
|
|---|
| 549 | int n = objs.size();
|
|---|
| 550 | if (n > 2) {
|
|---|
| 551 | s1 = Notices.Notice;
|
|---|
| 552 | n = 1;
|
|---|
| 553 | } else {
|
|---|
| 554 | for (AttMap atts : objs.values()) {
|
|---|
| 555 | if (atts.get(Att.MARSYS) != null) sys = (MarSYS)atts.get(Att.MARSYS).val;
|
|---|
| 556 | CatNMK cat = CatNMK.NMK_UNKN;
|
|---|
| 557 | if (atts.get(Att.CATNMK) != null) cat = (CatNMK)atts.get(Att.CATNMK).val;
|
|---|
| 558 | s2 = Notices.getNotice(cat, sys);
|
|---|
| 559 | }
|
|---|
| 560 | }
|
|---|
| 561 | /* Obj_t *obj = getObj(item, NOTMRK, i);
|
|---|
| 562 | if (obj == NULL) continue;
|
|---|
| 563 | Atta_t add;
|
|---|
| 564 | int idx = 0;
|
|---|
| 565 | while ((add = getAttEnum(obj, ADDMRK, idx++)) != MRK_UNKN) {
|
|---|
| 566 | if ((add == MRK_LTRI) && (i == 2)) swap = true;
|
|---|
| 567 | if ((add == MRK_RTRI) && (i != 2)) swap = true;
|
|---|
| 568 | }
|
|---|
| 569 | }
|
|---|
| 570 | } else {
|
|---|
| 571 |
|
|---|
| 572 | }
|
|---|
| 573 | for (int i = 0; i <=2; i++) {
|
|---|
| 574 | Obj_t *obj = getObj(item, NOTMRK, i);
|
|---|
| 575 | if (obj == NULL) continue;
|
|---|
| 576 | Atta_t category = getAttEnum(obj, CATNMK, i);
|
|---|
| 577 | Atta_t add;
|
|---|
| 578 | int idx = 0;
|
|---|
| 579 | int top=0, bottom=0, left=0, right=0;
|
|---|
| 580 | while ((add = getAttEnum(obj, ADDMRK, idx++)) != MRK_UNKN) {
|
|---|
| 581 | switch (add) {
|
|---|
| 582 | case MRK_TOPB:
|
|---|
| 583 | top = add;
|
|---|
| 584 | break;
|
|---|
| 585 | case MRK_BOTB:
|
|---|
| 586 | case MRK_BTRI:
|
|---|
| 587 | bottom = add;
|
|---|
| 588 | break;
|
|---|
| 589 | case MRK_LTRI:
|
|---|
| 590 | left = add;
|
|---|
| 591 | break;
|
|---|
| 592 | case MRK_RTRI:
|
|---|
| 593 | right = add;
|
|---|
| 594 | break;
|
|---|
| 595 | default:
|
|---|
| 596 | break;
|
|---|
| 597 | }
|
|---|
| 598 | }
|
|---|
| 599 | double orient = getAtt(obj, ORIENT) != NULL ? getAtt(obj, ORIENT)->val.val.f : 0.0;
|
|---|
| 600 | int system = getAtt(obj, MARSYS) != NULL ? getAtt(obj, MARSYS)->val.val.e : 0;
|
|---|
| 601 | double flip = 0.0;
|
|---|
| 602 | char *symb = "";
|
|---|
| 603 | char *base = "";
|
|---|
| 604 | char *colour = "black";
|
|---|
| 605 | if ((system == SYS_BWR2) || (system == SYS_BNWR)) {
|
|---|
| 606 | symb = bniwr_map[category];
|
|---|
| 607 | switch (category) {
|
|---|
| 608 | case NMK_NANK:
|
|---|
| 609 | case NMK_LMHR:
|
|---|
| 610 | case NMK_KTPM...NMK_RSPD:
|
|---|
| 611 | {
|
|---|
| 612 | int bank = getAtt(obj, BNKWTW) != NULL ? getAtt(obj, BNKWTW)->val.val.e : 0;
|
|---|
| 613 | switch (bank) {
|
|---|
| 614 | case BWW_LEFT:
|
|---|
| 615 | base = "notice_blb";
|
|---|
| 616 | colour = "red";
|
|---|
| 617 | break;
|
|---|
| 618 | case BWW_RGHT:
|
|---|
| 619 | base = "notice_brb";
|
|---|
| 620 | colour = "green";
|
|---|
| 621 | break;
|
|---|
| 622 | default:
|
|---|
| 623 | base = "notice_bsi";
|
|---|
| 624 | colour = "black";
|
|---|
| 625 | break;
|
|---|
| 626 | }
|
|---|
| 627 | }
|
|---|
| 628 | default:
|
|---|
| 629 | break;
|
|---|
| 630 | }
|
|---|
| 631 | } else if (system == SYS_PPWB) {
|
|---|
| 632 | int bank = getAtt(obj, BNKWTW) != NULL ? getAtt(obj, BNKWTW)->val.val.e : 0;
|
|---|
| 633 | if (bank != 0) {
|
|---|
| 634 | switch (category) {
|
|---|
| 635 | case NMK_WLAR:
|
|---|
| 636 | if (bank == BNK_LEFT)
|
|---|
| 637 | base = "notice_pwlarl";
|
|---|
| 638 | else
|
|---|
| 639 | base = "notice_pwlarr";
|
|---|
| 640 | break;
|
|---|
| 641 | case NMK_WRAL:
|
|---|
| 642 | if (bank == BNK_LEFT)
|
|---|
| 643 | base = "notice_pwrall";
|
|---|
| 644 | else
|
|---|
| 645 | base = "notice_pwralr";
|
|---|
| 646 | break;
|
|---|
| 647 | case NMK_KTPM:
|
|---|
| 648 | if (bank == BNK_LEFT)
|
|---|
| 649 | base = "notice_ppml";
|
|---|
| 650 | else
|
|---|
| 651 | base = "notice_ppmr";
|
|---|
| 652 | break;
|
|---|
| 653 | case NMK_KTSM:
|
|---|
| 654 | if (bank == BNK_LEFT)
|
|---|
| 655 | base = "notice_psml";
|
|---|
| 656 | else
|
|---|
| 657 | base = "notice_psmr";
|
|---|
| 658 | break;
|
|---|
| 659 | case NMK_KTMR:
|
|---|
| 660 | if (bank == BNK_LEFT)
|
|---|
| 661 | base = "notice_pmrl";
|
|---|
| 662 | else
|
|---|
| 663 | base = "notice_pmrr";
|
|---|
| 664 | break;
|
|---|
| 665 | case NMK_CRTP:
|
|---|
| 666 | if (bank == BNK_LEFT)
|
|---|
| 667 | base = "notice_pcpl";
|
|---|
| 668 | else
|
|---|
| 669 | base = "notice_pcpr";
|
|---|
| 670 | break;
|
|---|
| 671 | case NMK_CRTS:
|
|---|
| 672 | if (bank == BNK_LEFT)
|
|---|
| 673 | base = "notice_pcsl";
|
|---|
| 674 | else
|
|---|
| 675 | base = "notice_pcsr";
|
|---|
| 676 | break;
|
|---|
| 677 | default:
|
|---|
| 678 | break;
|
|---|
| 679 | }
|
|---|
| 680 | }
|
|---|
| 681 | } else {
|
|---|
| 682 | symb = notice_map[category];
|
|---|
| 683 | switch (category) {
|
|---|
| 684 | case NMK_NOVK...NMK_NWSH:
|
|---|
| 685 | case NMK_NMTC...NMK_NLBG:
|
|---|
| 686 | base = "notice_a";
|
|---|
| 687 | break;
|
|---|
| 688 | case NMK_MVTL...NMK_CHDR:
|
|---|
| 689 | base = "notice_b";
|
|---|
| 690 | break;
|
|---|
| 691 | case NMK_PRTL...NMK_PRTR:
|
|---|
| 692 | case NMK_OVHC...NMK_LBGP:
|
|---|
| 693 | base = "notice_e";
|
|---|
| 694 | colour = "white";
|
|---|
| 695 | break;
|
|---|
| 696 | default:
|
|---|
| 697 | break;
|
|---|
| 698 | }
|
|---|
| 699 | switch (category) {
|
|---|
| 700 | case NMK_MVTL:
|
|---|
| 701 | case NMK_ANKP:
|
|---|
| 702 | case NMK_PRTL:
|
|---|
| 703 | case NMK_MWAL:
|
|---|
| 704 | case NMK_MWAR:
|
|---|
| 705 | flip = 180.0;
|
|---|
| 706 | break;
|
|---|
| 707 | case NMK_SWWR:
|
|---|
| 708 | case NMK_WRSL:
|
|---|
| 709 | case NMK_WARL:
|
|---|
| 710 | flip = -90.0;
|
|---|
| 711 | break;
|
|---|
| 712 | case NMK_SWWC:
|
|---|
| 713 | case NMK_SWWL:
|
|---|
| 714 | case NMK_WLSR:
|
|---|
| 715 | case NMK_WALR:
|
|---|
| 716 | flip = 90.0;
|
|---|
| 717 | break;
|
|---|
| 718 | default:
|
|---|
| 719 | break;
|
|---|
| 720 | }
|
|---|
| 721 | }
|
|---|
| 722 | if (n == 2) {
|
|---|
| 723 | dx = (((i != 2) && swap) || ((i == 2) && !swap)) ? -30.0 : 30.0;
|
|---|
| 724 | }
|
|---|
| 725 | if (top == MRK_TOPB)
|
|---|
| 726 | renderSymbol(item, NOTMRK, "notice_board", "", "", BC, dx, dy, orient);
|
|---|
| 727 | if (bottom == MRK_BOTB)
|
|---|
| 728 | renderSymbol(item, NOTMRK, "notice_board", "", "", BC, dx, dy, orient+180);
|
|---|
| 729 | if (bottom == MRK_BTRI)
|
|---|
| 730 | renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient+180);
|
|---|
| 731 | if (left == MRK_LTRI)
|
|---|
| 732 | renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient-90);
|
|---|
| 733 | if (right == MRK_RTRI)
|
|---|
| 734 | renderSymbol(item, NOTMRK, "notice_triangle", "", "", BC, dx, dy, orient+90);
|
|---|
| 735 | renderSymbol(item, NOTMRK, base, "", "", CC, dx, dy, orient);
|
|---|
| 736 | renderSymbol(item, NOTMRK, symb, "", colour, CC, dx, dy, orient+flip);
|
|---|
| 737 | }
|
|---|
| 738 | */
|
|---|
| 739 | }
|
|---|
| 740 | }
|
|---|
| 741 | private static void obstructions(Feature feature) {
|
|---|
| 742 | if ((zoom >= 14) && (feature.type == Obj.UWTROC)) {
|
|---|
| 743 | WatLEV lvl = (WatLEV) Renderer.getAttVal(feature, feature.type, 0, Att.WATLEV);
|
|---|
| 744 | switch (lvl) {
|
|---|
| 745 | case LEV_CVRS:
|
|---|
| 746 | Renderer.symbol(feature, Areas.RockC, null, null, null);
|
|---|
| 747 | break;
|
|---|
| 748 | case LEV_AWSH:
|
|---|
| 749 | Renderer.symbol(feature, Areas.RockA, null, null, null);
|
|---|
| 750 | break;
|
|---|
| 751 | default:
|
|---|
| 752 | Renderer.symbol(feature, Areas.Rock, null, null, null);
|
|---|
| 753 | }
|
|---|
| 754 | } else {
|
|---|
| 755 | Renderer.symbol(feature, Areas.Rock, null, null, null);
|
|---|
| 756 | }
|
|---|
| 757 | }
|
|---|
| 758 | private static void pipelines(Feature feature) {
|
|---|
| 759 | if (zoom >= 14) {
|
|---|
| 760 | if (feature.type == Obj.PIPSOL) {
|
|---|
| 761 | Renderer.lineSymbols(feature, Areas.Pipeline, 1.0, null, 0, new Color(0x80c480));
|
|---|
| 762 | } else if (feature.type == Obj.PIPOHD) {
|
|---|
| 763 |
|
|---|
| 764 | }
|
|---|
| 765 | }
|
|---|
| 766 | }
|
|---|
| 767 | private static void platforms(Feature feature) {
|
|---|
| 768 | ArrayList<CatOFP> cats = (ArrayList<CatOFP>)Renderer.getAttVal(feature, Obj.OFSPLF, 0, Att.CATOFP);
|
|---|
| 769 | if ((CatOFP) cats.get(0) == CatOFP.OFP_FPSO)
|
|---|
| 770 | Renderer.symbol(feature, Buoys.Storage, null, null, null);
|
|---|
| 771 | else
|
|---|
| 772 | Renderer.symbol(feature, Landmarks.Platform, null, null, null);
|
|---|
| 773 | AttItem name = feature.atts.get(Att.OBJNAM);
|
|---|
| 774 | if ((zoom >= 15) && (name != null))
|
|---|
| 775 | Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(60, -50)));
|
|---|
| 776 | /*object_rules(platforms) {
|
|---|
| 777 | if (has_object("fog_signal")) object(fogs);
|
|---|
| 778 | if (has_object("radar_transponder")) object(rtbs);
|
|---|
| 779 | if (has_object("light")) object(lights);
|
|---|
| 780 | }
|
|---|
| 781 | */
|
|---|
| 782 | }
|
|---|
| 783 | private static void ports(Feature feature) {
|
|---|
| 784 | if (zoom >= 14) {
|
|---|
| 785 | if (feature.type == Obj.CRANES) {
|
|---|
| 786 | if ((CatCRN) Renderer.getAttVal(feature, feature.type, 0, Att.CATCRN) == CatCRN.CRN_CONT)
|
|---|
| 787 | Renderer.symbol(feature, Harbours.ContainerCrane, null, null, null);
|
|---|
| 788 | else
|
|---|
| 789 | Renderer.symbol(feature, Harbours.PortCrane, null, null, null);
|
|---|
| 790 | } else if (feature.type == Obj.HULKES) {
|
|---|
| 791 | Renderer.lineVector(feature, new LineStyle(Color.black, 4, null, new Color(0xffe000)));
|
|---|
| 792 | AttItem name = feature.atts.get(Att.OBJNAM);
|
|---|
| 793 | if ((zoom >= 15) && (name != null))
|
|---|
| 794 | Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 80), LabelStyle.NONE, Color.black, null, null);
|
|---|
| 795 | }
|
|---|
| 796 | }
|
|---|
| 797 | }
|
|---|
| 798 | private static void separation(Feature feature) {
|
|---|
| 799 | switch (feature.type) {
|
|---|
| 800 | case TSEZNE:
|
|---|
| 801 | case TSSCRS:
|
|---|
| 802 | case TSSRON:
|
|---|
| 803 | if (zoom <= 15)
|
|---|
| 804 | Renderer.lineVector(feature, new LineStyle(null, 0, null, new Color(0x80c48080, true)));
|
|---|
| 805 | else
|
|---|
| 806 | Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, null, null));
|
|---|
| 807 | AttItem name = feature.atts.get(Att.OBJNAM);
|
|---|
| 808 | if ((zoom >= 10) && (name != null))
|
|---|
| 809 | Renderer.labelText(feature, (String) name.val, new Font("Arial", Font.BOLD, 150), LabelStyle.NONE, new Color(0x80c48080), null, null);
|
|---|
| 810 | break;
|
|---|
| 811 | case TSELNE:
|
|---|
| 812 | Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, null, null));
|
|---|
| 813 | break;
|
|---|
| 814 | case TSSLPT:
|
|---|
| 815 | Renderer.lineSymbols(feature, Areas.LaneArrow, 0.5, null, 0, new Color(0x80c48080, true));
|
|---|
| 816 | break;
|
|---|
| 817 | case TSSBND:
|
|---|
| 818 | Renderer.lineVector(feature, new LineStyle(new Color(0x80c48080, true), 20, new float[] { 40, 40 }, null));
|
|---|
| 819 | break;
|
|---|
| 820 | case ISTZNE:
|
|---|
| 821 | Renderer.lineSymbols(feature, Areas.Restricted, 1.0, null, 0, new Color(0x80c48080, true));
|
|---|
| 822 | break;
|
|---|
| 823 | }
|
|---|
| 824 | }
|
|---|
| 825 | private static void shoreline(Feature feature) {
|
|---|
| 826 | if (zoom >= 12) {
|
|---|
| 827 | switch ((CatSLC) Renderer.getAttVal(feature, feature.type, 0, Att.CATSLC)) {
|
|---|
| 828 | case SLC_TWAL:
|
|---|
| 829 | WatLEV lev = (WatLEV) Renderer.getAttVal(feature, feature.type, 0, Att.WATLEV);
|
|---|
| 830 | if (lev == WatLEV.LEV_CVRS) {
|
|---|
| 831 | Renderer.lineVector(feature, new LineStyle(Color.black, 10, new float[] { 40, 40 }, null));
|
|---|
| 832 | if (zoom >= 15)
|
|---|
| 833 | Renderer.lineText(feature, "(covers)", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, 20);
|
|---|
| 834 | } else {
|
|---|
| 835 | Renderer.lineVector(feature, new LineStyle(Color.black, 10, null, null));
|
|---|
| 836 | }
|
|---|
| 837 | if (zoom >= 15)
|
|---|
| 838 | Renderer.lineText(feature, "Training Wall", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20);
|
|---|
| 839 | }
|
|---|
| 840 | }
|
|---|
| 841 | }
|
|---|
| 842 | private static void signals(Feature feature) {
|
|---|
| 843 | if (zoom >= 14) {
|
|---|
| 844 | switch (feature.type) {
|
|---|
| 845 | case SISTAT:
|
|---|
| 846 | case SISTAW:
|
|---|
| 847 | Renderer.symbol(feature, Harbours.SignalStation, null, null, null);
|
|---|
| 848 | break;
|
|---|
| 849 | case RDOSTA:
|
|---|
| 850 | Renderer.symbol(feature, Harbours.SignalStation, null, null, null);
|
|---|
| 851 | Renderer.symbol(feature, Beacons.RadarStation, null, null, null);
|
|---|
| 852 | ArrayList<CatROS> cats = (ArrayList<CatROS>)Renderer.getAttVal(feature, Obj.RDOSTA, 0, Att.CATROS);
|
|---|
| 853 | String str = "";
|
|---|
| 854 | for (CatROS ros : cats) {
|
|---|
| 855 | switch (ros) {
|
|---|
| 856 | case ROS_OMNI:
|
|---|
| 857 | str += " RC";
|
|---|
| 858 | break;
|
|---|
| 859 | case ROS_DIRL:
|
|---|
| 860 | str += " RD";
|
|---|
| 861 | break;
|
|---|
| 862 | case ROS_ROTP:
|
|---|
| 863 | str += " RW";
|
|---|
| 864 | break;
|
|---|
| 865 | case ROS_CNSL:
|
|---|
| 866 | str += " Consol";
|
|---|
| 867 | break;
|
|---|
| 868 | case ROS_RDF:
|
|---|
| 869 | str += " RG";
|
|---|
| 870 | break;
|
|---|
| 871 | case ROS_QTA:
|
|---|
| 872 | str += " R";
|
|---|
| 873 | break;
|
|---|
| 874 | case ROS_AERO:
|
|---|
| 875 | str += " AeroRC";
|
|---|
| 876 | break;
|
|---|
| 877 | case ROS_DECA:
|
|---|
| 878 | str += " Decca";
|
|---|
| 879 | break;
|
|---|
| 880 | case ROS_LORN:
|
|---|
| 881 | str += " Loran";
|
|---|
| 882 | break;
|
|---|
| 883 | case ROS_DGPS:
|
|---|
| 884 | str += " DGPS";
|
|---|
| 885 | break;
|
|---|
| 886 | case ROS_TORN:
|
|---|
| 887 | str += " Toran";
|
|---|
| 888 | break;
|
|---|
| 889 | case ROS_OMGA:
|
|---|
| 890 | str += " Omega";
|
|---|
| 891 | break;
|
|---|
| 892 | case ROS_SYLD:
|
|---|
| 893 | str += " Syledis";
|
|---|
| 894 | break;
|
|---|
| 895 | case ROS_CHKA:
|
|---|
| 896 | str += " Chiaka";
|
|---|
| 897 | break;
|
|---|
| 898 | case ROS_PCOM:
|
|---|
| 899 | case ROS_COMB:
|
|---|
| 900 | case ROS_FACS:
|
|---|
| 901 | case ROS_TIME:
|
|---|
| 902 | break;
|
|---|
| 903 | case ROS_PAIS:
|
|---|
| 904 | case ROS_SAIS:
|
|---|
| 905 | str += " AIS";
|
|---|
| 906 | break;
|
|---|
| 907 | case ROS_VAIS:
|
|---|
| 908 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 909 | break;
|
|---|
| 910 | case ROS_VANC:
|
|---|
| 911 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 912 | Renderer.symbol(feature, Topmarks.TopNorth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 913 | break;
|
|---|
| 914 | case ROS_VASC:
|
|---|
| 915 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 916 | Renderer.symbol(feature, Topmarks.TopSouth, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 917 | break;
|
|---|
| 918 | case ROS_VAEC:
|
|---|
| 919 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 920 | Renderer.symbol(feature, Topmarks.TopEast, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 921 | break;
|
|---|
| 922 | case ROS_VAWC:
|
|---|
| 923 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 924 | Renderer.symbol(feature, Topmarks.TopWest, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 925 | break;
|
|---|
| 926 | case ROS_VAPL:
|
|---|
| 927 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 928 | Renderer.symbol(feature, Topmarks.TopCan, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 929 | break;
|
|---|
| 930 | case ROS_VASL:
|
|---|
| 931 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 932 | Renderer.symbol(feature, Topmarks.TopCone, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 933 | break;
|
|---|
| 934 | case ROS_VAID:
|
|---|
| 935 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 936 | Renderer.symbol(feature, Topmarks.TopIsol, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 937 | break;
|
|---|
| 938 | case ROS_VASW:
|
|---|
| 939 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 940 | Renderer.symbol(feature, Topmarks.TopSphere, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 941 | break;
|
|---|
| 942 | case ROS_VASP:
|
|---|
| 943 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 944 | Renderer.symbol(feature, Topmarks.TopX, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 945 | break;
|
|---|
| 946 | case ROS_VAWK:
|
|---|
| 947 | Renderer.labelText(feature, " V-AIS", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));
|
|---|
| 948 | Renderer.symbol(feature, Topmarks.TopCross, null, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25)), null);
|
|---|
| 949 | break;
|
|---|
| 950 | }
|
|---|
| 951 | }
|
|---|
| 952 | if (!str.isEmpty()) Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.BR, AffineTransform.getTranslateInstance(-30, -70)));
|
|---|
| 953 | break;
|
|---|
| 954 | case RADSTA:
|
|---|
| 955 | Renderer.symbol(feature, Harbours.SignalStation, null, null, null);
|
|---|
| 956 | Renderer.symbol(feature, Beacons.RadarStation, null, null, null);
|
|---|
| 957 | break;
|
|---|
| 958 | case PILBOP:
|
|---|
| 959 | Renderer.symbol(feature, Harbours.Pilot, null, null, null);
|
|---|
| 960 | break;
|
|---|
| 961 | case CGUSTA:
|
|---|
| 962 | Renderer.symbol(feature, Harbours.SignalStation, null, null, null);
|
|---|
| 963 | break;
|
|---|
| 964 | case RSCSTA:
|
|---|
| 965 | Renderer.symbol(feature, Harbours.Rescue, null, null, null);
|
|---|
| 966 | break;
|
|---|
| 967 | }
|
|---|
| 968 | }
|
|---|
| 969 | /* if (has_object("fog_signal")) object(fogs);
|
|---|
| 970 | if (has_object("radar_transponder")) object(rtbs);
|
|---|
| 971 | if (has_object("light")) object(lights);
|
|---|
| 972 | }
|
|---|
| 973 | */
|
|---|
| 974 | }
|
|---|
| 975 | private static void transits(Feature feature) {
|
|---|
| 976 | if (zoom >= 12) {
|
|---|
| 977 | if (feature.type == Obj.RECTRC) Renderer.lineVector (feature, new LineStyle(Color.black, 10, null, null));
|
|---|
| 978 | else if (feature.type == Obj.NAVLNE) Renderer.lineVector (feature, new LineStyle(Color.black, 10, new float[] { 25, 25 }, null));
|
|---|
| 979 | }
|
|---|
| 980 | if (zoom >= 15) {
|
|---|
| 981 | String str = "";
|
|---|
| 982 | AttItem name = feature.atts.get(Att.OBJNAM);
|
|---|
| 983 | if (name != null) str += (String)name.val + " ";
|
|---|
| 984 | Double ort = (Double) Renderer.getAttVal(feature, feature.type, 0, Att.ORIENT);
|
|---|
| 985 | if (ort != null) str += ort.toString() + "\u0152";
|
|---|
| 986 | if (!str.isEmpty()) Renderer.lineText(feature, str, new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20);
|
|---|
| 987 | }
|
|---|
| 988 | }
|
|---|
| 989 | private static void waterways(Feature feature) {
|
|---|
| 990 | }
|
|---|
| 991 | private static void wrecks(Feature feature) {
|
|---|
| 992 | if (zoom >= 14) {
|
|---|
| 993 | CatWRK cat = (CatWRK) Renderer.getAttVal(feature, feature.type, 0, Att.CATWRK);
|
|---|
| 994 | switch (cat) {
|
|---|
| 995 | case WRK_DNGR:
|
|---|
| 996 | case WRK_MSTS:
|
|---|
| 997 | Renderer.symbol(feature, Areas.WreckD, null, null, null);
|
|---|
| 998 | break;
|
|---|
| 999 | case WRK_HULS:
|
|---|
| 1000 | Renderer.symbol(feature, Areas.WreckS, null, null, null);
|
|---|
| 1001 | break;
|
|---|
| 1002 | default:
|
|---|
| 1003 | Renderer.symbol(feature, Areas.WreckND, null, null, null);
|
|---|
| 1004 | }
|
|---|
| 1005 | }
|
|---|
| 1006 | }
|
|---|
| 1007 | }
|
|---|