Changeset 33956 in osm


Ignore:
Timestamp:
2017-12-18T21:59:09+01:00 (7 years ago)
Author:
malcolmh
Message:

illuminated beacons

Location:
applications/editors/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/src/render/Rules.java

    r33949 r33956  
    527527        @SuppressWarnings("unchecked")
    528528        private static void beacons() {
    529                 if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BCNLAT) || (feature.type == Obj.BCNCAR))) || ((Renderer.zoom >= 11) && ((feature.type == Obj.BCNSAW) || hasObject(Obj.RTPBCN)))) {
     529                if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BCNLAT) || (feature.type == Obj.BCNCAR)))
     530                                || ((Renderer.zoom >= 11) && ((feature.type == Obj.BCNSAW) || hasObject(Obj.RTPBCN)))) {
     531                        if (testAttribute(feature.type, Att.STATUS, StsSTS.STS_ILLD)) {
     532                                Renderer.symbol(Beacons.Floodlight);
     533                        }
    530534                        BcnSHP shape = (BcnSHP) getAttEnum(feature.type, Att.BCNSHP);
    531535                        if (shape == BcnSHP.BCN_UNKN)
     
    557561                                if (feature.objs.containsKey(Obj.TOPMAR)) {
    558562                                        AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0);
    559                                         if (topmap.containsKey(Att.STATUS) && (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD))) {
     563                                        if (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD)) {
    560564                                                Renderer.symbol(Beacons.Floodlight);
    561565                                        }
    562566                                        if (topmap.containsKey(Att.TOPSHP)) {
    563                                                 if (topmap.containsKey(Att.ORIENT)) {
    564 //                                                      tr.rotate(Math.toRadians((Double)topmap.get(Att.ORIENT).val));
    565                                                 }
    566567                                                Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BeaconDelta);
    567568                                        }
     
    873874                case BUISGL:
    874875                        if (Renderer.zoom >= 16) {
    875                                 if (hasAttribute(Obj.BUISGL, Att.STATUS) && (testAttribute(Obj.BUISGL, Att.STATUS, StsSTS.STS_ILLD))) {
     876                                if (testAttribute(Obj.BUISGL, Att.STATUS, StsSTS.STS_ILLD)) {
    876877                                        Renderer.symbol(Beacons.Floodlight);
    877878                                }
     
    956957                        switch (feature.type) {
    957958                        case LNDMRK:
    958                                 if (hasAttribute(Obj.LNDMRK, Att.STATUS) && (testAttribute(Obj.LNDMRK, Att.STATUS, StsSTS.STS_ILLD))) {
     959                                if (testAttribute(Obj.LNDMRK, Att.STATUS, StsSTS.STS_ILLD)) {
    959960                                        Renderer.symbol(Beacons.Floodlight);
    960961                                }
     
    998999                case PILPNT:
    9991000                        if (Renderer.zoom >= 14) {
    1000                                 if (hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))) {
     1001                                if (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL)) {
    10011002                                        Renderer.symbol(Beacons.Floodlight, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180))));
    10021003                                        Renderer.symbol(Harbours.SignalStation);
     
    10121013                if (ok) {
    10131014                        if (feature.objs.containsKey(Obj.TOPMAR)) {
    1014                                 if (hasAttribute(Obj.TOPMAR, Att.STATUS) && (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD))) {
     1015                                if (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD)) {
    10151016                                        Renderer.symbol(Beacons.Floodlight);
    10161017                                }
     
    12161217                else
    12171218                        Renderer.symbol(Landmarks.Platform);
     1219                if (testAttribute(feature.type, Att.STATUS, StsSTS.STS_ILLD)) {
     1220                        Renderer.symbol(Beacons.Floodlight);
     1221                }
    12181222                addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(20, -50)));
    12191223                Signals.addSignals();
     
    12351239                default:
    12361240                        if (Renderer.zoom >= 14) {
     1241                                if (testAttribute(feature.type, Att.STATUS, StsSTS.STS_ILLD)) {
     1242                                        Renderer.symbol(Beacons.Floodlight);
     1243                                }
    12371244                                if (feature.objs.containsKey(Obj.LIGHTS))
    12381245                                        lights();
  • applications/editors/josm/plugins/seachart/src/render/Signals.java

    r33936 r33956  
    377377    @SuppressWarnings("unchecked")
    378378    public static void lights() {
     379      if ((hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))))
     380        return;
    379381        Enum<ColCOL> col = null;
    380382        Enum<ColCOL> tcol = null;
     
    397399            }
    398400        }
    399         if (!(hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL)))) {
    400                 Renderer.symbol(Beacons.LightFlare, new Scheme(LightColours.get(col)),
    401                 new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120))));
    402         }
     401        Renderer.symbol(Beacons.LightFlare, new Scheme(LightColours.get(col)),
     402                        new Delta(Handle.BC, AffineTransform.getRotateInstance(Math.toRadians(120))));
    403403        if (Renderer.zoom >= 12) {
    404404            String str = "";
     
    698698    }
    699699}
     700
  • applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java

    r33949 r33956  
    4242    public static final Symbol TopArrow = new Symbol();
    4343    static {
    44         TopArrow.add(new Instr(Form.BBOX, new Rectangle2D.Double(-20, -80, 40, 80)));
     44        TopArrow.add(new Instr(Form.BBOX, new Rectangle2D.Double(-40, -80, 80, 80)));
    4545        TopArrow.add(new Instr(Form.STRK, new BasicStroke(4, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    4646        TopArrow.add(new Instr(Form.FILL, Color.black));
    47       Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(0, -30); p.lineTo(-25, -30); p.lineTo(-30, -20); p.lineTo(-25, -10); p.lineTo(0, -10);
     47      Path2D.Double p = new Path2D.Double(); p.moveTo(0, 0); p.lineTo(0, -30); p.lineTo(-20, -30); p.lineTo(-30, -20); p.lineTo(-20, -10); p.lineTo(0, -10);
    4848        TopArrow.add(new Instr(Form.PLIN, p));
    4949    }
Note: See TracChangeset for help on using the changeset viewer.