Changeset 32090 in osm for applications/editors/josm/plugins/seachart
- Timestamp:
- 2016-03-03T08:32:31+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
r32088 r32090 89 89 context = new Context(); 90 90 91 int border = 256 / (int)Math.pow(2, (12 - zoom)); 91 92 int size = 256; 92 93 for (int i = 0; i < (12 - zoom); i++) size *= 2; 93 Rectangle rect = new Rectangle( size, size);94 Rectangle rect = new Rectangle((size + (2 * border)), (size + (2 * border))); 94 95 img = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_ARGB); 95 96 Renderer.reRender(img.createGraphics(), rect, zoom, 1.0, map, context); … … 106 107 svgGenerator.setSVGCanvasSize(rect.getSize()); 107 108 svgGenerator.setClip(rect.x, rect.y, rect.width, rect.height); 108 svgGenerator.translate(- 256, -256);109 svgGenerator.translate(-border, -border); 109 110 Renderer.reRender(svgGenerator, rect, z, 1.0, map, context); 110 111 svgGenerator.stream(dstdir + "tst_" + z + "-" + xtile + "-" + ytile + ".svg"); … … 129 130 String dstnam = dstdir + zoom + "/" + xdir + "/" + ynam + ".png"; 130 131 deletes.remove(dstnam); 131 send.add("put " + dstnam + " cache/tiles-" + zoom + "-" + xdir + "-" + ynam + ".png");132 send.add("put " + dstnam + " tiles/" + zoom + "/" + xdir + "/" + ynam + ".png"); 132 133 File ofile = new File(dstdir + "/" + zoom + "/" + xdir + "/"); 133 134 ofile.mkdirs(); -
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r32088 r32090 56 56 } 57 57 58 public static void symbol( Feature feature,Symbol symbol) {59 Point2D point = context.getPoint( feature.geom.centre);58 public static void symbol(Symbol symbol) { 59 Point2D point = context.getPoint(Rules.feature.geom.centre); 60 60 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), null, null); 61 61 } 62 public static void symbol( Feature feature,Symbol symbol, Scheme scheme) {63 Point2D point = context.getPoint( feature.geom.centre);62 public static void symbol(Symbol symbol, Scheme scheme) { 63 Point2D point = context.getPoint(Rules.feature.geom.centre); 64 64 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), scheme, null); 65 65 } 66 public static void symbol( Feature feature,Symbol symbol, Delta delta) {67 Point2D point = context.getPoint( feature.geom.centre);66 public static void symbol(Symbol symbol, Delta delta) { 67 Point2D point = context.getPoint(Rules.feature.geom.centre); 68 68 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), null, delta); 69 69 } 70 public static void symbol( Feature feature,Symbol symbol, Scheme scheme, Delta delta) {71 Point2D point = context.getPoint( feature.geom.centre);70 public static void symbol(Symbol symbol, Scheme scheme, Delta delta) { 71 Point2D point = context.getPoint(Rules.feature.geom.centre); 72 72 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), scheme, delta); 73 73 } 74 74 75 public static void cluster( Feature feature,ArrayList<Symbol> symbols) {75 public static void cluster(ArrayList<Symbol> symbols) { 76 76 Rectangle2D.Double bbox = null; 77 77 if (symbols.size() > 4) { … … 86 86 switch (symbols.size()) { 87 87 case 1: 88 symbol( feature,symbols.get(0), new Delta(Handle.CC, new AffineTransform()));88 symbol(symbols.get(0), new Delta(Handle.CC, new AffineTransform())); 89 89 break; 90 90 case 2: 91 symbol( feature,symbols.get(0), new Delta(Handle.RC, new AffineTransform()));92 symbol( feature,symbols.get(1), new Delta(Handle.LC, new AffineTransform()));91 symbol(symbols.get(0), new Delta(Handle.RC, new AffineTransform())); 92 symbol(symbols.get(1), new Delta(Handle.LC, new AffineTransform())); 93 93 break; 94 94 case 3: 95 symbol( feature,symbols.get(0), new Delta(Handle.BC, new AffineTransform()));96 symbol( feature,symbols.get(1), new Delta(Handle.TR, new AffineTransform()));97 symbol( feature,symbols.get(2), new Delta(Handle.TL, new AffineTransform()));95 symbol(symbols.get(0), new Delta(Handle.BC, new AffineTransform())); 96 symbol(symbols.get(1), new Delta(Handle.TR, new AffineTransform())); 97 symbol(symbols.get(2), new Delta(Handle.TL, new AffineTransform())); 98 98 break; 99 99 case 4: 100 symbol( feature,symbols.get(0), new Delta(Handle.BR, new AffineTransform()));101 symbol( feature,symbols.get(1), new Delta(Handle.BL, new AffineTransform()));102 symbol( feature,symbols.get(2), new Delta(Handle.TR, new AffineTransform()));103 symbol( feature,symbols.get(3), new Delta(Handle.TL, new AffineTransform()));100 symbol(symbols.get(0), new Delta(Handle.BR, new AffineTransform())); 101 symbol(symbols.get(1), new Delta(Handle.BL, new AffineTransform())); 102 symbol(symbols.get(2), new Delta(Handle.TR, new AffineTransform())); 103 symbol(symbols.get(3), new Delta(Handle.TL, new AffineTransform())); 104 104 break; 105 105 case 5: 106 symbol( feature,symbols.get(0), new Delta(Handle.BR, new AffineTransform()));107 symbol( feature,symbols.get(1), new Delta(Handle.BL, new AffineTransform()));108 symbol( feature,symbols.get(2), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, 0)));109 symbol( feature,symbols.get(3), new Delta(Handle.TC, new AffineTransform()));110 symbol( feature,symbols.get(4), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, 0)));106 symbol(symbols.get(0), new Delta(Handle.BR, new AffineTransform())); 107 symbol(symbols.get(1), new Delta(Handle.BL, new AffineTransform())); 108 symbol(symbols.get(2), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, 0))); 109 symbol(symbols.get(3), new Delta(Handle.TC, new AffineTransform())); 110 symbol(symbols.get(4), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, 0))); 111 111 break; 112 112 case 6: 113 symbol( feature,symbols.get(0), new Delta(Handle.BR, AffineTransform.getTranslateInstance(-bbox.width/2, 0)));114 symbol( feature,symbols.get(1), new Delta(Handle.BC, new AffineTransform()));115 symbol( feature,symbols.get(2), new Delta(Handle.BL, AffineTransform.getTranslateInstance(bbox.width/2, 0)));116 symbol( feature,symbols.get(3), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, 0)));117 symbol( feature,symbols.get(4), new Delta(Handle.TC, new AffineTransform()));118 symbol( feature,symbols.get(5), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, 0)));113 symbol(symbols.get(0), new Delta(Handle.BR, AffineTransform.getTranslateInstance(-bbox.width/2, 0))); 114 symbol(symbols.get(1), new Delta(Handle.BC, new AffineTransform())); 115 symbol(symbols.get(2), new Delta(Handle.BL, AffineTransform.getTranslateInstance(bbox.width/2, 0))); 116 symbol(symbols.get(3), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, 0))); 117 symbol(symbols.get(4), new Delta(Handle.TC, new AffineTransform())); 118 symbol(symbols.get(5), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, 0))); 119 119 break; 120 120 case 7: 121 symbol( feature,symbols.get(0), new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -bbox.height/2)));122 symbol( feature,symbols.get(1), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-bbox.width/2, 0)));123 symbol( feature,symbols.get(2), new Delta(Handle.CC, new AffineTransform()));124 symbol( feature,symbols.get(3), new Delta(Handle.LC, AffineTransform.getTranslateInstance(bbox.width/2, 0)));125 symbol( feature,symbols.get(4), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, bbox.height/2)));126 symbol( feature,symbols.get(5), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, bbox.height/2)));127 symbol( feature,symbols.get(6), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, bbox.height/2)));121 symbol(symbols.get(0), new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -bbox.height/2))); 122 symbol(symbols.get(1), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-bbox.width/2, 0))); 123 symbol(symbols.get(2), new Delta(Handle.CC, new AffineTransform())); 124 symbol(symbols.get(3), new Delta(Handle.LC, AffineTransform.getTranslateInstance(bbox.width/2, 0))); 125 symbol(symbols.get(4), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, bbox.height/2))); 126 symbol(symbols.get(5), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, bbox.height/2))); 127 symbol(symbols.get(6), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, bbox.height/2))); 128 128 break; 129 129 case 8: 130 symbol( feature,symbols.get(0), new Delta(Handle.BR, AffineTransform.getTranslateInstance(0, -bbox.height/2)));131 symbol( feature,symbols.get(1), new Delta(Handle.BL, AffineTransform.getTranslateInstance(0, -bbox.height/2)));132 symbol( feature,symbols.get(2), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-bbox.width/2, 0)));133 symbol( feature,symbols.get(3), new Delta(Handle.CC, new AffineTransform()));134 symbol( feature,symbols.get(4), new Delta(Handle.LC, AffineTransform.getTranslateInstance(bbox.width/2, 0)));135 symbol( feature,symbols.get(5), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, bbox.height/2)));136 symbol( feature,symbols.get(6), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, bbox.height/2)));137 symbol( feature,symbols.get(7), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, bbox.height/2)));130 symbol(symbols.get(0), new Delta(Handle.BR, AffineTransform.getTranslateInstance(0, -bbox.height/2))); 131 symbol(symbols.get(1), new Delta(Handle.BL, AffineTransform.getTranslateInstance(0, -bbox.height/2))); 132 symbol(symbols.get(2), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-bbox.width/2, 0))); 133 symbol(symbols.get(3), new Delta(Handle.CC, new AffineTransform())); 134 symbol(symbols.get(4), new Delta(Handle.LC, AffineTransform.getTranslateInstance(bbox.width/2, 0))); 135 symbol(symbols.get(5), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, bbox.height/2))); 136 symbol(symbols.get(6), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, bbox.height/2))); 137 symbol(symbols.get(7), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, bbox.height/2))); 138 138 break; 139 139 case 9: 140 symbol( feature,symbols.get(0), new Delta(Handle.BR, AffineTransform.getTranslateInstance(-bbox.width/2, -bbox.height/2)));141 symbol( feature,symbols.get(1), new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -bbox.height/2)));142 symbol( feature,symbols.get(2), new Delta(Handle.BL, AffineTransform.getTranslateInstance(bbox.width/2, -bbox.height/2)));143 symbol( feature,symbols.get(3), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-bbox.width/2, 0)));144 symbol( feature,symbols.get(4), new Delta(Handle.CC, new AffineTransform()));145 symbol( feature,symbols.get(5), new Delta(Handle.LC, AffineTransform.getTranslateInstance(bbox.width/2, 0)));146 symbol( feature,symbols.get(6), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, bbox.height/2)));147 symbol( feature,symbols.get(7), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, bbox.height/2)));148 symbol( feature,symbols.get(8), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, bbox.height/2)));140 symbol(symbols.get(0), new Delta(Handle.BR, AffineTransform.getTranslateInstance(-bbox.width/2, -bbox.height/2))); 141 symbol(symbols.get(1), new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -bbox.height/2))); 142 symbol(symbols.get(2), new Delta(Handle.BL, AffineTransform.getTranslateInstance(bbox.width/2, -bbox.height/2))); 143 symbol(symbols.get(3), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-bbox.width/2, 0))); 144 symbol(symbols.get(4), new Delta(Handle.CC, new AffineTransform())); 145 symbol(symbols.get(5), new Delta(Handle.LC, AffineTransform.getTranslateInstance(bbox.width/2, 0))); 146 symbol(symbols.get(6), new Delta(Handle.TR, AffineTransform.getTranslateInstance(-bbox.width/2, bbox.height/2))); 147 symbol(symbols.get(7), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, bbox.height/2))); 148 symbol(symbols.get(8), new Delta(Handle.TL, AffineTransform.getTranslateInstance(bbox.width/2, bbox.height/2))); 149 149 break; 150 150 } … … 169 169 } 170 170 171 public static void lineSymbols( Feature feature,Symbol prisymb, double space, Symbol secsymb, Symbol tersymb, int ratio, Color col) {172 if (( feature.geom.prim == Pflag.NOSP) || (feature.geom.prim == Pflag.POINT))171 public static void lineSymbols(Symbol prisymb, double space, Symbol secsymb, Symbol tersymb, int ratio, Color col) { 172 if ((Rules.feature.geom.prim == Pflag.NOSP) || (Rules.feature.geom.prim == Pflag.POINT)) 173 173 return; 174 174 Rectangle2D.Double prect = symbolSize(prisymb); … … 192 192 boolean stflag = false; 193 193 Symbol symbol = prisymb; 194 GeomIterator git = map.new GeomIterator( feature.geom);194 GeomIterator git = map.new GeomIterator(Rules.feature.geom); 195 195 while (git.hasComp()) { 196 196 git.nextComp(); … … 253 253 } 254 254 255 public static void lineVector( Feature feature,LineStyle style) {255 public static void lineVector(LineStyle style) { 256 256 Path2D.Double p = new Path2D.Double(); 257 257 p.setWindingRule(GeneralPath.WIND_EVEN_ODD); 258 258 Point2D point; 259 GeomIterator git = map.new GeomIterator( feature.geom);259 GeomIterator git = map.new GeomIterator(Rules.feature.geom); 260 260 while (git.hasComp()) { 261 261 git.nextComp(); … … 278 278 } 279 279 } 280 if ((style.fill != null) && ( feature.geom.prim == Pflag.AREA)) {280 if ((style.fill != null) && (Rules.feature.geom.prim == Pflag.AREA)) { 281 281 g2.setPaint(style.fill); 282 282 g2.fill(p); … … 298 298 } 299 299 300 public static void lineCircle( Feature feature,LineStyle style, double radius, UniHLU units) {300 public static void lineCircle(LineStyle style, double radius, UniHLU units) { 301 301 switch (units) { 302 302 case HLU_FEET: … … 318 318 break; 319 319 } 320 radius *= context.mile( feature);320 radius *= context.mile(Rules.feature); 321 321 Symbol circle = new Symbol(); 322 322 if (style.fill != null) { … … 327 327 circle.add(new Instr(Form.STRK, new BasicStroke(style.width, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, style.dash, 0))); 328 328 circle.add(new Instr(Form.ELPS, new Ellipse2D.Double(-radius,-radius,radius*2,radius*2))); 329 Point2D point = context.getPoint( feature.geom.centre);329 Point2D point = context.getPoint(Rules.feature.geom.centre); 330 330 Symbols.drawSymbol(g2, circle, 1, point.getX(), point.getY(), null, null); 331 331 } 332 332 333 public static void fillPattern( Feature feature,BufferedImage image) {333 public static void fillPattern(BufferedImage image) { 334 334 Path2D.Double p = new Path2D.Double(); 335 335 p.setWindingRule(GeneralPath.WIND_EVEN_ODD); 336 336 Point2D point; 337 switch ( feature.geom.prim) {337 switch (Rules.feature.geom.prim) { 338 338 case POINT: 339 point = context.getPoint( feature.geom.centre);339 point = context.getPoint(Rules.feature.geom.centre); 340 340 g2.drawImage(image, new AffineTransformOp(AffineTransform.getScaleInstance(sScale, sScale), AffineTransformOp.TYPE_NEAREST_NEIGHBOR), 341 341 (int)(point.getX() - (50 * sScale)), (int)(point.getY() - (50 * sScale))); 342 342 break; 343 343 case AREA: 344 GeomIterator git = map.new GeomIterator( feature.geom);344 GeomIterator git = map.new GeomIterator(Rules.feature.geom); 345 345 while (git.hasComp()) { 346 346 git.nextComp(); … … 365 365 } 366 366 367 public static void labelText( Feature feature,String str, Font font, Color tc) {368 labelText( feature,str, font, tc, LabelStyle.NONE, null, null, null);369 } 370 public static void labelText( Feature feature,String str, Font font, Color tc, Delta delta) {371 labelText( feature,str, font, tc, LabelStyle.NONE, null, null, delta);372 } 373 public static void labelText( Feature feature,String str, Font font, Color tc, LabelStyle style, Color fg) {374 labelText( feature,str, font, tc, style, fg, null, null);375 } 376 public static void labelText( Feature feature,String str, Font font, Color tc, LabelStyle style, Color fg, Color bg) {377 labelText( feature,str, font, tc, style, fg, bg, null);378 } 379 public static void labelText( Feature feature,String str, Font font, Color tc, LabelStyle style, Color fg, Delta delta) {380 labelText( feature,str, font, tc, style, fg, null, delta);381 } 382 public static void labelText( Feature feature,String str, Font font, Color tc, LabelStyle style, Color fg, Color bg, Delta delta) {367 public static void labelText(String str, Font font, Color tc) { 368 labelText(str, font, tc, LabelStyle.NONE, null, null, null); 369 } 370 public static void labelText(String str, Font font, Color tc, Delta delta) { 371 labelText(str, font, tc, LabelStyle.NONE, null, null, delta); 372 } 373 public static void labelText(String str, Font font, Color tc, LabelStyle style, Color fg) { 374 labelText(str, font, tc, style, fg, null, null); 375 } 376 public static void labelText(String str, Font font, Color tc, LabelStyle style, Color fg, Color bg) { 377 labelText(str, font, tc, style, fg, bg, null); 378 } 379 public static void labelText(String str, Font font, Color tc, LabelStyle style, Color fg, Delta delta) { 380 labelText(str, font, tc, style, fg, null, delta); 381 } 382 public static void labelText(String str, Font font, Color tc, LabelStyle style, Color fg, Color bg, Delta delta) { 383 383 if (delta == null) delta = new Delta(Handle.CC); 384 384 if (bg == null) bg = new Color(0x00000000, true); … … 475 475 } 476 476 label.add(new Instr(Form.TEXT, new Caption(str, font, tc, new Delta(Handle.TL, AffineTransform.getTranslateInstance(tx, ty))))); 477 Point2D point = context.getPoint( feature.geom.centre);477 Point2D point = context.getPoint(Rules.feature.geom.centre); 478 478 Symbols.drawSymbol(g2, label, sScale, point.getX(), point.getY(), null, delta); 479 479 } 480 480 481 public static void lineText( Feature feature,String str, Font font, Color colour, double offset, double dy) {481 public static void lineText(String str, Font font, Color colour, double offset, double dy) { 482 482 if (!str.isEmpty()) { 483 483 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); … … 493 493 double angle = 0; 494 494 int index = 0; 495 double gwidth = offset * ( feature.geom.length * context.mile(feature) - gv.getLogicalBounds().getWidth()) + gv.getGlyphMetrics(0).getAdvance();496 GeomIterator git = map.new GeomIterator( feature.geom);495 double gwidth = offset * (Rules.feature.geom.length * context.mile(Rules.feature) - gv.getLogicalBounds().getWidth()) + gv.getGlyphMetrics(0).getAdvance(); 496 GeomIterator git = map.new GeomIterator(Rules.feature.geom); 497 497 while (git.hasComp()) { 498 498 git.nextComp(); … … 548 548 } 549 549 550 public static void lightSector( Feature feature,Color col1, Color col2, double radius, double s1, double s2, Double dir, String str) {550 public static void lightSector(Color col1, Color col2, double radius, double s1, double s2, Double dir, String str) { 551 551 if ((zoom >= 16) && (radius > 0.2)) { 552 552 radius /= (Math.pow(2, zoom-15)); … … 555 555 g2.setStroke(new BasicStroke((float) (3.0 * sScale), BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 1, new float[] {20 * (float)sScale, 20 * (float)sScale}, 0)); 556 556 g2.setPaint(Color.black); 557 Point2D.Double centre = (Point2D.Double) context.getPoint( feature.geom.centre);558 double radial = radius * context.mile( feature);557 Point2D.Double centre = (Point2D.Double) context.getPoint(Rules.feature.geom.centre); 558 double radial = radius * context.mile(Rules.feature); 559 559 if (dir != null) { 560 560 g2.draw(new Line2D.Double(centre.x, centre.y, centre.x - radial * Math.sin(Math.toRadians(dir)), centre.y + radial * Math.cos(Math.toRadians(dir)))); … … 585 585 if (gv.getLogicalBounds().getWidth() < awidth) { 586 586 at.rotate(Math.toRadians(mid + (hand ? 0 : 180))); 587 Renderer.labelText( feature,str, font, Color.black, new Delta(Handle.CC, at));587 Renderer.labelText(str, font, Color.black, new Delta(Handle.CC, at)); 588 588 } else if (gv.getLogicalBounds().getHeight() < awidth) { 589 589 hand = (mid < 180); 590 590 at.rotate(Math.toRadians(mid + (hand ? -90 : 90))); 591 Renderer.labelText( feature,str, font, Color.black, hand ? new Delta(Handle.RC, at) : new Delta(Handle.LC, at));591 Renderer.labelText(str, font, Color.black, hand ? new Delta(Handle.RC, at) : new Delta(Handle.LC, at)); 592 592 } 593 593 if (dir != null) { … … 599 599 at = AffineTransform.getTranslateInstance(-radial * Math.sin(phi) / sScale, radial * Math.cos(phi) / sScale); 600 600 at.rotate(Math.toRadians(dir + (hand ? 90 : -90))); 601 Renderer.labelText( feature,str, font, Color.black, hand ? new Delta(Handle.BR, at) : new Delta(Handle.BL, at));601 Renderer.labelText(str, font, Color.black, hand ? new Delta(Handle.BR, at) : new Delta(Handle.BL, at)); 602 602 } 603 603 } -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r32084 r32090 13 13 import java.awt.Font; 14 14 import java.awt.geom.AffineTransform; 15 import java.text.DecimalFormat; 15 16 import java.util.ArrayList; 16 17 import java.util.EnumMap; … … 29 30 public class Rules { 30 31 32 static final DecimalFormat df = new DecimalFormat("#.#"); 33 31 34 static final EnumMap<ColCOL, Color> bodyColours = new EnumMap<ColCOL, Color>(ColCOL.class); 32 35 static { … … 71 74 } 72 75 73 public static void addName( Feature feature,int z, Font font) {74 addName( feature,z, font, Color.black, new Delta(Handle.CC, new AffineTransform()));75 } 76 public static void addName( Feature feature,int z, Font font, Color colour) {77 addName( feature,z, font, colour, new Delta(Handle.CC, new AffineTransform()));78 } 79 public static void addName( Feature feature,int z, Font font, Delta delta) {80 addName( feature,z, font, Color.black, delta);81 } 82 public static void addName( Feature feature,int z, Font font, Color colour, Delta delta) {76 public static void addName(int z, Font font) { 77 addName(z, font, Color.black, new Delta(Handle.CC, new AffineTransform())); 78 } 79 public static void addName(int z, Font font, Color colour) { 80 addName(z, font, colour, new Delta(Handle.CC, new AffineTransform())); 81 } 82 public static void addName(int z, Font font, Delta delta) { 83 addName(z, font, Color.black, delta); 84 } 85 public static void addName(int z, Font font, Color colour, Delta delta) { 83 86 if (Renderer.zoom >= z) { 84 87 String name = getName(); 85 88 if (name != null) { 86 Renderer.labelText( feature,name, font, colour, delta);87 } 88 } 89 } 90 91 static AttMap getAtts( Feature feature,Obj obj, int idx) {89 Renderer.labelText(name, font, colour, delta); 90 } 91 } 92 } 93 94 static AttMap getAtts(Obj obj, int idx) { 92 95 HashMap<Integer, AttMap> objs = feature.objs.get(obj); 93 96 if (objs == null) … … 97 100 } 98 101 99 public static Object getAttVal( Feature feature, Obj obj, int idx, Att att) {102 public static Object getAttVal(Obj obj, Att att) { 100 103 AttMap atts; 101 104 HashMap<Integer, AttMap> objs; 102 105 AttVal<?> item; 103 106 if ((objs = feature.objs.get(obj)) != null) 104 atts = objs.get( idx);107 atts = objs.get(0); 105 108 else 106 109 return null; … … 111 114 } 112 115 113 public static String getAttStr( Feature feature, Obj obj, int idx, Att att) {114 String str = (String)getAttVal( feature, obj, idx, att);116 public static String getAttStr(Obj obj, Att att) { 117 String str = (String)getAttVal(obj, att); 115 118 if (str != null) { 116 119 return str; … … 118 121 return ""; 119 122 } 120 123 121 124 @SuppressWarnings("unchecked") 122 public static Enum<?> getAttEnum( Feature feature, Obj obj, int idx, Att att) {123 ArrayList<?> list = (ArrayList<?>)getAttVal( feature, obj, idx, att);125 public static Enum<?> getAttEnum(Obj obj, Att att) { 126 ArrayList<?> list = (ArrayList<?>)getAttVal(obj, att); 124 127 if (list != null) { 125 128 return ((ArrayList<Enum<?>>)list).get(0); … … 129 132 130 133 @SuppressWarnings("unchecked") 131 public static ArrayList<?> getAttList( Feature feature, Obj obj, int idx, Att att) {132 ArrayList<Enum<?>> list = (ArrayList<Enum<?>>)getAttVal( feature, obj, idx, att);134 public static ArrayList<?> getAttList(Obj obj, Att att) { 135 ArrayList<Enum<?>> list = (ArrayList<Enum<?>>)getAttVal(obj, att); 133 136 if (list != null) { 134 137 return list; … … 140 143 141 144 @SuppressWarnings("unchecked") 142 static Scheme getScheme( Feature feature,Obj obj) {145 static Scheme getScheme(Obj obj) { 143 146 ArrayList<Color> colours = new ArrayList<Color>(); 144 for (ColCOL col : (ArrayList<ColCOL>) getAttList( feature, obj, 0, Att.COLOUR)) {147 for (ColCOL col : (ArrayList<ColCOL>) getAttList(obj, Att.COLOUR)) { 145 148 colours.add(bodyColours.get(col)); 146 149 } 147 150 ArrayList<Patt> patterns = new ArrayList<Patt>(); 148 for (ColPAT pat : (ArrayList<ColPAT>) getAttList( feature, obj, 0, Att.COLPAT)) {151 for (ColPAT pat : (ArrayList<ColPAT>) getAttList(obj, Att.COLPAT)) { 149 152 patterns.add(pattMap.get(pat)); 150 153 } 151 154 return new Scheme(patterns, colours); 152 155 } 153 154 static boolean testAttribute(Feature feature, Obj obj, int idx, Att att, Object val) {156 157 static boolean hasAttribute(Obj obj, int idx, Att att) { 155 158 AttMap atts; 156 if ((atts = getAtts(feature, obj, idx)) != null) { 159 if ((atts = getAtts(obj, idx)) != null) { 160 AttVal<?> item = atts.get(att); 161 return item != null; 162 } 163 return false; 164 } 165 166 static boolean testAttribute(Obj obj, Att att, Object val) { 167 AttMap atts; 168 if ((atts = getAtts(obj, 0)) != null) { 157 169 AttVal<?> item = atts.get(att); 158 170 if (item != null) { … … 161 173 case A: 162 174 return ((String)item.val).equals(val); 175 case E: 163 176 case L: 164 177 return ((ArrayList<?>)item.val).contains(val); 165 case E:166 178 case F: 167 179 case I: 168 return item.val .equals(val);180 return item.val == val; 169 181 } 170 182 } … … 173 185 } 174 186 175 static Feature feature;187 public static Feature feature; 176 188 static ArrayList<Feature> objects; 177 189 … … 248 260 if (testObject(Obj.CGUSTA)) for (Feature f : objects) if (testFeature(f)) stations(); 249 261 if (testObject(Obj.RDOSTA)) for (Feature f : objects) if (testFeature(f)) stations(); 262 if (testObject(Obj.RADRFL)) for (Feature f : objects) if (testFeature(f)) stations(); 250 263 if (testObject(Obj.RADSTA)) for (Feature f : objects) if (testFeature(f)) stations(); 251 264 if (testObject(Obj.RTPBCN)) for (Feature f : objects) if (testFeature(f)) stations(); … … 275 288 switch (feature.type) { 276 289 case BUAARE: 277 Renderer.lineVector( feature,new LineStyle(new Color(0x20000000, true)));290 Renderer.lineVector(new LineStyle(new Color(0x20000000, true))); 278 291 break; 279 292 case COALNE: 280 293 if (Renderer.zoom >= 12) 281 Renderer.lineVector( feature,new LineStyle(Color.black, 10));294 Renderer.lineVector(new LineStyle(Color.black, 10)); 282 295 break; 283 296 case DEPARE: 284 297 Double depmax = 0.0; 285 if (((depmax = (Double) getAttVal( feature, Obj.DEPARE, 0, Att.DRVAL2)) != null) && (depmax <= 0.0)) {286 Renderer.lineVector( feature,new LineStyle(Symbols.Gdries));298 if (((depmax = (Double) getAttVal(Obj.DEPARE, Att.DRVAL2)) != null) && (depmax <= 0.0)) { 299 Renderer.lineVector(new LineStyle(Symbols.Gdries)); 287 300 } 288 301 break; 289 302 case LAKARE: 290 303 if ((Renderer.zoom >= 12) || (feature.geom.area > 10.0)) 291 Renderer.lineVector( feature,new LineStyle(Symbols.Bwater));304 Renderer.lineVector(new LineStyle(Symbols.Bwater)); 292 305 break; 293 306 case DRGARE: 294 307 if (Renderer.zoom < 16) 295 Renderer.lineVector( feature,new LineStyle(Color.black, 8, new float[] { 25, 25 }, new Color(0x40ffffff, true)));308 Renderer.lineVector(new LineStyle(Color.black, 8, new float[] { 25, 25 }, new Color(0x40ffffff, true))); 296 309 else 297 Renderer.lineVector( feature,new LineStyle(Color.black, 8, new float[] { 25, 25 }));298 addName( feature,12, new Font("Arial", Font.PLAIN, 100), new Delta(Handle.CC, new AffineTransform()));310 Renderer.lineVector(new LineStyle(Color.black, 8, new float[] { 25, 25 })); 311 addName(12, new Font("Arial", Font.PLAIN, 100), new Delta(Handle.CC, new AffineTransform())); 299 312 break; 300 313 case FAIRWY: 301 314 if (feature.geom.area > 2.0) { 302 315 if (Renderer.zoom < 16) 303 Renderer.lineVector( feature,new LineStyle(Symbols.Mline, 8, new float[] { 50, 50 }, new Color(0x40ffffff, true)));316 Renderer.lineVector(new LineStyle(Symbols.Mline, 8, new float[] { 50, 50 }, new Color(0x40ffffff, true))); 304 317 else 305 Renderer.lineVector( feature,new LineStyle(Symbols.Mline, 8, new float[] { 50, 50 }));318 Renderer.lineVector(new LineStyle(Symbols.Mline, 8, new float[] { 50, 50 })); 306 319 } else { 307 320 if (Renderer.zoom >= 14) 308 Renderer.lineVector( feature,new LineStyle(new Color(0x40ffffff, true)));321 Renderer.lineVector(new LineStyle(new Color(0x40ffffff, true))); 309 322 } 310 323 break; … … 313 326 case HRBBSN: 314 327 if (Renderer.zoom >= 12) { 315 Renderer.lineVector( feature,new LineStyle(Color.black, 10, Symbols.Bwater));328 Renderer.lineVector(new LineStyle(Color.black, 10, Symbols.Bwater)); 316 329 } else { 317 Renderer.lineVector( feature,new LineStyle(Symbols.Bwater));330 Renderer.lineVector(new LineStyle(Symbols.Bwater)); 318 331 } 319 332 break; … … 321 334 if (feature.objs.get(Obj.HRBBSN) != null) { 322 335 if (Renderer.zoom >= 12) { 323 Renderer.lineVector( feature,new LineStyle(Color.black, 10, Symbols.Bwater));336 Renderer.lineVector(new LineStyle(Color.black, 10, Symbols.Bwater)); 324 337 } else { 325 Renderer.lineVector( feature,new LineStyle(Symbols.Bwater));338 Renderer.lineVector(new LineStyle(Symbols.Bwater)); 326 339 } 327 340 } 328 341 break; 329 342 case LNDARE: 330 Renderer.lineVector( feature,new LineStyle(Symbols.Yland));343 Renderer.lineVector(new LineStyle(Symbols.Yland)); 331 344 break; 332 345 case MARCUL: 333 346 if (Renderer.zoom >= 12) { 334 347 if (Renderer.zoom >= 14) { 335 Renderer.symbol( feature,Areas.MarineFarm);348 Renderer.symbol(Areas.MarineFarm); 336 349 } 337 350 if ((feature.geom.area > 0.2) || ((feature.geom.area > 0.05) && (Renderer.zoom >= 14)) || ((feature.geom.area > 0.005) && (Renderer.zoom >= 16))) { 338 Renderer.lineVector( feature,new LineStyle(Color.black, 4, new float[] { 10, 10 }));351 Renderer.lineVector(new LineStyle(Color.black, 4, new float[] { 10, 10 })); 339 352 } 340 353 } 341 354 break; 342 355 case OSPARE: 343 if (testAttribute(feature , feature.type, 0, Att.CATPRA, CatPRA.PRA_WFRM)) {344 Renderer.symbol( feature,Areas.WindFarm);345 Renderer.lineVector( feature,new LineStyle(Color.black, 20, new float[] { 40, 40 }));346 addName( feature,15, new Font("Arial", Font.BOLD, 80), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 10)));356 if (testAttribute(feature.type, Att.CATPRA, CatPRA.PRA_WFRM)) { 357 Renderer.symbol(Areas.WindFarm); 358 Renderer.lineVector(new LineStyle(Color.black, 20, new float[] { 40, 40 })); 359 addName(15, new Font("Arial", Font.BOLD, 80), new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 10))); 347 360 } 348 361 break; … … 350 363 case MIPARE: 351 364 if (Renderer.zoom >= 12) { 352 Renderer.lineSymbols( feature,Areas.Restricted, 1.0, null, null, 0, Symbols.Mline);353 if (testAttribute(feature , feature.type, 0, Att.CATREA, CatREA.REA_NWAK)) {354 Renderer.symbol( feature,Areas.NoWake);365 Renderer.lineSymbols(Areas.Restricted, 1.0, null, null, 0, Symbols.Mline); 366 if (testAttribute(feature.type, Att.CATREA, CatREA.REA_NWAK)) { 367 Renderer.symbol(Areas.NoWake); 355 368 } 356 369 } … … 358 371 case PRCARE: 359 372 if (Renderer.zoom >= 12) { 360 Renderer.lineVector( feature,new LineStyle(Symbols.Mline, 10, new float[] { 40, 40 }));373 Renderer.lineVector(new LineStyle(Symbols.Mline, 10, new float[] { 40, 40 })); 361 374 } 362 375 break; 363 376 case SEAARE: 364 switch ((CatSEA) getAttEnum(feature , feature.type, 0, Att.CATSEA)) {377 switch ((CatSEA) getAttEnum(feature.type, Att.CATSEA)) { 365 378 case SEA_RECH: 366 379 if ((Renderer.zoom >= 10) && (name != null)) 367 380 if (feature.geom.prim == Pflag.LINE) { 368 Renderer.lineText( feature,name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);381 Renderer.lineText(name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40); 369 382 } else { 370 Renderer.labelText( feature,name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));383 Renderer.labelText(name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40))); 371 384 } 372 385 break; … … 374 387 if ((Renderer.zoom >= 12) && (name != null)) 375 388 if (feature.geom.prim == Pflag.LINE) { 376 Renderer.lineText( feature,name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40);389 Renderer.lineText(name, new Font("Arial", Font.PLAIN, 150), Color.black, 0.5, -40); 377 390 } else { 378 Renderer.labelText( feature,name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));391 Renderer.labelText(name, new Font("Arial", Font.PLAIN, 150), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40))); 379 392 } 380 393 break; … … 382 395 if (Renderer.zoom >= 14) { 383 396 if (feature.geom.prim == Pflag.AREA) { 384 Renderer.lineVector( feature,new LineStyle(new Color(0xc480ff), 4, new float[] { 25, 25 }));397 Renderer.lineVector(new LineStyle(new Color(0xc480ff), 4, new float[] { 25, 25 })); 385 398 if (name != null) { 386 Renderer.labelText( feature,name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));387 Renderer.labelText( feature,"(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC));399 Renderer.labelText(name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40))); 400 Renderer.labelText("(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC)); 388 401 } 389 402 } else if (feature.geom.prim == Pflag.LINE) { 390 403 if (name != null) { 391 Renderer.lineText( feature,name, new Font("Arial", Font.ITALIC, 75), Color.black, 0.5, -40);392 Renderer.lineText( feature,"(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, 0);404 Renderer.lineText(name, new Font("Arial", Font.ITALIC, 75), Color.black, 0.5, -40); 405 Renderer.lineText("(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, 0); 393 406 } 394 407 } else { 395 408 if (name != null) { 396 Renderer.labelText( feature,name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40)));397 Renderer.labelText( feature,"(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC));409 Renderer.labelText(name, new Font("Arial", Font.ITALIC, 75), Color.black, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -40))); 410 Renderer.labelText("(Shoal)", new Font("Arial", Font.PLAIN, 60), Color.black, new Delta(Handle.BC)); 398 411 } 399 412 } … … 402 415 case SEA_GAT: 403 416 case SEA_NRRW: 404 addName( feature,12, new Font("Arial", Font.PLAIN, 100));417 addName(12, new Font("Arial", Font.PLAIN, 100)); 405 418 break; 406 419 default: … … 409 422 break; 410 423 case SNDWAV: 411 if (Renderer.zoom >= 12) Renderer.fillPattern( feature,Areas.Sandwaves);424 if (Renderer.zoom >= 12) Renderer.fillPattern(Areas.Sandwaves); 412 425 break; 413 426 case SPLARE: 414 427 if (Renderer.zoom >= 12) { 415 Renderer.symbol( feature,Areas.Plane, new Scheme(Symbols.Msymb));416 Renderer.lineSymbols( feature,Areas.Restricted, 0.5, Areas.LinePlane, null, 10, Symbols.Mline);417 } 418 addName( feature,15, new Font("Arial", Font.BOLD, 80), new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90)));428 Renderer.symbol(Areas.Plane, new Scheme(Symbols.Msymb)); 429 Renderer.lineSymbols(Areas.Restricted, 0.5, Areas.LinePlane, null, 10, Symbols.Mline); 430 } 431 addName(15, new Font("Arial", Font.BOLD, 80), new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90))); 419 432 break; 420 433 default: … … 426 439 private static void beacons() { 427 440 if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BCNLAT) || (feature.type == Obj.BCNCAR)))) { 428 BcnSHP shape = (BcnSHP)getAttEnum(feature , feature.type, 0, Att.BCNSHP);441 BcnSHP shape = (BcnSHP)getAttEnum(feature.type, Att.BCNSHP); 429 442 if (shape == BcnSHP.BCN_UNKN) 430 443 shape = BcnSHP.BCN_PILE; 431 444 if ((shape == BcnSHP.BCN_WTHY) && (feature.type == Obj.BCNLAT)) { 432 switch ((CatLAM) getAttEnum(feature , feature.type, 0, Att.CATLAM)) {445 switch ((CatLAM) getAttEnum(feature.type, Att.CATLAM)) { 433 446 case LAM_PORT: 434 Renderer.symbol( feature,Beacons.WithyPort);447 Renderer.symbol(Beacons.WithyPort); 435 448 break; 436 449 case LAM_STBD: 437 Renderer.symbol( feature,Beacons.WithyStarboard);450 Renderer.symbol(Beacons.WithyStarboard); 438 451 break; 439 452 default: 440 Renderer.symbol( feature, Beacons.Stake, getScheme(feature,feature.type));453 Renderer.symbol(Beacons.Stake, getScheme(feature.type)); 441 454 } 442 455 } else if ((shape == BcnSHP.BCN_PRCH) && (feature.type == Obj.BCNLAT) && !(feature.objs.containsKey(Obj.TOPMAR))) { 443 switch ((CatLAM) getAttEnum(feature , feature.type, 0, Att.CATLAM)) {456 switch ((CatLAM) getAttEnum(feature.type, Att.CATLAM)) { 444 457 case LAM_PORT: 445 Renderer.symbol( feature,Beacons.PerchPort);458 Renderer.symbol(Beacons.PerchPort); 446 459 break; 447 460 case LAM_STBD: 448 Renderer.symbol( feature,Beacons.PerchStarboard);461 Renderer.symbol(Beacons.PerchStarboard); 449 462 break; 450 463 default: 451 Renderer.symbol( feature, Beacons.Stake, getScheme(feature,feature.type));464 Renderer.symbol(Beacons.Stake, getScheme(feature.type)); 452 465 } 453 466 } else { 454 Renderer.symbol( feature, Beacons.Shapes.get(shape), getScheme(feature,feature.type));467 Renderer.symbol(Beacons.Shapes.get(shape), getScheme(feature.type)); 455 468 if (feature.objs.containsKey(Obj.TOPMAR)) { 456 469 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 457 470 if (topmap.containsKey(Att.TOPSHP)) { 458 Renderer.symbol( feature, Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(feature,Obj.TOPMAR), Topmarks.BeaconDelta);471 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BeaconDelta); 459 472 } 460 473 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 461 474 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 462 475 if (topmap.containsKey(Att.TOPSHP)) { 463 Renderer.symbol( feature, Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(feature,Obj.DAYMAR), Topmarks.BeaconDelta);464 } 465 } 466 } 467 addName( feature,15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(60, -50)));468 Signals.addSignals( feature);476 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.BeaconDelta); 477 } 478 } 479 } 480 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(60, -50))); 481 Signals.addSignals(); 469 482 } 470 483 } … … 473 486 private static void buoys() { 474 487 if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BOYLAT) || (feature.type == Obj.BOYCAR)))) { 475 BoySHP shape = (BoySHP) getAttEnum(feature , feature.type, 0, Att.BOYSHP);488 BoySHP shape = (BoySHP) getAttEnum(feature.type, Att.BOYSHP); 476 489 if (shape == BoySHP.BOY_UNKN) shape = BoySHP.BOY_PILR; 477 Renderer.symbol( feature, Buoys.Shapes.get(shape), getScheme(feature,feature.type));490 Renderer.symbol(Buoys.Shapes.get(shape), getScheme(feature.type)); 478 491 if (feature.objs.containsKey(Obj.TOPMAR)) { 479 492 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 480 493 if (topmap.containsKey(Att.TOPSHP)) { 481 Renderer.symbol( feature, Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(feature,Obj.TOPMAR), Topmarks.BuoyDeltas.get(shape));494 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BuoyDeltas.get(shape)); 482 495 } 483 496 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 484 497 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 485 498 if (topmap.containsKey(Att.TOPSHP)) { 486 Renderer.symbol( feature, Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(feature,Obj.DAYMAR), Topmarks.BuoyDeltas.get(shape));487 } 488 } 489 addName( feature,15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(60, -50)));490 Signals.addSignals( feature);499 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.BuoyDeltas.get(shape)); 500 } 501 } 502 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(60, -50))); 503 Signals.addSignals(); 491 504 } 492 505 } … … 520 533 } 521 534 if (hstr.isEmpty() && !vstr.isEmpty()) { 522 Renderer.labelText( feature,vstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.VCLR, Color.black, Color.white, new Delta(Handle.CC));535 Renderer.labelText(vstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.VCLR, Color.black, Color.white, new Delta(Handle.CC)); 523 536 } else if (!hstr.isEmpty() && !vstr.isEmpty()) { 524 Renderer.labelText( feature,vstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.VCLR, Color.black, Color.white, new Delta(Handle.BC));525 Renderer.labelText( feature,hstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.HCLR, Color.black, Color.white, new Delta(Handle.TC));537 Renderer.labelText(vstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.VCLR, Color.black, Color.white, new Delta(Handle.BC)); 538 Renderer.labelText(hstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.HCLR, Color.black, Color.white, new Delta(Handle.TC)); 526 539 } else if (!hstr.isEmpty() && vstr.isEmpty()) { 527 Renderer.labelText( feature,hstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.HCLR, Color.black, Color.white, new Delta(Handle.CC));540 Renderer.labelText(hstr, new Font("Arial", Font.PLAIN, 30), Color.black, LabelStyle.HCLR, Color.black, Color.white, new Delta(Handle.CC)); 528 541 } 529 542 } … … 534 547 if ((Renderer.zoom >= 16) && (feature.geom.length < 2)) { 535 548 if (feature.type == Obj.CBLSUB) { 536 Renderer.lineSymbols( feature,Areas.Cable, 0.0, null, null, 0, Symbols.Mline);549 Renderer.lineSymbols(Areas.Cable, 0.0, null, null, 0, Symbols.Mline); 537 550 } else if (feature.type == Obj.CBLOHD) { 538 551 AttMap atts = feature.objs.get(Obj.CBLOHD).get(0); 539 552 if ((atts != null) && (atts.containsKey(Att.CATCBL)) && (atts.get(Att.CATCBL).val == CatCBL.CBL_POWR)) { 540 Renderer.lineSymbols( feature,Areas.CableDash, 0, Areas.CableDot, Areas.CableFlash, 2, Color.black);553 Renderer.lineSymbols(Areas.CableDash, 0, Areas.CableDot, Areas.CableFlash, 2, Color.black); 541 554 } else { 542 Renderer.lineSymbols( feature,Areas.CableDash, 0, Areas.CableDot, null, 2, Color.black);555 Renderer.lineSymbols(Areas.CableDash, 0, Areas.CableDot, null, 2, Color.black); 543 556 } 544 557 if (atts != null) { 545 558 if (atts.containsKey(Att.VERCLR)) { 546 Renderer.labelText( feature,String.valueOf((Double) atts.get(Att.VERCLR).val), new Font("Arial", Font.PLAIN, 50), Color.black, LabelStyle.VCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25)));559 Renderer.labelText(String.valueOf((Double) atts.get(Att.VERCLR).val), new Font("Arial", Font.PLAIN, 50), Color.black, LabelStyle.VCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25))); 547 560 } else if (atts.containsKey(Att.VERCSA)) { 548 Renderer.labelText( feature,String.valueOf((Double) atts.get(Att.VERCSA).val), new Font("Arial", Font.PLAIN, 50), Color.black, LabelStyle.PCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25)));561 Renderer.labelText(String.valueOf((Double) atts.get(Att.VERCSA).val), new Font("Arial", Font.PLAIN, 50), Color.black, LabelStyle.PCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25))); 549 562 } 550 563 } … … 556 569 if (Renderer.zoom >= 14) { 557 570 Symbol symb = Harbours.CallPoint2; 558 TrfTRF trf = (TrfTRF) getAttEnum(feature , feature.type, 0, Att.TRAFIC);571 TrfTRF trf = (TrfTRF) getAttEnum(feature.type, Att.TRAFIC); 559 572 if (trf != TrfTRF.TRF_TWOW) { 560 573 symb = Harbours.CallPoint1; 561 574 } 562 575 Double orient = 0.0; 563 if ((orient = (Double) getAttVal(feature , feature.type, 0, Att.ORIENT)) == null) {576 if ((orient = (Double) getAttVal(feature.type, Att.ORIENT)) == null) { 564 577 orient = 0.0; 565 578 } 566 Renderer.symbol( feature,symb, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(orient))));579 Renderer.symbol(symb, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(orient)))); 567 580 String chn; 568 if (!(chn = getAttStr(feature , feature.type, 0, Att.COMCHA)).isEmpty()) {569 Renderer.labelText( feature,("Ch." + chn), new Font("Arial", Font.PLAIN, 50), Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,50)));581 if (!(chn = getAttStr(feature.type, Att.COMCHA)).isEmpty()) { 582 Renderer.labelText(("Ch." + chn), new Font("Arial", Font.PLAIN, 50), Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,50))); 570 583 } 571 584 } … … 574 587 private static void distances() { 575 588 if (Renderer.zoom >= 14) { 576 if (!testAttribute( feature, Obj.DISMAR, 0, Att.CATDIS, CatDIS.DIS_NONI)) {577 Renderer.symbol( feature,Harbours.DistanceI);589 if (!testAttribute(Obj.DISMAR, Att.CATDIS, CatDIS.DIS_NONI)) { 590 Renderer.symbol(Harbours.DistanceI); 578 591 } else { 579 Renderer.symbol( feature,Harbours.DistanceU);592 Renderer.symbol(Harbours.DistanceU); 580 593 } 581 594 if (Renderer.zoom >= 15) { 582 AttMap atts = getAtts( feature,Obj.DISMAR, 0);595 AttMap atts = getAtts(Obj.DISMAR, 0); 583 596 if ((atts != null) && (atts.containsKey(Att.WTWDIS))) { 584 597 Double dist = (Double) atts.get(Att.WTWDIS).val; … … 609 622 } 610 623 str += String.format("%1.0f", dist); 611 Renderer.labelText( feature,str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.CC, AffineTransform.getTranslateInstance(0, 45)));624 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.CC, AffineTransform.getTranslateInstance(0, 45))); 612 625 } 613 626 } … … 616 629 617 630 private static void floats() { 618 switch (feature.type) { 619 case LITVES: 620 Renderer.symbol(feature, Buoys.Super, getScheme(feature, feature.type)); 621 break; 622 case LITFLT: 623 Renderer.symbol(feature, Buoys.Float, getScheme(feature, feature.type)); 624 break; 625 case BOYINB: 626 Renderer.symbol(feature, Buoys.Super, getScheme(feature, feature.type)); 627 break; 628 default: 629 break; 630 } 631 if (feature.objs.get(Obj.TOPMAR) != null) 632 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.TOPMAR), Topmarks.FloatDelta); 633 addName(feature, 15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50))); 634 Signals.addSignals(feature); 631 if (Renderer.zoom >= 12) { 632 switch (feature.type) { 633 case LITVES: 634 Renderer.symbol(Buoys.Super, getScheme(feature.type)); 635 break; 636 case LITFLT: 637 Renderer.symbol(Buoys.Float, getScheme(feature.type)); 638 break; 639 case BOYINB: 640 Renderer.symbol(Buoys.Super, getScheme(feature.type)); 641 break; 642 default: 643 break; 644 } 645 if (feature.objs.get(Obj.TOPMAR) != null) 646 Renderer.symbol(Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(Obj.TOPMAR), Topmarks.FloatDelta); 647 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50))); 648 Signals.addSignals(); 649 } 635 650 } 636 651 637 652 private static void gauges() { 638 653 if (Renderer.zoom >= 14) { 639 Renderer.symbol( feature,Harbours.TideGauge);640 addName( feature,15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50)));641 Signals.addSignals( feature);654 Renderer.symbol(Harbours.TideGauge); 655 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50))); 656 Signals.addSignals(); 642 657 } 643 658 } … … 649 664 case ACHBRT: 650 665 if (Renderer.zoom >= 14) { 651 Renderer.symbol( feature,Harbours.Anchorage, new Scheme(Symbols.Mline));666 Renderer.symbol(Harbours.Anchorage, new Scheme(Symbols.Mline)); 652 667 if (Renderer.zoom >= 15) { 653 Renderer.labelText( feature,name == null ? "" : name, new Font("Arial", Font.PLAIN, 30), Symbols.Msymb, LabelStyle.RRCT, Symbols.Mline, Color.white, new Delta(Handle.BC));654 } 655 } 656 if (getAttVal( feature, Obj.ACHBRT, 0, Att.RADIUS) != null) {668 Renderer.labelText(name == null ? "" : name, new Font("Arial", Font.PLAIN, 30), Symbols.Msymb, LabelStyle.RRCT, Symbols.Mline, Color.white, new Delta(Handle.BC)); 669 } 670 } 671 if (getAttVal(Obj.ACHBRT, Att.RADIUS) != null) { 657 672 double radius; 658 if ((radius = (Double) getAttVal( feature, Obj.ACHBRT, 0, Att.RADIUS)) != 0) {659 UniHLU units = (UniHLU) getAttEnum( feature, Obj.ACHBRT, 0, Att.HUNITS);673 if ((radius = (Double) getAttVal(Obj.ACHBRT, Att.RADIUS)) != 0) { 674 UniHLU units = (UniHLU) getAttEnum(Obj.ACHBRT, Att.HUNITS); 660 675 if (units == UniHLU.HLU_UNKN) { 661 676 units = UniHLU.HLU_METR; 662 677 } 663 Renderer.lineCircle( feature,new LineStyle(Symbols.Mline, 4, new float[] { 10, 10 }, null), radius, units);678 Renderer.lineCircle(new LineStyle(Symbols.Mline, 4, new float[] { 10, 10 }, null), radius, units); 664 679 } 665 680 } … … 668 683 if (Renderer.zoom >= 12) { 669 684 if (feature.geom.prim != Pflag.AREA) { 670 Renderer.symbol( feature,Harbours.Anchorage, new Scheme(Color.black));685 Renderer.symbol(Harbours.Anchorage, new Scheme(Color.black)); 671 686 } else { 672 Renderer.symbol( feature,Harbours.Anchorage, new Scheme(Symbols.Mline));673 Renderer.lineSymbols( feature,Areas.Restricted, 1.0, Areas.LineAnchor, null, 10, Symbols.Mline);674 } 675 addName( feature,15, new Font("Arial", Font.BOLD, 60), Symbols.Mline, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));676 ArrayList<StsSTS> sts = (ArrayList<StsSTS>) getAttList(feature, Obj.ACHARE, 0, Att.STATUS);687 Renderer.symbol(Harbours.Anchorage, new Scheme(Symbols.Mline)); 688 Renderer.lineSymbols(Areas.Restricted, 1.0, Areas.LineAnchor, null, 10, Symbols.Mline); 689 } 690 addName(15, new Font("Arial", Font.BOLD, 60), Symbols.Mline, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0))); 691 ArrayList<StsSTS> sts = (ArrayList<StsSTS>) getAttList(Obj.ACHARE, Att.STATUS); 677 692 if ((Renderer.zoom >= 15) && (sts.contains(StsSTS.STS_RESV))) { 678 Renderer.labelText( feature,"Reserved", new Font("Arial", Font.PLAIN, 50), Symbols.Mline, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60)));679 } 680 }681 ArrayList<CatACH> cats = (ArrayList<CatACH>) getAttList(feature, Obj.ACHARE, 0, Att.CATACH);682 int dy = (cats.size() - 1) * -30;683 for (CatACH cat : cats) {684 switch (cat) {685 case ACH_DEEP:686 Renderer.labelText(feature, "DW", new Font("Arial", Font.BOLD, 50), Symbols.Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));687 dy += 60;688 break;689 case ACH_TANK:690 Renderer.labelText(feature, "Tanker", new Font("Arial", Font.BOLD, 50), Symbols.Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));691 dy += 60;692 break;693 case ACH_H24P:694 Renderer.labelText(feature, "24h", new Font("Arial", Font.BOLD, 50), Symbols.Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));695 dy += 60;696 break;697 case ACH_EXPL:698 Renderer.symbol(feature, Harbours.Explosives, new Scheme(Symbols.Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));699 dy += 60;700 break;701 case ACH_QUAR:702 Renderer.symbol(feature, Harbours.Hospital, new Scheme(Symbols.Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));703 dy += 60;704 break;705 case ACH_SEAP:706 Renderer.symbol(feature, Areas.Seaplane, new Scheme(Symbols.Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy)));707 dy += 60;708 break;709 default:693 Renderer.labelText("Reserved", new Font("Arial", Font.PLAIN, 50), Symbols.Mline, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60))); 694 } 695 ArrayList<CatACH> cats = (ArrayList<CatACH>) getAttList(Obj.ACHARE, Att.CATACH); 696 int dy = (cats.size() - 1) * -30; 697 for (CatACH cat : cats) { 698 switch (cat) { 699 case ACH_DEEP: 700 Renderer.labelText("DW", new Font("Arial", Font.BOLD, 50), Symbols.Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 701 dy += 60; 702 break; 703 case ACH_TANK: 704 Renderer.labelText("Tanker", new Font("Arial", Font.BOLD, 50), Symbols.Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 705 dy += 60; 706 break; 707 case ACH_H24P: 708 Renderer.labelText("24h", new Font("Arial", Font.BOLD, 50), Symbols.Msymb, new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 709 dy += 60; 710 break; 711 case ACH_EXPL: 712 Renderer.symbol(Harbours.Explosives, new Scheme(Symbols.Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 713 dy += 60; 714 break; 715 case ACH_QUAR: 716 Renderer.symbol(Harbours.Hospital, new Scheme(Symbols.Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 717 dy += 60; 718 break; 719 case ACH_SEAP: 720 Renderer.symbol(Areas.Seaplane, new Scheme(Symbols.Msymb), new Delta(Handle.RC, AffineTransform.getTranslateInstance(-60, dy))); 721 dy += 60; 722 break; 723 default: 724 } 710 725 } 711 726 } … … 713 728 case BERTHS: 714 729 if (Renderer.zoom >= 14) { 715 Renderer.lineVector( feature,new LineStyle(Symbols.Mline, 6, new float[] { 20, 20 }));716 Renderer.labelText( feature,name == null ? " " : name, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, LabelStyle.RRCT, Symbols.Mline, Color.white);730 Renderer.lineVector(new LineStyle(Symbols.Mline, 6, new float[] { 20, 20 })); 731 Renderer.labelText(name == null ? " " : name, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, LabelStyle.RRCT, Symbols.Mline, Color.white); 717 732 } 718 733 break; … … 720 735 if (Renderer.zoom >= 16) { 721 736 ArrayList<Symbol> symbols = new ArrayList<Symbol>(); 722 ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList( feature, Obj.BUISGL, 0, Att.FUNCTN);737 ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList(Obj.BUISGL, Att.FUNCTN); 723 738 for (FncFNC fnc : fncs) { 724 739 symbols.add(Landmarks.Funcs.get(fnc)); 725 740 } 726 741 if (feature.objs.containsKey(Obj.SMCFAC)) { 727 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList( feature, Obj.SMCFAC, 0, Att.CATSCF);742 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(Obj.SMCFAC, Att.CATSCF); 728 743 for (CatSCF scf : scfs) { 729 744 symbols.add(Facilities.Cats.get(scf)); 730 745 } 731 746 } 732 Renderer.cluster( feature,symbols);747 Renderer.cluster(symbols); 733 748 } 734 749 break; 735 750 case HRBFAC: 736 751 if (Renderer.zoom >= 12) { 737 ArrayList<CatHAF> cathaf = (ArrayList<CatHAF>) getAttList( feature, Obj.HRBFAC, 0, Att.CATHAF);752 ArrayList<CatHAF> cathaf = (ArrayList<CatHAF>) getAttList(Obj.HRBFAC, Att.CATHAF); 738 753 if (cathaf.size() == 1) { 739 754 switch (cathaf.get(0)) { 740 755 case HAF_MRNA: 741 Renderer.symbol( feature,Harbours.Marina);756 Renderer.symbol(Harbours.Marina); 742 757 break; 743 758 case HAF_MANF: 744 Renderer.symbol( feature,Harbours.MarinaNF);759 Renderer.symbol(Harbours.MarinaNF); 745 760 break; 746 761 case HAF_FISH: 747 Renderer.symbol( feature,Harbours.Fishing);762 Renderer.symbol(Harbours.Fishing); 748 763 break; 749 764 default: 750 Renderer.symbol( feature,Harbours.Harbour);765 Renderer.symbol(Harbours.Harbour); 751 766 break; 752 767 } 753 768 } else { 754 Renderer.symbol( feature,Harbours.Harbour);769 Renderer.symbol(Harbours.Harbour); 755 770 } 756 771 } … … 765 780 switch (feature.type) { 766 781 case ROADWY: 767 ArrayList<CatROD> cat = (ArrayList<CatROD>) (getAttList( feature, Obj.ROADWY, 0, Att.CATROD));782 ArrayList<CatROD> cat = (ArrayList<CatROD>) (getAttList(Obj.ROADWY, Att.CATROD)); 768 783 if (cat.size() > 0) { 769 784 switch (cat.get(0)) { 770 785 case ROD_MWAY: 771 Renderer.lineVector( feature,new LineStyle(Color.black, 20));786 Renderer.lineVector(new LineStyle(Color.black, 20)); 772 787 break; 773 788 case ROD_MAJR: 774 Renderer.lineVector( feature,new LineStyle(Color.black, 15));789 Renderer.lineVector(new LineStyle(Color.black, 15)); 775 790 break; 776 791 case ROD_MINR: 777 Renderer.lineVector( feature,new LineStyle(Color.black, 10));792 Renderer.lineVector(new LineStyle(Color.black, 10)); 778 793 break; 779 794 default: 780 Renderer.lineVector( feature,new LineStyle(Color.black, 5));795 Renderer.lineVector(new LineStyle(Color.black, 5)); 781 796 } 782 797 } else { 783 Renderer.lineVector( feature,new LineStyle(Color.black, 5));798 Renderer.lineVector(new LineStyle(Color.black, 5)); 784 799 } 785 800 break; 786 801 case RAILWY: 787 Renderer.lineVector( feature,new LineStyle(Color.gray, 10));788 Renderer.lineVector( feature,new LineStyle(Color.black, 10, new float[] { 30, 30 }));802 Renderer.lineVector(new LineStyle(Color.gray, 10)); 803 Renderer.lineVector(new LineStyle(Color.black, 10, new float[] { 30, 30 })); 789 804 break; 790 805 default: … … 794 809 @SuppressWarnings("unchecked") 795 810 private static void landmarks() { 796 ArrayList<CatLMK> cats = (ArrayList<CatLMK>) getAttList(feature, feature.type, 0, Att.CATLMK); 797 Symbol catSym = Landmarks.Shapes.get(cats.get(0)); 798 ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList(feature, feature.type, 0, Att.FUNCTN); 799 Symbol fncSym = Landmarks.Funcs.get(fncs.get(0)); 800 if ((fncs.get(0) == FncFNC.FNC_CHCH) && (cats.get(0) == CatLMK.LMK_TOWR)) 801 catSym = Landmarks.ChurchTower; 802 if ((cats.get(0) == CatLMK.LMK_UNKN) && (fncs.get(0) == FncFNC.FNC_UNKN) && (feature.objs.get(Obj.LIGHTS) != null)) 803 catSym = Beacons.LightMajor; 804 if (cats.get(0) == CatLMK.LMK_RADR) 805 fncSym = Landmarks.RadioTV; 806 Renderer.symbol(feature, catSym); 807 Renderer.symbol(feature, fncSym); 808 addName(feature, 15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(60, -50))); 809 Signals.addSignals(feature); 810 } 811 811 if (Renderer.zoom >= 12) { 812 ArrayList<CatLMK> cats = (ArrayList<CatLMK>) getAttList(feature.type, Att.CATLMK); 813 Symbol catSym = Landmarks.Shapes.get(cats.get(0)); 814 ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList(feature.type, Att.FUNCTN); 815 Symbol fncSym = Landmarks.Funcs.get(fncs.get(0)); 816 if ((fncs.get(0) == FncFNC.FNC_CHCH) && (cats.get(0) == CatLMK.LMK_TOWR)) 817 catSym = Landmarks.ChurchTower; 818 if ((cats.get(0) == CatLMK.LMK_UNKN) && (fncs.get(0) == FncFNC.FNC_UNKN) && (feature.objs.get(Obj.LIGHTS) != null)) 819 catSym = Beacons.LightMajor; 820 if (cats.get(0) == CatLMK.LMK_RADR) 821 fncSym = Landmarks.RadioTV; 822 Renderer.symbol(catSym); 823 Renderer.symbol(fncSym); 824 if (Renderer.zoom >= 15) 825 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(60, -50))); 826 Signals.addSignals(); 827 } 828 } 829 830 @SuppressWarnings("unchecked") 812 831 private static void lights() { 813 832 switch (feature.type) { 814 833 case LITMAJ: 815 Renderer.symbol( feature,Beacons.LightMajor);834 Renderer.symbol(Beacons.LightMajor); 816 835 break; 817 836 case LITMIN: 818 837 case LIGHTS: 819 Renderer.symbol( feature,Beacons.LightMinor);838 Renderer.symbol(Beacons.LightMinor); 820 839 break; 821 840 case PILPNT: 822 841 if (feature.objs.containsKey(Obj.LIGHTS)) 823 Renderer.symbol( feature,Beacons.LightMinor);842 Renderer.symbol(Beacons.LightMinor); 824 843 else 825 Renderer.symbol( feature,Harbours.Post);844 Renderer.symbol(Harbours.Post); 826 845 break; 827 846 default: … … 829 848 } 830 849 if (feature.objs.containsKey(Obj.TOPMAR)) { 831 Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val); 832 if (topmark != null) 833 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.TOPMAR), Topmarks.LightDelta); 850 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 851 if (topmap.containsKey(Att.TOPSHP)) { 852 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.LightDelta); 853 } 834 854 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 835 Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val); 836 if (topmark != null) 837 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.DAYMAR), Topmarks.LightDelta); 838 } 839 Signals.addSignals(feature); 855 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 856 if (topmap.containsKey(Att.TOPSHP)) { 857 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>)(topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.LightDelta); 858 } 859 } 860 Signals.addSignals(); 840 861 } 841 862 … … 844 865 if (Renderer.zoom >= 16) { 845 866 ArrayList<Symbol> symbols = new ArrayList<Symbol>(); 846 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList( feature, Obj.SMCFAC, 0, Att.CATSCF);867 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(Obj.SMCFAC, Att.CATSCF); 847 868 for (CatSCF scf : scfs) { 848 869 symbols.add(Facilities.Cats.get(scf)); 849 870 } 850 Renderer.cluster( feature,symbols);871 Renderer.cluster(symbols); 851 872 } 852 873 } 853 874 854 875 private static void moorings() { 855 switch ((CatMOR) getAttEnum(feature, feature.type, 0, Att.CATMOR)) { 856 case MOR_DLPN: 857 Renderer.symbol(feature, Harbours.Dolphin); 858 break; 859 case MOR_DDPN: 860 Renderer.symbol(feature, Harbours.DeviationDolphin); 861 break; 862 case MOR_BLRD: 863 case MOR_POST: 864 Renderer.symbol(feature, Harbours.Bollard); 865 break; 866 case MOR_BUOY: 867 BoySHP shape = (BoySHP) getAttEnum(feature, feature.type, 0, Att.BOYSHP); 868 if (shape == BoySHP.BOY_UNKN) { 869 shape = BoySHP.BOY_SPHR; 870 } 871 Renderer.symbol(feature, Buoys.Shapes.get(shape), getScheme(feature, feature.type)); 872 Renderer.symbol(feature, Topmarks.TopMooring, Topmarks.BuoyDeltas.get(shape)); 873 break; 874 default: 875 break; 876 } 877 Signals.addSignals(feature); 876 if (Renderer.zoom >= 14) { 877 switch ((CatMOR) getAttEnum(feature.type, Att.CATMOR)) { 878 case MOR_DLPN: 879 Renderer.symbol(Harbours.Dolphin); 880 break; 881 case MOR_DDPN: 882 Renderer.symbol(Harbours.DeviationDolphin); 883 break; 884 case MOR_BLRD: 885 case MOR_POST: 886 Renderer.symbol(Harbours.Bollard); 887 break; 888 case MOR_BUOY: 889 BoySHP shape = (BoySHP) getAttEnum(feature.type, Att.BOYSHP); 890 if (shape == BoySHP.BOY_UNKN) { 891 shape = BoySHP.BOY_SPHR; 892 } 893 Renderer.symbol(Buoys.Shapes.get(shape), getScheme(feature.type)); 894 Renderer.symbol(Topmarks.TopMooring, Topmarks.BuoyDeltas.get(shape)); 895 break; 896 default: 897 break; 898 } 899 Signals.addSignals(); 900 } 878 901 } 879 902 … … 902 925 int n = objs.size(); 903 926 if (n > 5) { 904 Renderer.symbol( feature,Notices.Notice, new Delta(Handle.CC, AffineTransform.getTranslateInstance(dx, dy)));927 Renderer.symbol(Notices.Notice, new Delta(Handle.CC, AffineTransform.getTranslateInstance(dx, dy))); 905 928 } else { 906 929 int i = 0; … … 937 960 break; 938 961 } 939 if (h != null) Renderer.symbol( feature,sym, new Delta(h, AffineTransform.getTranslateInstance(dx, dy)));962 if (h != null) Renderer.symbol(sym, new Delta(h, AffineTransform.getTranslateInstance(dx, dy))); 940 963 i++; 941 964 } … … 946 969 private static void obstructions() { 947 970 if ((Renderer.zoom >= 12) && (feature.type == Obj.OBSTRN)) { 948 switch ((CatOBS) getAttEnum(feature , feature.type, 0, Att.CATOBS)) {971 switch ((CatOBS) getAttEnum(feature.type, Att.CATOBS)) { 949 972 case OBS_BOOM: 950 Renderer.lineVector( feature,new LineStyle(Color.black, 5, new float[] { 20, 20 }, null));973 Renderer.lineVector(new LineStyle(Color.black, 5, new float[] { 20, 20 }, null)); 951 974 if (Renderer.zoom >= 15) { 952 Renderer.lineText( feature,"Boom", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20);975 Renderer.lineText("Boom", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20); 953 976 } 954 977 default: … … 957 980 } 958 981 if ((Renderer.zoom >= 14) && (feature.type == Obj.UWTROC)) { 959 switch ((WatLEV) getAttEnum(feature , feature.type, 0, Att.WATLEV)) {982 switch ((WatLEV) getAttEnum(feature.type, Att.WATLEV)) { 960 983 case LEV_CVRS: 961 Renderer.symbol( feature,Areas.RockC);984 Renderer.symbol(Areas.RockC); 962 985 break; 963 986 case LEV_AWSH: 964 Renderer.symbol( feature,Areas.RockA);987 Renderer.symbol(Areas.RockA); 965 988 break; 966 989 default: 967 Renderer.symbol( feature,Areas.Rock);990 Renderer.symbol(Areas.Rock); 968 991 } 969 992 } else { 970 Renderer.symbol( feature,Areas.Rock);993 Renderer.symbol(Areas.Rock); 971 994 } 972 995 } … … 975 998 if ((Renderer.zoom >= 16) && (feature.geom.length < 2)) { 976 999 if (feature.type == Obj.PIPSOL) { 977 Renderer.lineSymbols( feature,Areas.Pipeline, 1.0, null, null, 0, Symbols.Mline);1000 Renderer.lineSymbols(Areas.Pipeline, 1.0, null, null, 0, Symbols.Mline); 978 1001 } else if (feature.type == Obj.PIPOHD) { 979 Renderer.lineVector( feature,new LineStyle(Color.black, 8));1002 Renderer.lineVector(new LineStyle(Color.black, 8)); 980 1003 AttMap atts = feature.atts; 981 1004 double verclr = 0; … … 987 1010 } 988 1011 if (verclr > 0) { 989 Renderer.labelText( feature,String.valueOf(verclr), new Font("Arial", Font.PLAIN, 50), Color.black, LabelStyle.VCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25)));1012 Renderer.labelText(String.valueOf(verclr), new Font("Arial", Font.PLAIN, 50), Color.black, LabelStyle.VCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25))); 990 1013 } 991 1014 } … … 996 1019 @SuppressWarnings("unchecked") 997 1020 private static void platforms() { 998 ArrayList<CatOFP> cats = (ArrayList<CatOFP>) getAttList( feature, Obj.OFSPLF, 0, Att.CATOFP);1021 ArrayList<CatOFP> cats = (ArrayList<CatOFP>) getAttList(Obj.OFSPLF, Att.CATOFP); 999 1022 if ((CatOFP) cats.get(0) == CatOFP.OFP_FPSO) 1000 Renderer.symbol( feature,Buoys.Storage);1023 Renderer.symbol(Buoys.Storage); 1001 1024 else 1002 Renderer.symbol( feature,Landmarks.Platform);1003 addName( feature,15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50)));1004 Signals.addSignals( feature);1025 Renderer.symbol(Landmarks.Platform); 1026 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50))); 1027 Signals.addSignals(); 1005 1028 } 1006 1029 … … 1008 1031 if (Renderer.zoom >= 14) { 1009 1032 if (feature.type == Obj.CRANES) { 1010 if ((CatCRN) getAttEnum(feature , feature.type, 0, Att.CATCRN) == CatCRN.CRN_CONT)1011 Renderer.symbol( feature,Harbours.ContainerCrane);1033 if ((CatCRN) getAttEnum(feature.type, Att.CATCRN) == CatCRN.CRN_CONT) 1034 Renderer.symbol(Harbours.ContainerCrane); 1012 1035 else 1013 Renderer.symbol( feature,Harbours.PortCrane);1036 Renderer.symbol(Harbours.PortCrane); 1014 1037 } else if (feature.type == Obj.HULKES) { 1015 Renderer.lineVector( feature,new LineStyle(Color.black, 4, null, new Color(0xffe000)));1016 addName( feature,15, new Font("Arial", Font.BOLD, 40));1038 Renderer.lineVector(new LineStyle(Color.black, 4, null, new Color(0xffe000))); 1039 addName(15, new Font("Arial", Font.BOLD, 40)); 1017 1040 } 1018 1041 } … … 1025 1048 case TSSRON: 1026 1049 if (Renderer.zoom <= 15) 1027 Renderer.lineVector( feature, new LineStyle(Symbols.Mline));1050 Renderer.lineVector(new LineStyle(Symbols.Mtss)); 1028 1051 else 1029 Renderer.lineVector( feature, new LineStyle(Symbols.Mline, 20, null, null));1030 addName( feature,10, new Font("Arial", Font.BOLD, 150), Symbols.Mline);1052 Renderer.lineVector(new LineStyle(Symbols.Mtss, 20, null, null)); 1053 addName(10, new Font("Arial", Font.BOLD, 150), Symbols.Mline); 1031 1054 break; 1032 1055 case TSELNE: 1033 Renderer.lineVector( feature, new LineStyle(Symbols.Mline, 20, null, null));1056 Renderer.lineVector(new LineStyle(Symbols.Mtss, 20, null, null)); 1034 1057 break; 1035 1058 case TSSLPT: 1036 Renderer.lineSymbols( feature, Areas.LaneArrow, 0.5, null, null, 0, Symbols.Mline);1059 Renderer.lineSymbols(Areas.LaneArrow, 0.5, null, null, 0, Symbols.Mtss); 1037 1060 break; 1038 1061 case TSSBND: 1039 Renderer.lineVector( feature, new LineStyle(Symbols.Mline, 20, new float[] { 40, 40 }, null));1062 Renderer.lineVector(new LineStyle(Symbols.Mtss, 20, new float[] { 40, 40 }, null)); 1040 1063 break; 1041 1064 case ISTZNE: 1042 Renderer.lineSymbols( feature, Areas.Restricted, 1.0, null, null, 0, Symbols.Mline);1065 Renderer.lineSymbols(Areas.Restricted, 1.0, null, null, 0, Symbols.Mtss); 1043 1066 break; 1044 1067 default: … … 1049 1072 @SuppressWarnings("unchecked") 1050 1073 private static void shoreline() { 1051 CatSLC cat = (CatSLC) getAttEnum(feature , feature.type, 0, Att.CATSLC);1074 CatSLC cat = (CatSLC) getAttEnum(feature.type, Att.CATSLC); 1052 1075 if ((Renderer.context.ruleset() == RuleSet.ALL) || (Renderer.context.ruleset() == RuleSet.BASE)) { 1053 1076 if ((cat != CatSLC.SLC_SWAY) && (cat != CatSLC.SLC_TWAL)) { 1054 1077 if (Renderer.zoom >= 12) { 1055 Renderer.lineVector( feature,new LineStyle(Color.black, 10, Symbols.Yland));1078 Renderer.lineVector(new LineStyle(Color.black, 10, Symbols.Yland)); 1056 1079 } else { 1057 Renderer.lineVector( feature,new LineStyle(Symbols.Yland));1080 Renderer.lineVector(new LineStyle(Symbols.Yland)); 1058 1081 } 1059 1082 } … … 1063 1086 switch (cat) { 1064 1087 case SLC_TWAL: 1065 WatLEV lev = (WatLEV) getAttEnum(feature , feature.type, 0, Att.WATLEV);1088 WatLEV lev = (WatLEV) getAttEnum(feature.type, Att.WATLEV); 1066 1089 if (lev == WatLEV.LEV_CVRS) { 1067 Renderer.lineVector( feature,new LineStyle(Color.black, 10, new float[] { 40, 40 }, null));1090 Renderer.lineVector(new LineStyle(Color.black, 10, new float[] { 40, 40 }, null)); 1068 1091 if (Renderer.zoom >= 15) 1069 Renderer.lineText( feature,"(covers)", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, 80);1092 Renderer.lineText("(covers)", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, 80); 1070 1093 } else { 1071 Renderer.lineVector( feature,new LineStyle(Color.black, 10, null, null));1094 Renderer.lineVector(new LineStyle(Color.black, 10, null, null)); 1072 1095 } 1073 1096 if (Renderer.zoom >= 15) 1074 Renderer.lineText( feature,"Training Wall", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, -30);1097 Renderer.lineText("Training Wall", new Font("Arial", Font.PLAIN, 60), Color.black, 0.5, -30); 1075 1098 break; 1076 1099 case SLC_SWAY: 1077 Renderer.lineVector( feature,new LineStyle(Color.black, 2, null, new Color(0xffe000)));1100 Renderer.lineVector(new LineStyle(Color.black, 2, null, new Color(0xffe000))); 1078 1101 if ((Renderer.zoom >= 16) && feature.objs.containsKey(Obj.SMCFAC)) { 1079 1102 ArrayList<Symbol> symbols = new ArrayList<Symbol>(); 1080 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList( feature, Obj.SMCFAC, 0, Att.CATSCF);1103 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(Obj.SMCFAC, Att.CATSCF); 1081 1104 for (CatSCF scf : scfs) { 1082 1105 symbols.add(Facilities.Cats.get(scf)); 1083 1106 } 1084 Renderer.cluster( feature,symbols);1107 Renderer.cluster(symbols); 1085 1108 } 1086 1109 break; … … 1098 1121 switch (feature.type) { 1099 1122 case SISTAT: 1100 Renderer.symbol( feature,Harbours.SignalStation);1123 Renderer.symbol(Harbours.SignalStation); 1101 1124 str = "SS"; 1102 ArrayList<CatSIT> tcats = (ArrayList<CatSIT>) getAttList( feature, Obj.SISTAT, 0, Att.CATSIT);1125 ArrayList<CatSIT> tcats = (ArrayList<CatSIT>) getAttList(Obj.SISTAT, Att.CATSIT); 1103 1126 switch (tcats.get(0)) { 1104 1127 case SIT_IPT: … … 1122 1145 break; 1123 1146 case SISTAW: 1124 Renderer.symbol( feature,Harbours.SignalStation);1147 Renderer.symbol(Harbours.SignalStation); 1125 1148 str = "SS"; 1126 1149 str = "SS"; 1127 ArrayList<CatSIW> wcats = (ArrayList<CatSIW>) getAttList( feature, Obj.SISTAW, 0, Att.CATSIW);1150 ArrayList<CatSIW> wcats = (ArrayList<CatSIW>) getAttList(Obj.SISTAW, Att.CATSIW); 1128 1151 switch (wcats.get(0)) { 1129 1152 case SIW_STRM: … … 1163 1186 case RDOSTA: 1164 1187 case RTPBCN: 1165 Renderer.symbol(feature, Harbours.SignalStation); 1166 Renderer.symbol(feature, Beacons.RadarStation); 1188 Renderer.symbol(Harbours.SignalStation); 1189 Renderer.symbol(Beacons.RadarStation); 1190 break; 1191 case RADRFL: 1192 Renderer.symbol(Topmarks.RadarReflector); 1167 1193 break; 1168 1194 case RADSTA: 1169 Renderer.symbol( feature,Harbours.SignalStation);1170 Renderer.symbol( feature,Beacons.RadarStation);1171 Renderer.labelText( feature,"Ra", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -70)));1195 Renderer.symbol(Harbours.SignalStation); 1196 Renderer.symbol(Beacons.RadarStation); 1197 Renderer.labelText("Ra", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -70))); 1172 1198 break; 1173 1199 case PILBOP: 1174 Renderer.symbol( feature,Harbours.Pilot);1175 addName( feature,15, new Font("Arial", Font.BOLD, 40), Symbols.Msymb , new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, -40)));1176 CatPIL cat = (CatPIL) getAttEnum(feature , feature.type, 0, Att.CATPIL);1200 Renderer.symbol(Harbours.Pilot); 1201 addName(15, new Font("Arial", Font.BOLD, 40), Symbols.Msymb , new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, -40))); 1202 CatPIL cat = (CatPIL) getAttEnum(feature.type, Att.CATPIL); 1177 1203 if (cat == CatPIL.PIL_HELI) { 1178 Renderer.labelText( feature,"H", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0)));1204 Renderer.labelText("H", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0))); 1179 1205 } 1180 1206 break; 1181 1207 case CGUSTA: 1182 Renderer.symbol( feature,Harbours.SignalStation);1208 Renderer.symbol(Harbours.SignalStation); 1183 1209 str = "CG"; 1184 if (feature.objs.containsKey(Obj.RSCSTA)) Renderer.symbol( feature,Harbours.Rescue, new Delta(Handle.CC, AffineTransform.getTranslateInstance(130, 0)));1210 if (feature.objs.containsKey(Obj.RSCSTA)) Renderer.symbol(Harbours.Rescue, new Delta(Handle.CC, AffineTransform.getTranslateInstance(130, 0))); 1185 1211 break; 1186 1212 case RSCSTA: 1187 Renderer.symbol( feature,Harbours.Rescue);1213 Renderer.symbol(Harbours.Rescue); 1188 1214 break; 1189 1215 default: … … 1191 1217 } 1192 1218 if ((Renderer.zoom >= 15) && !str.isEmpty()) { 1193 Renderer.labelText( feature,str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.LC, AffineTransform.getTranslateInstance(40, 0)));1194 } 1195 Signals.addSignals( feature);1219 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.LC, AffineTransform.getTranslateInstance(40, 0))); 1220 } 1221 Signals.addSignals(); 1196 1222 } 1197 1223 } … … 1199 1225 private static void transits() { 1200 1226 if (Renderer.zoom >= 14) { 1201 if (feature.type == Obj.RECTRC) Renderer.lineVector ( feature,new LineStyle(Color.black, 10, null, null));1202 else if (feature.type == Obj.NAVLNE) Renderer.lineVector ( feature,new LineStyle(Color.black, 10, new float[] { 25, 25 }, null));1227 if (feature.type == Obj.RECTRC) Renderer.lineVector (new LineStyle(Color.black, 10, null, null)); 1228 else if (feature.type == Obj.NAVLNE) Renderer.lineVector (new LineStyle(Color.black, 10, new float[] { 25, 25 }, null)); 1203 1229 } 1204 1230 if (Renderer.zoom >= 15) { … … 1208 1234 str += name + " "; 1209 1235 Double ort; 1210 if ((ort = (Double) getAttVal(feature , feature.type, 0, Att.ORIENT)) != null) {1211 str += ort.toString() + "\u0152";1236 if ((ort = (Double) getAttVal(feature.type, Att.ORIENT)) != null) { 1237 str += df.format(ort) + "º"; 1212 1238 if (!str.isEmpty()) 1213 Renderer.lineText( feature,str, new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20);1239 Renderer.lineText(str, new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -20); 1214 1240 } 1215 1241 } … … 1217 1243 1218 1244 private static void waterways() { 1219 Renderer.lineVector( feature,new LineStyle(Symbols.Bwater, 20, (feature.geom.prim == Pflag.AREA) ? Symbols.Bwater : null));1245 Renderer.lineVector(new LineStyle(Symbols.Bwater, 20, (feature.geom.prim == Pflag.AREA) ? Symbols.Bwater : null)); 1220 1246 } 1221 1247 1222 1248 private static void wrecks() { 1223 1249 if (Renderer.zoom >= 14) { 1224 switch ((CatWRK) getAttEnum(feature , feature.type, 0, Att.CATWRK)) {1250 switch ((CatWRK) getAttEnum(feature.type, Att.CATWRK)) { 1225 1251 case WRK_DNGR: 1226 1252 case WRK_MSTS: 1227 Renderer.symbol( feature,Areas.WreckD);1253 Renderer.symbol(Areas.WreckD); 1228 1254 break; 1229 1255 case WRK_HULS: 1230 Renderer.symbol( feature,Areas.WreckS);1256 Renderer.symbol(Areas.WreckS); 1231 1257 break; 1232 1258 default: 1233 Renderer.symbol( feature,Areas.WreckND);1259 Renderer.symbol(Areas.WreckND); 1234 1260 } 1235 1261 } -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r32088 r32090 84 84 } 85 85 86 public static void addSignals(Feature feature) {87 if (feature.objs.containsKey(Obj.FOGSIG)) fogSignals(feature);88 if (feature.objs.containsKey(Obj.RTPBCN)) radarStations(feature);89 if (feature.objs.containsKey(Obj.RADSTA)) radarStations(feature);90 if (feature.objs.containsKey(Obj.RDOSTA)) radioStations(feature);91 if (feature.objs.containsKey(Obj.LIGHTS)) lights(feature);92 }93 94 86 static final EnumMap<CatFOG, String> fogSignals = new EnumMap<CatFOG, String>(CatFOG.class); 95 87 static { … … 108 100 static final DecimalFormat df = new DecimalFormat("#.#"); 109 101 110 public static void fogSignals(Feature feature) { 111 Renderer.symbol(feature, Beacons.FogSignal); 112 AttMap atts = feature.objs.get(Obj.FOGSIG).get(0); 113 String str = ""; 114 if (atts.containsKey(Att.CATFOG)) { 115 str += fogSignals.get(((ArrayList<?>)(atts.get(Att.CATFOG).val)).get(0)); 116 } 117 if (atts.containsKey(Att.SIGGRP)) { 118 str += "(" + atts.get(Att.SIGGRP).val + ")"; 119 } else { 120 str += " "; 121 } 122 if (atts.containsKey(Att.SIGPER)) { 123 str += df.format(atts.get(Att.SIGPER).val) + "s"; 124 } 125 if (atts.containsKey(Att.VALMXR)) { 126 str += df.format(atts.get(Att.VALMXR).val) + "M"; 127 } 128 if ((Renderer.zoom >= 15) && !str.isEmpty()) { 129 Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40),Color.black, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-60, -30))); 130 } 131 } 132 133 public static void radarStations(Feature feature) { 134 Renderer.symbol(feature, Beacons.RadarStation); 135 String bstr = ""; 136 CatRTB cat = (CatRTB) Rules.getAttEnum(feature, Obj.RTPBCN, 0, Att.CATRTB); 137 String wal = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.RADWAL); 138 switch (cat) { 139 case RTB_RAMK: 140 bstr += " Ramark"; 141 break; 142 case RTB_RACN: 143 bstr += " Racon"; 144 String astr = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.SIGGRP); 145 if (!astr.isEmpty()) { 146 bstr += "(" + astr + ")"; 147 } 148 Double per = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.SIGPER); 149 Double mxr = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.VALMXR); 150 if ((per != null) || (mxr != null)) { 151 bstr += (astr.isEmpty() ? " " : ""); 152 if (per != null) bstr += (per != 0) ? per.toString() + "s" : ""; 153 if (mxr != null) bstr += (mxr != 0) ? mxr.toString() + "M" : ""; 154 } 155 break; 156 default: 157 break; 158 } 159 if (!wal.isEmpty()) { 160 switch (wal) { 161 case "0.03-X": 162 bstr += "(3cm)"; 102 public static void addSignals() { 103 if (Rules.feature.objs.containsKey(Obj.RADRFL)) reflectors(); 104 if (Rules.feature.objs.containsKey(Obj.FOGSIG)) fogSignals(); 105 if (Rules.feature.objs.containsKey(Obj.RTPBCN)) radarStations(); 106 if (Rules.feature.objs.containsKey(Obj.RADSTA)) radarStations(); 107 if (Rules.feature.objs.containsKey(Obj.RDOSTA)) radioStations(); 108 if (Rules.feature.objs.containsKey(Obj.LIGHTS)) lights(); 109 } 110 111 public static void reflectors() { 112 if (Renderer.zoom >= 14) { 113 switch (Rules.feature.type) { 114 case BCNLAT: 115 case BCNCAR: 116 case BCNISD: 117 case BCNSAW: 118 case BCNSPP: 119 case LITFLT: 120 case LITVES: 121 case BOYINB: 122 if ((Rules.feature.objs.containsKey(Obj.TOPMAR)) || (Rules.feature.objs.containsKey(Obj.DAYMAR))) { 123 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -140))); 124 } else { 125 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -80))); 126 } 163 127 break; 164 case "0.10-S": 165 bstr += "(10cm)"; 128 case LITMAJ: 129 case LITMIN: 130 if ((Rules.feature.objs.containsKey(Obj.TOPMAR)) || (Rules.feature.objs.containsKey(Obj.DAYMAR))) { 131 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -90))); 132 } else { 133 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -30))); 134 } 166 135 break; 167 } 168 } 169 if ((Renderer.zoom >= 15) && !bstr.isEmpty()) { 170 Renderer.labelText(feature, bstr, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -70))); 171 } 172 } 173 174 @SuppressWarnings("unchecked") 175 public static void radioStations(Feature feature) { 176 ArrayList<CatROS> cats = (ArrayList<CatROS>)Rules.getAttList(feature, Obj.RDOSTA, 0, Att.CATROS); 177 boolean vais = false; 178 String bstr = ""; 179 for (CatROS ros : cats) { 180 switch (ros) { 181 case ROS_OMNI: 182 bstr += " RC"; 183 break; 184 case ROS_DIRL: 185 bstr += " RD"; 186 break; 187 case ROS_ROTP: 188 bstr += " RW"; 189 break; 190 case ROS_CNSL: 191 bstr += " Consol"; 192 break; 193 case ROS_RDF: 194 bstr += " RG"; 195 break; 196 case ROS_QTA: 197 bstr += " R"; 198 break; 199 case ROS_AERO: 200 bstr += " AeroRC"; 201 break; 202 case ROS_DECA: 203 bstr += " Decca"; 204 break; 205 case ROS_LORN: 206 bstr += " Loran"; 207 break; 208 case ROS_DGPS: 209 bstr += " DGPS"; 210 break; 211 case ROS_TORN: 212 bstr += " Toran"; 213 break; 214 case ROS_OMGA: 215 bstr += " Omega"; 216 break; 217 case ROS_SYLD: 218 bstr += " Syledis"; 219 break; 220 case ROS_CHKA: 221 bstr += " Chiaka"; 222 break; 223 case ROS_PCOM: 224 case ROS_COMB: 225 case ROS_FACS: 226 case ROS_TIME: 227 break; 228 case ROS_PAIS: 229 case ROS_SAIS: 230 bstr += " AIS"; 231 break; 232 case ROS_VAIS: 233 vais = true; 234 break; 235 case ROS_VANC: 236 vais = true; 237 Renderer.symbol(feature, Topmarks.TopNorth, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 238 break; 239 case ROS_VASC: 240 vais = true; 241 Renderer.symbol(feature, Topmarks.TopSouth, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 242 break; 243 case ROS_VAEC: 244 vais = true; 245 Renderer.symbol(feature, Topmarks.TopEast, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 246 break; 247 case ROS_VAWC: 248 vais = true; 249 Renderer.symbol(feature, Topmarks.TopWest, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 250 break; 251 case ROS_VAPL: 252 vais = true; 253 Renderer.symbol(feature, Topmarks.TopCan, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 254 break; 255 case ROS_VASL: 256 vais = true; 257 Renderer.symbol(feature, Topmarks.TopCone, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 258 break; 259 case ROS_VAID: 260 vais = true; 261 Renderer.symbol(feature, Topmarks.TopIsol, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 262 break; 263 case ROS_VASW: 264 vais = true; 265 Renderer.symbol(feature, Topmarks.TopSphere, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 266 break; 267 case ROS_VASP: 268 vais = true; 269 Renderer.symbol(feature, Topmarks.TopX, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 270 break; 271 case ROS_VAWK: 272 vais = true; 273 Renderer.symbol(feature, Topmarks.TopCross, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 136 case BOYLAT: 137 case BOYCAR: 138 case BOYISD: 139 case BOYSAW: 140 case BOYSPP: 141 if ((Rules.feature.objs.containsKey(Obj.TOPMAR)) || (Rules.feature.objs.containsKey(Obj.DAYMAR))) { 142 if (Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR) || Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR)) { 143 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(45, -140))); 144 } else { 145 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(25, -80))); 146 } 147 } else { 148 if (Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR) || Rules.testAttribute(Rules.feature.type, Att.BOYSHP, BoySHP.BOY_PILR)) { 149 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(30, -100))); 150 } else { 151 Renderer.symbol(Topmarks.RadarReflector, new Delta(Handle.BC, AffineTransform.getTranslateInstance(10, -50))); 152 } 153 } 274 154 break; 275 155 default: … … 277 157 } 278 158 } 279 if (!vais) { 280 Renderer.symbol(feature, Beacons.RadarStation); 159 } 160 161 public static void fogSignals() { 162 if (Renderer.zoom >= 11) 163 Renderer.symbol(Beacons.FogSignal); 164 if (Renderer.zoom >= 15) { 165 AttMap atts = Rules.feature.objs.get(Obj.FOGSIG).get(0); 166 String str = ""; 167 if (atts.containsKey(Att.CATFOG)) { 168 str += fogSignals.get(((ArrayList<?>) (atts.get(Att.CATFOG).val)).get(0)); 169 } 170 if (atts.containsKey(Att.SIGGRP)) { 171 str += "(" + atts.get(Att.SIGGRP).val + ")"; 172 } else { 173 str += " "; 174 } 175 if (atts.containsKey(Att.SIGPER)) { 176 str += df.format(atts.get(Att.SIGPER).val) + "s"; 177 } 178 if (atts.containsKey(Att.VALMXR)) { 179 str += df.format(atts.get(Att.VALMXR).val) + "M"; 180 } 181 if (!str.isEmpty()) { 182 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-60, -30))); 183 } 184 } 185 } 186 187 public static void radarStations() { 188 if (Renderer.zoom >= 11) 189 Renderer.symbol(Beacons.RadarStation); 190 if (Renderer.zoom >= 15) { 191 String bstr = ""; 192 CatRTB cat = (CatRTB) Rules.getAttEnum(Obj.RTPBCN, Att.CATRTB); 193 String wal = Rules.getAttStr(Obj.RTPBCN, Att.RADWAL); 194 switch (cat) { 195 case RTB_RAMK: 196 bstr += " Ramark"; 197 break; 198 case RTB_RACN: 199 bstr += " Racon"; 200 String astr = Rules.getAttStr(Obj.RTPBCN, Att.SIGGRP); 201 if (!astr.isEmpty()) { 202 bstr += "(" + astr + ")"; 203 } 204 Double per = (Double) Rules.getAttVal(Obj.RTPBCN, Att.SIGPER); 205 Double mxr = (Double) Rules.getAttVal(Obj.RTPBCN, Att.VALMXR); 206 if ((per != null) || (mxr != null)) { 207 bstr += (astr.isEmpty() ? " " : ""); 208 if (per != null) 209 bstr += (per != 0) ? per.toString() + "s" : ""; 210 if (mxr != null) 211 bstr += (mxr != 0) ? mxr.toString() + "M" : ""; 212 } 213 break; 214 default: 215 break; 216 } 217 if (!wal.isEmpty()) { 218 switch (wal) { 219 case "0.03-X": 220 bstr += "(3cm)"; 221 break; 222 case "0.10-S": 223 bstr += "(10cm)"; 224 break; 225 } 226 } 227 if (!bstr.isEmpty()) { 228 Renderer.labelText(bstr, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -70))); 229 } 230 } 231 } 232 233 @SuppressWarnings("unchecked") 234 public static void radioStations() { 235 boolean vais = false; 236 String bstr = ""; 237 if (Renderer.zoom >= 11) { 238 ArrayList<CatROS> cats = (ArrayList<CatROS>) Rules.getAttList(Obj.RDOSTA, Att.CATROS); 239 for (CatROS ros : cats) { 240 switch (ros) { 241 case ROS_OMNI: 242 bstr += " RC"; 243 break; 244 case ROS_DIRL: 245 bstr += " RD"; 246 break; 247 case ROS_ROTP: 248 bstr += " RW"; 249 break; 250 case ROS_CNSL: 251 bstr += " Consol"; 252 break; 253 case ROS_RDF: 254 bstr += " RG"; 255 break; 256 case ROS_QTA: 257 bstr += " R"; 258 break; 259 case ROS_AERO: 260 bstr += " AeroRC"; 261 break; 262 case ROS_DECA: 263 bstr += " Decca"; 264 break; 265 case ROS_LORN: 266 bstr += " Loran"; 267 break; 268 case ROS_DGPS: 269 bstr += " DGPS"; 270 break; 271 case ROS_TORN: 272 bstr += " Toran"; 273 break; 274 case ROS_OMGA: 275 bstr += " Omega"; 276 break; 277 case ROS_SYLD: 278 bstr += " Syledis"; 279 break; 280 case ROS_CHKA: 281 bstr += " Chiaka"; 282 break; 283 case ROS_PCOM: 284 case ROS_COMB: 285 case ROS_FACS: 286 case ROS_TIME: 287 break; 288 case ROS_PAIS: 289 case ROS_SAIS: 290 bstr += " AIS"; 291 break; 292 case ROS_VAIS: 293 vais = true; 294 break; 295 case ROS_VANC: 296 vais = true; 297 Renderer.symbol(Topmarks.TopNorth, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 298 break; 299 case ROS_VASC: 300 vais = true; 301 Renderer.symbol(Topmarks.TopSouth, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 302 break; 303 case ROS_VAEC: 304 vais = true; 305 Renderer.symbol(Topmarks.TopEast, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 306 break; 307 case ROS_VAWC: 308 vais = true; 309 Renderer.symbol(Topmarks.TopWest, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 310 break; 311 case ROS_VAPL: 312 vais = true; 313 Renderer.symbol(Topmarks.TopCan, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 314 break; 315 case ROS_VASL: 316 vais = true; 317 Renderer.symbol(Topmarks.TopCone, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 318 break; 319 case ROS_VAID: 320 vais = true; 321 Renderer.symbol(Topmarks.TopIsol, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 322 break; 323 case ROS_VASW: 324 vais = true; 325 Renderer.symbol(Topmarks.TopSphere, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 326 break; 327 case ROS_VASP: 328 vais = true; 329 Renderer.symbol(Topmarks.TopX, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 330 break; 331 case ROS_VAWK: 332 vais = true; 333 Renderer.symbol(Topmarks.TopCross, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, -25))); 334 break; 335 default: 336 break; 337 } 338 } 339 if (!vais) { 340 Renderer.symbol(Beacons.RadarStation); 341 } 281 342 } 282 343 if (Renderer.zoom >= 15) { 283 344 if (vais) { 284 Renderer.labelText( feature,"V-AIS", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70)));345 Renderer.labelText("V-AIS", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); 285 346 } 286 347 if (!bstr.isEmpty()) { 287 Renderer.labelText( feature,bstr, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -110)));348 Renderer.labelText(bstr, new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.TR, AffineTransform.getTranslateInstance(-30, -110))); 288 349 } 289 350 } … … 301 362 302 363 @SuppressWarnings("unchecked") 303 public static void lights( Feature feature) {364 public static void lights() { 304 365 Enum<ColCOL> col = null; 305 366 Enum<ColCOL> tcol = null; 306 ObjTab lights = feature.objs.get(Obj.LIGHTS);367 ObjTab lights = Rules.feature.objs.get(Obj.LIGHTS); 307 368 for (AttMap atts : lights.values()) { 308 369 if (atts.containsKey(Att.COLOUR)) { … … 322 383 } 323 384 } 324 Renderer.symbol( feature,Beacons.LightFlare, new Scheme(LightColours.get(col)), new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120))));385 Renderer.symbol(Beacons.LightFlare, new Scheme(LightColours.get(col)), new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120)))); 325 386 String str = ""; 326 387 if (lights.get(1) != null) { … … 425 486 } 426 487 if ((s1 <= 360) && (s2 <= 360) && (s1 != s2)) 427 Renderer.lightSector( feature,LightColours.get(col1), LightColours.get(col2), radius, s1, s2, dir, (Renderer.zoom >= 15) ? str : "");488 Renderer.lightSector(LightColours.get(col1), LightColours.get(col2), radius, s1, s2, dir, (Renderer.zoom >= 15) ? str : ""); 428 489 } 429 490 if (Renderer.zoom >= 15) { … … 432 493 LitCHR chr; 433 494 ColCOL col; 434 ColCOL alt;435 495 String grp; 436 496 double per; … … 468 528 ArrayList<ColCOL> cols = (ArrayList<ColCOL>) (atts.containsKey(Att.COLOUR) ? atts.get(Att.COLOUR).val : new ArrayList<>()); 469 529 sect.col = cols.size() > 0 ? cols.get(0) : ColCOL.COL_UNK; 470 sect.alt = cols.size() > 1 ? cols.get(1) : ColCOL.COL_UNK;471 530 if ((sect.chr != LitCHR.CHR_UNKN) && (sect.col != null)) 472 531 litatts.add(sect); … … 552 611 if (colrng.get(0).rng > 0) 553 612 str += df.format(colrng.get(0).rng) + ((colrng.size() > 1) ? ((colrng.size() > 2) ? ("-" + df.format(colrng.get(colrng.size() - 1).rng)) : ("/" + df.format(colrng.get(1).rng))) : "") + "M"; 554 Renderer.labelText( feature,str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TL, AffineTransform.getTranslateInstance(60, y)));613 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TL, AffineTransform.getTranslateInstance(60, y))); 555 614 y += 40; 556 615 str = ""; … … 609 668 str += (cats.contains(CatLIT.LIT_UPPR)) ? "(Upper)" : ""; 610 669 str += (cats.contains(CatLIT.LIT_LOWR)) ? "(Lower)" : ""; 611 Renderer.labelText( feature,str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TL, AffineTransform.getTranslateInstance(60, -30)));670 Renderer.labelText(str, new Font("Arial", Font.PLAIN, 40), Color.black, new Delta(Handle.TL, AffineTransform.getTranslateInstance(60, -30))); 612 671 } 613 672 } -
applications/editors/josm/plugins/seachart/src/s57/S57map.java
r32082 r32090 466 466 } 467 467 } else { 468 Att att = S57att.enumAttribute(subkeys[1], Obj.UNKOBJ); 469 if (att != Att.UNKATT) { 470 AttVal<?> attval = S57val.convertValue(val, att); 471 if (attval.val != null) 472 feature.atts.put(att, attval); 468 if (obj != Obj.UNKOBJ) { 469 if (val.equals("yes")) { 470 ObjTab objs = feature.objs.get(obj); 471 if (objs == null) { 472 objs = new ObjTab(); 473 feature.objs.put(obj, objs); 474 } 475 } 476 } else { 477 Att att = S57att.enumAttribute(subkeys[1], Obj.UNKOBJ); 478 if (att != Att.UNKATT) { 479 AttVal<?> attval = S57val.convertValue(val, att); 480 if (attval.val != null) 481 feature.atts.put(att, attval); 482 } 473 483 } 474 484 } -
applications/editors/josm/plugins/seachart/src/symbols/Symbols.java
r31063 r32090 25 25 public static final Color Mline = new Color(0x9a6078); 26 26 public static final Color Msymb = new Color(0xa30075); 27 public static final Color Mtss = new Color(0x80c480ff, true); 27 28 28 29 public enum Form { -
applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java
r30894 r32090 20 20 public class Topmarks { 21 21 22 public static final Symbol RadarReflector = new Symbol(); 23 static { 24 RadarReflector.add(new Instr(Form.BBOX, new Rectangle2D.Double(-50,-40,100,40))); 25 RadarReflector.add(new Instr(Form.STRK, new BasicStroke(6, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 26 RadarReflector.add(new Instr(Form.FILL, Color.black)); 27 Path2D.Double p = new Path2D.Double(); p.moveTo(-30,-3); p.quadTo(0, -40, 30, -3); p.moveTo(0,-20); p.lineTo(0,-37); 28 p.moveTo(-30, -3); p.lineTo(-43,-14); p.moveTo(30, -3); p.lineTo(44,-14); p.moveTo(-15, -14); p.lineTo(-25,-30); p.moveTo(15, -14); p.lineTo(25,-30); 29 RadarReflector.add(new Instr(Form.PLIN, p)); 30 } 22 31 public static final Symbol TopBesom = new Symbol(); 23 32 static {
Note:
See TracChangeset
for help on using the changeset viewer.