Changeset 34652 in osm for applications/editors/josm/plugins/seachart/src/render/Rules.java
- Timestamp:
- 2018-09-15T13:50:24+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Rules.java
r33995 r34652 546 546 Renderer.symbol(Beacons.Stake, getScheme(feature.type)); 547 547 } 548 } else if ( (shape == BcnSHP.BCN_PRCH) && (feature.type == Obj.BCNLAT) && !(feature.objs.containsKey(Obj.TOPMAR))) {548 } else if (shape == BcnSHP.BCN_PRCH && feature.type == Obj.BCNLAT && !feature.objs.containsKey(Obj.TOPMAR)) { 549 549 switch ((CatLAM) getAttEnum(feature.type, Att.CATLAM)) { 550 550 case LAM_PORT: … … 565 565 } 566 566 if (topmap.containsKey(Att.TOPSHP)) { 567 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BeaconDelta);567 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.TOPMAR), Topmarks.BeaconDelta); 568 568 } 569 569 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 570 570 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 571 571 if (topmap.containsKey(Att.TOPSHP)) { 572 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.BeaconDelta);572 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.DAYMAR), Topmarks.BeaconDelta); 573 573 } 574 574 } … … 591 591 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 592 592 if (topmap.containsKey(Att.TOPSHP)) { 593 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.BuoyDeltas.get(shape));593 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.TOPMAR), Topmarks.BuoyDeltas.get(shape)); 594 594 } 595 595 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 596 596 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 597 597 if (topmap.containsKey(Att.TOPSHP)) { 598 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.BuoyDeltas.get(shape));598 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.DAYMAR), Topmarks.BuoyDeltas.get(shape)); 599 599 } 600 600 } … … 649 649 } else if (feature.type == Obj.CBLOHD) { 650 650 AttMap atts = feature.objs.get(Obj.CBLOHD).get(0); 651 if ( (atts != null) && (atts.containsKey(Att.CATCBL)) && (atts.get(Att.CATCBL).val == CatCBL.CBL_POWR)) {651 if (atts != null && atts.containsKey(Att.CATCBL) && atts.get(Att.CATCBL).val == CatCBL.CBL_POWR) { 652 652 Renderer.lineSymbols(Areas.CableDash, 0, Areas.CableDot, Areas.CableFlash, 2, Color.black); 653 653 } else { … … 724 724 if (Renderer.zoom >= 15) { 725 725 AttMap atts = getAtts(Obj.DISMAR, 0); 726 if ( (atts != null) && (atts.containsKey(Att.WTWDIS))) {726 if (atts != null && atts.containsKey(Att.WTWDIS)) { 727 727 Double dist = (Double) atts.get(Att.WTWDIS).val; 728 728 String str = ""; … … 777 777 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 778 778 if (topmap.containsKey(Att.TOPSHP)) { 779 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.FloatDelta);779 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.TOPMAR), Topmarks.FloatDelta); 780 780 } 781 781 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 782 782 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 783 783 if (topmap.containsKey(Att.TOPSHP)) { 784 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.FloatDelta);784 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.DAYMAR), Topmarks.FloatDelta); 785 785 } 786 786 } … … 830 830 addName(15, new Font("Arial", Font.BOLD, 60), Symbols.Mline, new Delta(Handle.LC, AffineTransform.getTranslateInstance(70, 0))); 831 831 ArrayList<StsSTS> sts = (ArrayList<StsSTS>) getAttList(Obj.ACHARE, Att.STATUS); 832 if ( (Renderer.zoom >= 15) && (sts.contains(StsSTS.STS_RESV))) {832 if (Renderer.zoom >= 15 && sts.contains(StsSTS.STS_RESV)) { 833 833 Renderer.labelText("Reserved", new Font("Arial", Font.PLAIN, 50), Symbols.Mline, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0, 60))); 834 834 } … … 923 923 switch (feature.type) { 924 924 case ROADWY: 925 ArrayList<CatROD> cat = (ArrayList<CatROD>) (getAttList(Obj.ROADWY, Att.CATROD));925 ArrayList<CatROD> cat = (ArrayList<CatROD>) getAttList(Obj.ROADWY, Att.CATROD); 926 926 if (cat.size() > 0) { 927 927 switch (cat.get(0)) { … … 1018 1018 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 1019 1019 if (topmap.containsKey(Att.TOPSHP)) { 1020 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), Topmarks.LightDelta);1020 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.TOPMAR), Topmarks.LightDelta); 1021 1021 } 1022 1022 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 1023 1023 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 1024 1024 if (topmap.containsKey(Att.TOPSHP)) { 1025 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), Topmarks.LightDelta);1025 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.DAYMAR), Topmarks.LightDelta); 1026 1026 } 1027 1027 } … … 1108 1108 for (AttMap atts : objs.values()) { 1109 1109 if (atts.get(Att.MARSYS) != null) 1110 sys = ((ArrayList<MarSYS>) (atts.get(Att.MARSYS).val)).get(0);1110 sys = ((ArrayList<MarSYS>) atts.get(Att.MARSYS).val).get(0); 1111 1111 if (atts.get(Att.BNKWTW) != null) 1112 bnk = ((ArrayList<BnkWTW>) (atts.get(Att.BNKWTW).val)).get(0);1112 bnk = ((ArrayList<BnkWTW>) atts.get(Att.BNKWTW).val).get(0); 1113 1113 CatNMK cat = CatNMK.NMK_UNKN; 1114 1114 if (atts.get(Att.CATNMK) != null) 1115 cat = ((ArrayList<CatNMK>) (atts.get(Att.CATNMK).val)).get(0);1115 cat = ((ArrayList<CatNMK>) atts.get(Att.CATNMK).val).get(0); 1116 1116 Symbol sym = Notices.getNotice(cat, sys, bnk); 1117 1117 Scheme sch = Notices.getScheme(sys, bnk); 1118 1118 ArrayList<AddMRK> add = new ArrayList<>(); 1119 1119 if (atts.get(Att.ADDMRK) != null) 1120 add = (ArrayList<AddMRK>) (atts.get(Att.ADDMRK).val);1120 add = (ArrayList<AddMRK>) atts.get(Att.ADDMRK).val; 1121 1121 Handle h = Handle.CC; 1122 1122 double ax = 0.0; … … 1254 1254 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 1255 1255 if (topmap.containsKey(Att.TOPSHP)) { 1256 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.TOPMAR), null);1256 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.TOPMAR), null); 1257 1257 } 1258 1258 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 1259 1259 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 1260 1260 if (topmap.containsKey(Att.TOPSHP)) { 1261 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), getScheme(Obj.DAYMAR), null);1261 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) topmap.get(Att.TOPSHP).val).get(0)), getScheme(Obj.DAYMAR), null); 1262 1262 } 1263 1263 }
Note:
See TracChangeset
for help on using the changeset viewer.