Changeset 33937 in osm for applications/editors
- Timestamp:
- 2017-12-07T19:44:16+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Rules.java
r33936 r33937 899 899 case BUISGL: 900 900 if (Renderer.zoom >= 16) { 901 if (hasAttribute(Obj.BUISGL, Att.STATUS) && (testAttribute(Obj.BUISGL, Att.STATUS, StsSTS.STS_ILLD))) { 902 Renderer.symbol(Beacons.Floodlight); 903 } 901 904 ArrayList<Symbol> symbols = new ArrayList<>(); 902 905 ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList(Obj.BUISGL, Att.FUNCTN); … … 981 984 switch (feature.type) { 982 985 case LNDMRK: 986 if (hasAttribute(Obj.LNDMRK, Att.STATUS) && (testAttribute(Obj.LNDMRK, Att.STATUS, StsSTS.STS_ILLD))) { 987 Renderer.symbol(Beacons.Floodlight); 988 } 983 989 ArrayList<CatLMK> cats = (ArrayList<CatLMK>) getAttList(feature.type, Att.CATLMK); 984 990 Symbol catSym = Landmarks.Shapes.get(cats.get(0)); … … 1046 1052 @SuppressWarnings("unchecked") 1047 1053 private static void lights() { 1048 boolean ok = false; 1049 switch (feature.type) { 1050 case LITMAJ: 1051 case LNDMRK: 1052 if (Renderer.zoom >= 12) { 1053 Renderer.symbol(Beacons.LightMajor); 1054 ok = true; 1055 } 1056 break; 1057 case LITMIN: 1058 case LIGHTS: 1059 case PILPNT: 1060 if (Renderer.zoom >= 14) { 1061 if (hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))) { 1062 Renderer.symbol(Beacons.Floodlight); 1063 Renderer.symbol(Harbours.SignalStation); 1064 } else { 1065 Renderer.symbol(Beacons.LightMinor); 1066 } 1067 ok = true; 1068 } 1069 break; 1070 default: 1071 break; 1072 } 1073 if (ok) { 1074 AffineTransform tr = new AffineTransform(); 1075 if (feature.objs.containsKey(Obj.TOPMAR)) { 1076 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 1077 if (topmap.containsKey(Att.TOPSHP)) { 1078 if (hasAttribute(Obj.TOPMAR, Att.ORIENT)) { 1079 tr.rotate(Math.toRadians((Double)getAttVal(Obj.TOPMAR, Att.ORIENT))); 1080 } 1081 tr.translate(0, -20); 1082 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1083 getScheme(Obj.TOPMAR), new Delta(Handle.BC, tr)); 1084 } 1085 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 1086 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 1087 if (topmap.containsKey(Att.TOPSHP)) { 1088 if (hasAttribute(Obj.DAYMAR, Att.ORIENT)) { 1089 tr.rotate(Math.toRadians((Double)getAttVal(Obj.DAYMAR, Att.ORIENT))); 1090 } 1091 tr.translate(0, -20); 1092 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1093 getScheme(Obj.DAYMAR), new Delta(Handle.BC, tr)); 1094 } 1095 } 1096 Signals.addSignals(); 1097 } 1054 boolean ok = false; 1055 switch (feature.type) { 1056 case LITMAJ: 1057 case LNDMRK: 1058 if (Renderer.zoom >= 12) { 1059 Renderer.symbol(Beacons.LightMajor); 1060 ok = true; 1061 } 1062 break; 1063 case LITMIN: 1064 case LIGHTS: 1065 case PILPNT: 1066 if (Renderer.zoom >= 14) { 1067 if (hasAttribute(Obj.LIGHTS, Att.CATLIT) && (testAttribute(Obj.LIGHTS, Att.CATLIT, CatLIT.LIT_FLDL))) { 1068 Renderer.symbol(Beacons.Floodlight); 1069 Renderer.symbol(Harbours.SignalStation); 1070 } else { 1071 Renderer.symbol(Beacons.LightMinor); 1072 } 1073 ok = true; 1074 } 1075 break; 1076 default: 1077 break; 1078 } 1079 if (ok) { 1080 AffineTransform tr = new AffineTransform(); 1081 if (feature.objs.containsKey(Obj.TOPMAR)) { 1082 if (hasAttribute(Obj.TOPMAR, Att.STATUS) && (testAttribute(Obj.TOPMAR, Att.STATUS, StsSTS.STS_ILLD))) { 1083 Renderer.symbol(Beacons.Floodlight); 1084 } 1085 AttMap topmap = feature.objs.get(Obj.TOPMAR).get(0); 1086 if (topmap.containsKey(Att.TOPSHP)) { 1087 if (hasAttribute(Obj.TOPMAR, Att.ORIENT)) { 1088 tr.rotate(Math.toRadians((Double)getAttVal(Obj.TOPMAR, Att.ORIENT))); 1089 } 1090 tr.translate(0, -20); 1091 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1092 getScheme(Obj.TOPMAR), new Delta(Handle.BC, tr)); 1093 } 1094 } else if (feature.objs.containsKey(Obj.DAYMAR)) { 1095 if (hasAttribute(Obj.DAYMAR, Att.STATUS) && (testAttribute(Obj.DAYMAR, Att.STATUS, StsSTS.STS_ILLD))) { 1096 Renderer.symbol(Beacons.Floodlight); 1097 } 1098 AttMap topmap = feature.objs.get(Obj.DAYMAR).get(0); 1099 if (topmap.containsKey(Att.TOPSHP)) { 1100 if (hasAttribute(Obj.DAYMAR, Att.ORIENT)) { 1101 tr.rotate(Math.toRadians((Double)getAttVal(Obj.DAYMAR, Att.ORIENT))); 1102 } 1103 tr.translate(0, -20); 1104 Renderer.symbol(Topmarks.Shapes.get(((ArrayList<TopSHP>) (topmap.get(Att.TOPSHP).val)).get(0)), 1105 getScheme(Obj.DAYMAR), new Delta(Handle.BC, tr)); 1106 } 1107 } 1108 Signals.addSignals(); 1109 } 1098 1110 } 1099 1111
Note:
See TracChangeset
for help on using the changeset viewer.