Ignore:
Timestamp:
2014-04-09T19:28:00+02:00 (11 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

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

    r30339 r30388  
    335335                        BcnSHP shape = (BcnSHP) getAttVal(feature, feature.type, 0,
    336336                                        Att.BCNSHP);
    337                         if (((shape == BcnSHP.BCN_PRCH) || (shape == BcnSHP.BCN_WTHY))
    338                                         && (feature.type == Obj.BCNLAT)) {
    339                                 CatLAM cat = (CatLAM) getAttVal(feature, feature.type, 0,
    340                                                 Att.CATLAM);
     337                        if ((shape == BcnSHP.BCN_WTHY) && (feature.type == Obj.BCNLAT)) {
     338                                CatLAM cat = (CatLAM) getAttVal(feature, feature.type, 0, Att.CATLAM);
    341339                                switch (cat) {
    342340                                case LAM_PORT:
    343                                         if (shape == BcnSHP.BCN_PRCH)
    344                                                 Renderer.symbol(feature, Beacons.PerchPort);
    345                                         else
    346                                                 Renderer.symbol(feature, Beacons.WithyPort);
     341                                        Renderer.symbol(feature, Beacons.WithyPort);
    347342                                        break;
    348343                                case LAM_STBD:
    349                                         if (shape == BcnSHP.BCN_PRCH)
    350                                                 Renderer.symbol(feature, Beacons.PerchStarboard);
    351                                         else
    352                                                 Renderer.symbol(feature, Beacons.WithyStarboard);
     344                                        Renderer.symbol(feature, Beacons.WithyStarboard);
    353345                                        break;
    354346                                default:
    355                                         Renderer.symbol(feature, Beacons.Stake,
    356                                                         getScheme(feature, feature.type));
     347                                        Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type));
     348                                }
     349                        } else if ((shape == BcnSHP.BCN_PRCH) && (feature.type == Obj.BCNLAT) && !(feature.objs.containsKey(Obj.TOPMAR))) {
     350                                CatLAM cat = (CatLAM) getAttVal(feature, feature.type, 0, Att.CATLAM);
     351                                switch (cat) {
     352                                case LAM_PORT:
     353                                        Renderer.symbol(feature, Beacons.PerchPort);
     354                                        break;
     355                                case LAM_STBD:
     356                                        Renderer.symbol(feature, Beacons.PerchStarboard);
     357                                        break;
     358                                default:
     359                                        Renderer.symbol(feature, Beacons.Stake, getScheme(feature, feature.type));
    357360                                }
    358361                        } else {
     
    665668                default:
    666669                        break;
     670                }
     671                if (feature.objs.containsKey(Obj.TOPMAR)) {
     672                        Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val);
     673                        if (topmark != null)
     674                                Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.TOPMAR), Topmarks.LightDelta);
     675                } else  if (feature.objs.containsKey(Obj.DAYMAR)) {
     676                        Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val);
     677                        if (topmark != null)
     678                                Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.DAYMAR), Topmarks.LightDelta);
    667679                }
    668680                Signals.addSignals(feature);
Note: See TracChangeset for help on using the changeset viewer.