Changeset 35388 in osm for applications/editors/josm/plugins/seachart
- Timestamp:
- 2020-03-21T09:42:31+01:00 (5 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/render/Rules.java
r35120 r35388 356 356 return false; 357 357 } catch (Exception e) { 358 e.printStackTrace(); 358 359 return true; 359 360 } … … 979 980 fncSym = Landmarks.RadioTV; 980 981 Renderer.symbol(catSym); 981 if (catSym != Landmarks.Spire) 982 Renderer.symbol(fncSym); 982 Renderer.symbol(fncSym); 983 983 break; 984 984 case SILTNK: … … 1049 1049 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(Obj.SMCFAC, Att.CATSCF); 1050 1050 for (CatSCF scf : scfs) { 1051 symbols.add(Facilities.Cats.get(scf)); 1051 Symbol sym = Facilities.Cats.get(scf); 1052 if (sym != null) symbols.add(sym); 1052 1053 } 1053 1054 Renderer.cluster(symbols); … … 1059 1060 switch ((CatMOR) getAttEnum(feature.type, Att.CATMOR)) { 1060 1061 case MOR_DLPN: 1061 Renderer.symbol(Harbours.Dolphin); 1062 if (feature.geom.prim == Pflag.AREA) { 1063 Renderer.lineVector(new LineStyle(Color.black, 4, Symbols.Yland)); 1064 } else { 1065 Renderer.symbol(Harbours.Dolphin); 1066 } 1062 1067 Signals.addSignals(); 1063 1068 break; … … 1079 1084 Renderer.symbol(Topmarks.TopMooring, Topmarks.BuoyDeltas.get(shape)); 1080 1085 Signals.addSignals(); 1086 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(60, -50))); 1081 1087 } 1082 1088 break; … … 1542 1548 } 1543 1549 } 1550 addName(15, new Font("Arial", Font.BOLD, 40), new Delta(Handle.BL, AffineTransform.getTranslateInstance(50, 0))); 1544 1551 if (Renderer.zoom >= 15) { 1545 1552 Renderer.labelText("V-AIS", new Font("Arial", Font.PLAIN, 40), Symbols.Msymb, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0, 70))); -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r35114 r35388 469 469 str += "." + df.format(atts.get(Att.SIGPER).val) + "s"; 470 470 } 471 if ((s1 < =360) && (s2 <=360) && (s1 != s2))471 if ((s1 < 360) && (s2 < 360) && (s1 != s2)) 472 472 Renderer.lightSector(LightColours.get(col1), LightColours.get(col2), radius, s1, s2, dir, (Renderer.zoom >= 15) ? str : ""); 473 473 } -
applications/editors/josm/plugins/seachart/src/s57/S57osm.java
r34652 r35388 112 112 for (String token : ln.split("[ ]+")) { 113 113 if (token.matches("^minlat=.+")) { 114 map.bounds.minlat = Math.toRadians(Double.parseDouble(token.split("[\" \']")[1]));114 map.bounds.minlat = Math.toRadians(Double.parseDouble(token.split("[\"]")[1])); 115 115 map.nodes.get(2L).lat = map.bounds.minlat; 116 116 map.nodes.get(3L).lat = map.bounds.minlat; 117 117 } else if (token.matches("^minlon=.+")) { 118 map.bounds.minlon = Math.toRadians(Double.parseDouble(token.split("[\" \']")[1]));118 map.bounds.minlon = Math.toRadians(Double.parseDouble(token.split("[\"]")[1])); 119 119 map.nodes.get(1L).lon = map.bounds.minlon; 120 120 map.nodes.get(2L).lon = map.bounds.minlon; 121 121 } else if (token.matches("^maxlat=.+")) { 122 map.bounds.maxlat = Math.toRadians(Double.parseDouble(token.split("[\" \']")[1]));122 map.bounds.maxlat = Math.toRadians(Double.parseDouble(token.split("[\"]")[1])); 123 123 map.nodes.get(1L).lat = map.bounds.maxlat; 124 124 map.nodes.get(4L).lat = map.bounds.maxlat; 125 125 } else if (token.matches("^maxlon=.+")) { 126 map.bounds.maxlon = Math.toRadians(Double.parseDouble(token.split("[\" \']")[1]));126 map.bounds.maxlon = Math.toRadians(Double.parseDouble(token.split("[\"]")[1])); 127 127 map.nodes.get(3L).lon = map.bounds.maxlon; 128 128 map.nodes.get(4L).lon = map.bounds.maxlon; … … 133 133 k = v = ""; 134 134 String[] token = ln.split("k="); 135 k = token[1].split("[\" \']")[1];135 k = token[1].split("[\"]")[1]; 136 136 token = token[1].split("v="); 137 v = token[1].split("[\" \']")[1];137 v = token[1].split("[\"]")[1]; 138 138 if (!k.isEmpty() && !v.isEmpty()) { 139 139 map.addTag(k, v); … … 148 148 for (String token : ln.split("[ ]+")) { 149 149 if (token.matches("^id=.+")) { 150 id = Long.parseLong(token.split("[\" \']")[1]);150 id = Long.parseLong(token.split("[\"]")[1]); 151 151 } else if (token.matches("^lat=.+")) { 152 lat = Double.parseDouble(token.split("[\" \']")[1]);152 lat = Double.parseDouble(token.split("[\"]")[1]); 153 153 } else if (token.matches("^lon=.+")) { 154 lon = Double.parseDouble(token.split("[\" \']")[1]);154 lon = Double.parseDouble(token.split("[\"]")[1]); 155 155 } 156 156 } … … 166 166 for (String token : ln.split("[ ]+")) { 167 167 if (token.matches("^ref=.+")) { 168 ref = Long.parseLong(token.split("[\" \']")[1]);168 ref = Long.parseLong(token.split("[\"]")[1]); 169 169 } 170 170 } … … 182 182 for (String token : ln.split("[ ]+")) { 183 183 if (token.matches("^id=.+")) { 184 id = Long.parseLong(token.split("[\" \']")[1]);184 id = Long.parseLong(token.split("[\"]")[1]); 185 185 } 186 186 } … … 202 202 for (String token : ln.split("[ ]+")) { 203 203 if (token.matches("^ref=.+")) { 204 ref = Long.parseLong(token.split("[\" \']")[1]);204 ref = Long.parseLong(token.split("[\"]")[1]); 205 205 } else if (token.matches("^type=.+")) { 206 type = token.split("[\" \']")[1];206 type = token.split("[\"]")[1]; 207 207 } else if (token.matches("^role=.+")) { 208 String[] str = token.split("[\" \']");208 String[] str = token.split("[\"]"); 209 209 if (str.length > 1) { 210 role = token.split("[\" \']")[1];210 role = token.split("[\"]")[1]; 211 211 } 212 212 } … … 222 222 for (String token : ln.split("[ ]+")) { 223 223 if (token.matches("^id=.+")) { 224 id = Long.parseLong(token.split("[\" \']")[1]);224 id = Long.parseLong(token.split("[\"]")[1]); 225 225 } 226 226 } -
applications/editors/josm/plugins/seachart/src/s57/S57val.java
r34906 r35388 661 661 SPM_NOTC, SPM_TSS, SPM_NANC, SPM_NBRT, SPM_NOTK, SPM_NTWT, SPM_RWAK, SPM_SPDL, SPM_STOP, SPM_WRNG, SPM_SSSN, SPM_RVCL, SPM_MVDT, SPM_RHCL, SPM_SCNT, SPM_BRTH, SPM_OHPC, SPM_CHEG, SPM_TELE, SPM_FCRS, 662 662 SPM_MTRL, SPM_PLIN, SPM_ANCH, SPM_CLRG, SPM_CTRL, SPM_DIVG, SPM_RBCN, SPM_FGND, SPM_YCHT, SPM_HPRT, SPM_GPS, SPM_SLDG, SPM_NENT, SPM_WRKP, SPM_UKPP, SPM_WELH, SPM_CHSP, SPM_MFRM, SPM_AREF, 663 SPM_ICE, SPM_NATR, SPM_FAD, SPM_WREK, SPM_CUST, SPM_CSWY, SPM_WAVR, } 663 SPM_ICE, SPM_NATR, SPM_FAD, SPM_WREK, SPM_CUST, SPM_CSWY, SPM_WAVR, SPM_NJET } 664 664 665 665 private static final EnumMap<CatSPM, S57enum> Catspm = new EnumMap<>(CatSPM.class); static { … … 686 686 Catspm.put(CatSPM.SPM_AREF, new S57enum(56, "artificial_reef")); Catspm.put(CatSPM.SPM_ICE, new S57enum(57, "ice")); Catspm.put(CatSPM.SPM_NATR, new S57enum(58, "nature_reserve")); 687 687 Catspm.put(CatSPM.SPM_FAD, new S57enum(59, "fish_aggregator")); Catspm.put(CatSPM.SPM_WREK, new S57enum(60, "wreck")); Catspm.put(CatSPM.SPM_CUST, new S57enum(61, "customs")); 688 Catspm.put(CatSPM.SPM_CSWY, new S57enum(62, "causeway")); Catspm.put(CatSPM.SPM_WAVR, new S57enum(63, "wave_recorder")); 688 Catspm.put(CatSPM.SPM_CSWY, new S57enum(62, "causeway")); Catspm.put(CatSPM.SPM_WAVR, new S57enum(63, "wave_recorder")); Catspm.put(CatSPM.SPM_NJET, new S57enum(64, "no_jetski")); 689 689 } 690 690
Note:
See TracChangeset
for help on using the changeset viewer.