Changeset 32393 in osm
- Timestamp:
- 2016-06-24T02:19:11+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
r32105 r32393 105 105 } 106 106 writer.close(); 107 send = new ArrayList< String>();107 send = new ArrayList<>(); 108 108 } 109 109 } … … 146 146 xtile = Integer.parseInt(args[3]); 147 147 ytile = Integer.parseInt(args[4]); 148 send = new ArrayList< String>();149 deletes = new HashMap< String, Boolean>();148 send = new ArrayList<>(); 149 deletes = new HashMap<>(); 150 150 BufferedReader in = new BufferedReader(new FileReader(srcdir + xtile + "-" + ytile + "-" + zoom + ".osm")); 151 151 map = new S57map(true); -
applications/editors/josm/plugins/seachart/js57toosm/src/js57toosm/Js57toosm.java
r31731 r32393 30 30 static PrintStream out; 31 31 static S57map map; 32 static final ArrayList<Att> typatts = new ArrayList< Att>(); static {32 static final ArrayList<Att> typatts = new ArrayList<>(); static { 33 33 typatts.add(Att.OBJNAM); typatts.add(Att.NOBJNM); typatts.add(Att.STATUS); typatts.add(Att.INFORM); typatts.add(Att.NINFOM); 34 34 typatts.add(Att.PEREND); typatts.add(Att.PERSTA); typatts.add(Att.CONDTN); typatts.add(Att.CONRAD); typatts.add(Att.CONVIS); … … 37 37 public static void main(String[] args) throws IOException { 38 38 39 ArrayList<Long> done = new ArrayList< Long>();39 ArrayList<Long> done = new ArrayList<>(); 40 40 41 41 if (args.length < 3) { … … 56 56 System.exit(-1); 57 57 } 58 ArrayList<Obj> types = new ArrayList< Obj>();58 ArrayList<Obj> types = new ArrayList<>(); 59 59 try { 60 60 Scanner tin = new Scanner(new FileInputStream(args[1])); -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r32380 r32393 32 32 static final DecimalFormat df = new DecimalFormat("#.#"); 33 33 34 static final EnumMap<ColCOL, Color> bodyColours = new EnumMap< ColCOL, Color>(ColCOL.class);34 static final EnumMap<ColCOL, Color> bodyColours = new EnumMap<>(ColCOL.class); 35 35 static { 36 36 bodyColours.put(ColCOL.COL_UNK, new Color(0, true)); … … 50 50 } 51 51 52 static final EnumMap<ColPAT, Patt> pattMap = new EnumMap< ColPAT, Patt>(ColPAT.class);52 static final EnumMap<ColPAT, Patt> pattMap = new EnumMap<>(ColPAT.class); 53 53 static { 54 54 pattMap.put(ColPAT.PAT_UNKN, Patt.Z); … … 144 144 @SuppressWarnings("unchecked") 145 145 static Scheme getScheme(Obj obj) { 146 ArrayList<Color> colours = new ArrayList< Color>();146 ArrayList<Color> colours = new ArrayList<>(); 147 147 for (ColCOL col : (ArrayList<ColCOL>) getAttList(obj, Att.COLOUR)) { 148 148 colours.add(bodyColours.get(col)); 149 149 } 150 ArrayList<Patt> patterns = new ArrayList< Patt>();150 ArrayList<Patt> patterns = new ArrayList<>(); 151 151 for (ColPAT pat : (ArrayList<ColPAT>) getAttList(obj, Att.COLPAT)) { 152 152 patterns.add(pattMap.get(pat)); … … 806 806 case BUISGL: 807 807 if (Renderer.zoom >= 16) { 808 ArrayList<Symbol> symbols = new ArrayList< Symbol>();808 ArrayList<Symbol> symbols = new ArrayList<>(); 809 809 ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) getAttList(Obj.BUISGL, Att.FUNCTN); 810 810 for (FncFNC fnc : fncs) { … … 992 992 private static void marinas() { 993 993 if (Renderer.zoom >= 16) { 994 ArrayList<Symbol> symbols = new ArrayList< Symbol>();994 ArrayList<Symbol> symbols = new ArrayList<>(); 995 995 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(Obj.SMCFAC, Att.CATSCF); 996 996 for (CatSCF scf : scfs) { … … 1248 1248 Renderer.lineVector(new LineStyle(Color.black, 2, null, new Color(0xffe000))); 1249 1249 if ((Renderer.zoom >= 16) && feature.objs.containsKey(Obj.SMCFAC)) { 1250 ArrayList<Symbol> symbols = new ArrayList< Symbol>();1250 ArrayList<Symbol> symbols = new ArrayList<>(); 1251 1251 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(Obj.SMCFAC, Att.CATSCF); 1252 1252 for (CatSCF scf : scfs) { -
applications/editors/josm/plugins/seachart/src/render/Signals.java
r32095 r32393 30 30 public class Signals extends Rules{ 31 31 32 static final EnumMap<ColCOL, Color> LightColours = new EnumMap< ColCOL, Color>(ColCOL.class);32 static final EnumMap<ColCOL, Color> LightColours = new EnumMap<>(ColCOL.class); 33 33 static { 34 34 LightColours.put(ColCOL.COL_WHT, new Color(0xffff00)); … … 43 43 } 44 44 45 static final EnumMap<ColCOL, String> LightLetters = new EnumMap< ColCOL, String>(ColCOL.class);45 static final EnumMap<ColCOL, String> LightLetters = new EnumMap<>(ColCOL.class); 46 46 static { 47 47 LightLetters.put(ColCOL.COL_WHT, "W"); … … 55 55 } 56 56 57 static final EnumMap<LitCHR, String> LightCharacters = new EnumMap< LitCHR, String>(LitCHR.class);57 static final EnumMap<LitCHR, String> LightCharacters = new EnumMap<>(LitCHR.class); 58 58 static { 59 59 LightCharacters.put(LitCHR.CHR_F, "F"); … … 84 84 } 85 85 86 static final EnumMap<CatFOG, String> fogSignals = new EnumMap< CatFOG, String>(CatFOG.class);86 static final EnumMap<CatFOG, String> fogSignals = new EnumMap<>(CatFOG.class); 87 87 static { 88 88 fogSignals.put(CatFOG.FOG_EXPL, "Explos"); … … 553 553 } 554 554 if (!found) { 555 ArrayList<LitSect> tmp = new ArrayList< LitSect>();555 ArrayList<LitSect> tmp = new ArrayList<>(); 556 556 tmp.add(lit); 557 557 groupings.add(tmp); -
applications/editors/josm/plugins/seachart/src/s57/S57att.java
r32082 r32393 32 32 } 33 33 34 private static final EnumMap<Att, Integer> AttS57 = new EnumMap< Att, Integer>(Att.class);34 private static final EnumMap<Att, Integer> AttS57 = new EnumMap<>(Att.class); 35 35 static { 36 36 AttS57.put(Att.UNKATT, 0); AttS57.put(Att.AGENCY, 1); AttS57.put(Att.BCNSHP, 2); AttS57.put(Att.BUISHP, 3); AttS57.put(Att.BOYSHP, 4); AttS57.put(Att.BURDEP, 5); … … 65 65 } 66 66 67 private static final EnumMap<Att, Integer> AttIENC = new EnumMap< Att, Integer>(Att.class);67 private static final EnumMap<Att, Integer> AttIENC = new EnumMap<>(Att.class); 68 68 static { 69 69 AttIENC.put(Att.CATACH, 17000); AttIENC.put(Att.CATDIS, 17001); AttIENC.put(Att.CATSIT, 17002); AttIENC.put(Att.CATSIW, 17003); AttIENC.put(Att.RESTRN, 17004); … … 88 88 } 89 89 90 private static final EnumMap<Att, String> AttStr = new EnumMap< Att, String>(Att.class);90 private static final EnumMap<Att, String> AttStr = new EnumMap<>(Att.class); 91 91 static { 92 92 AttStr.put(Att.UNKATT, ""); AttStr.put(Att.AGENCY, "agency"); AttStr.put(Att.BCNSHP, "shape"); AttStr.put(Att.BUISHP, "shape"); AttStr.put(Att.BOYSHP, "shape"); … … 307 307 private static final EnumMap<Obj, Att> Year = new EnumMap<>(Obj.class); static { Year.put(Obj.UNKOBJ, Att.RYRMGV); } 308 308 309 private static final HashMap<String, EnumMap<Obj, Att>> StrAtt = new HashMap< String, EnumMap<Obj, Att>>();309 private static final HashMap<String, EnumMap<Obj, Att>> StrAtt = new HashMap<>(); 310 310 static { 311 311 StrAtt.put("accuracy", Accuracy); StrAtt.put("addition", Addition); StrAtt.put("agency", Agency); StrAtt.put("anomaly", Anomaly); StrAtt.put("authority", Authority); -
applications/editors/josm/plugins/seachart/src/s57/S57map.java
r32380 r32393 84 84 first = 0; 85 85 last = 0; 86 nodes = new ArrayList< Long>();86 nodes = new ArrayList<>(); 87 87 } 88 88 } -
applications/editors/josm/plugins/seachart/src/s57/S57osm.java
r32082 r32393 38 38 OSMtags.put("waterway=riverbank", new KeyVal<>(Obj.RIVERS, Att.UNKATT, null, null)); OSMtags.put("waterway=dock", new KeyVal<>(Obj.HRBBSN, Att.UNKATT, null, null)); 39 39 OSMtags.put("waterway=lock", new KeyVal<>(Obj.HRBBSN, Att.UNKATT, null, null)); OSMtags.put("landuse=basin", new KeyVal<>(Obj.LAKARE, Att.UNKATT, null, null)); 40 OSMtags.put("wetland=tidalflat", new KeyVal< Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (Double)0.0)); OSMtags.put("tidal=yes", new KeyVal<Double>(Obj.DEPARE, Att.DRVAL2, Conv.F, (Double)0.0));40 OSMtags.put("wetland=tidalflat", new KeyVal<>(Obj.DEPARE, Att.DRVAL2, Conv.F, (Double)0.0)); OSMtags.put("tidal=yes", new KeyVal<>(Obj.DEPARE, Att.DRVAL2, Conv.F, (Double)0.0)); 41 41 OSMtags.put("natural=mud", new KeyVal<>(Obj.DEPARE, Att.UNKATT, null, null)); OSMtags.put("natural=sand", new KeyVal<>(Obj.DEPARE, Att.UNKATT, null, null)); 42 42 OSMtags.put("highway=motorway", new KeyVal<>(Obj.ROADWY, Att.CATROD, Conv.E, CatROD.ROD_MWAY)); OSMtags.put("highway=trunk", new KeyVal<>(Obj.ROADWY, Att.CATROD, Conv.E, CatROD.ROD_MAJR)); … … 56 56 if (kv != null) { 57 57 if (kv.conv == Conv.E) { 58 ArrayList<Enum<?>> list = new ArrayList< Enum<?>>();58 ArrayList<Enum<?>> list = new ArrayList<>(); 59 59 list.add((Enum<?>)kv.val); 60 60 osm.add(new KeyVal<>(kv.obj, kv.att, kv.conv, list)); -
applications/editors/josm/plugins/seachart/src/s57/S57val.java
r32380 r32393 1025 1025 } 1026 1026 1027 private static final EnumMap<Att, S57key> keys = new EnumMap< Att, S57key>(Att.class);1027 private static final EnumMap<Att, S57key> keys = new EnumMap<>(Att.class); 1028 1028 static { 1029 1029 keys.put(Att.UNKATT, new S57key(Conv.A, null)); keys.put(Att.AGENCY, new S57key(Conv.A, null)); keys.put(Att.BCNSHP, new S57key(Conv.E, Bcnshp)); … … 1143 1143 case A: 1144 1144 case S: 1145 return new AttVal< String>(conv, val);1145 return new AttVal<>(conv, val); 1146 1146 case E: 1147 ArrayList<Enum<?>> list = new ArrayList< Enum<?>>();1147 ArrayList<Enum<?>> list = new ArrayList<>(); 1148 1148 list.add(s57Enum(val, att)); 1149 1149 return new AttVal<ArrayList<?>>(Conv.E, list); 1150 1150 case L: 1151 list = new ArrayList< Enum<?>>();1151 list = new ArrayList<>(); 1152 1152 for (String item : val.split(",")) { 1153 1153 list.add(s57Enum(item, att)); … … 1156 1156 case I: 1157 1157 try { 1158 return new AttVal< Long>(Conv.I, Long.parseLong(val));1158 return new AttVal<>(Conv.I, Long.parseLong(val)); 1159 1159 } catch (Exception e) { 1160 1160 break; … … 1162 1162 case F: 1163 1163 try { 1164 return new AttVal< Double>(Conv.F, Double.parseDouble(val));1164 return new AttVal<>(Conv.F, Double.parseDouble(val)); 1165 1165 } catch (Exception e) { 1166 1166 break; … … 1236 1236 case A: 1237 1237 case S: 1238 return new AttVal< String>(Conv.S, val);1238 return new AttVal<>(Conv.S, val); 1239 1239 case E: 1240 ArrayList<Enum<?>> list = new ArrayList< Enum<?>>();1240 ArrayList<Enum<?>> list = new ArrayList<>(); 1241 1241 list.add(osmEnum(val, att)); 1242 1242 return new AttVal<ArrayList<?>>(Conv.E, list); 1243 1243 case L: 1244 list = new ArrayList< Enum<?>>();1244 list = new ArrayList<>(); 1245 1245 for (String item : val.split(";")) { 1246 1246 list.add(osmEnum(item, att)); … … 1249 1249 case I: 1250 1250 try { 1251 return new AttVal< Long>(Conv.I, Long.parseLong(val));1251 return new AttVal<>(Conv.I, Long.parseLong(val)); 1252 1252 } catch (Exception e) { 1253 1253 break; … … 1255 1255 case F: 1256 1256 try { 1257 return new AttVal< Double>(Conv.F, Double.parseDouble(val));1257 return new AttVal<>(Conv.F, Double.parseDouble(val)); 1258 1258 } catch (Exception e) { 1259 1259 break; 1260 1260 } 1261 1261 } 1262 return new AttVal< Object>(keys.get(att).conv, null);1262 return new AttVal<>(keys.get(att).conv, null); 1263 1263 } 1264 1264 -
applications/editors/josm/plugins/seachart/src/symbols/Beacons.java
r30894 r32393 182 182 } 183 183 184 public static final EnumMap<BcnSHP, Symbol> Shapes = new EnumMap< BcnSHP, Symbol>(BcnSHP.class);184 public static final EnumMap<BcnSHP, Symbol> Shapes = new EnumMap<>(BcnSHP.class); 185 185 static { 186 186 Shapes.put(BcnSHP.BCN_UNKN, Beacons.Beacon); Shapes.put(BcnSHP.BCN_STAK, Beacons.Stake); Shapes.put(BcnSHP.BCN_TOWR, Beacons.Tower); -
applications/editors/josm/plugins/seachart/src/symbols/Buoys.java
r30894 r32393 249 249 } 250 250 251 public static final EnumMap<BoySHP, Symbol> Shapes = new EnumMap< BoySHP, Symbol>(BoySHP.class);251 public static final EnumMap<BoySHP, Symbol> Shapes = new EnumMap<>(BoySHP.class); 252 252 static { 253 253 Shapes.put(BoySHP.BOY_UNKN, Buoys.Pillar); Shapes.put(BoySHP.BOY_CONE, Buoys.Cone); Shapes.put(BoySHP.BOY_CAN, Buoys.Can); -
applications/editors/josm/plugins/seachart/src/symbols/Facilities.java
r30894 r32393 191 191 } 192 192 193 public static final EnumMap<CatSCF, Symbol> Cats = new EnumMap< CatSCF, Symbol>(CatSCF.class);193 public static final EnumMap<CatSCF, Symbol> Cats = new EnumMap<>(CatSCF.class); 194 194 static { 195 195 Cats.put(CatSCF.SCF_BHST, Boatlift); Cats.put(CatSCF.SCF_BTYD, Boatyard); Cats.put(CatSCF.SCF_CHDR, Chandler); Cats.put(CatSCF.SCF_FUEL, Fuel); Cats.put(CatSCF.SCF_LAUN, Laundrette); -
applications/editors/josm/plugins/seachart/src/symbols/Landmarks.java
r32095 r32393 187 187 } 188 188 189 public static final EnumMap<CatLMK, Symbol> Shapes = new EnumMap< CatLMK, Symbol>(CatLMK.class);189 public static final EnumMap<CatLMK, Symbol> Shapes = new EnumMap<>(CatLMK.class); 190 190 static { 191 191 Shapes.put(CatLMK.LMK_CARN, Beacons.Cairn); Shapes.put(CatLMK.LMK_CHMY, Landmarks.Chimney); … … 198 198 } 199 199 200 public static final EnumMap<FncFNC, Symbol> Funcs = new EnumMap< FncFNC, Symbol>(FncFNC.class);200 public static final EnumMap<FncFNC, Symbol> Funcs = new EnumMap<>(FncFNC.class); 201 201 static { 202 202 Funcs.put(FncFNC.FNC_CHCH, Landmarks.Church); Funcs.put(FncFNC.FNC_CHPL, Landmarks.Church); Funcs.put(FncFNC.FNC_TMPL, Landmarks.Temple); -
applications/editors/josm/plugins/seachart/src/symbols/Notices.java
r32380 r32393 1060 1060 } 1061 1061 1062 public static final EnumMap<CatNMK, Symbol> NmkCevni = new EnumMap< CatNMK, Symbol>(CatNMK.class);1062 public static final EnumMap<CatNMK, Symbol> NmkCevni = new EnumMap<>(CatNMK.class); 1063 1063 static { 1064 1064 NmkCevni.put(CatNMK.NMK_UNKN, Notice); NmkCevni.put(CatNMK.NMK_NENT, NoticeA1); NmkCevni.put(CatNMK.NMK_CLSA, NoticeA1a); NmkCevni.put(CatNMK.NMK_NOVK, NoticeA2); … … 1310 1310 NoticeBoptl.add(new Instr(Form.PGON, p)); 1311 1311 } 1312 public static final EnumMap<CatNMK, Symbol> NmkBniwr = new EnumMap< CatNMK, Symbol>(CatNMK.class);1312 public static final EnumMap<CatNMK, Symbol> NmkBniwr = new EnumMap<>(CatNMK.class); 1313 1313 static { 1314 1314 NmkBniwr.put(CatNMK.NMK_NANK, NoticeBnank); NmkBniwr.put(CatNMK.NMK_LMHR, NoticeBlmhr); NmkBniwr.put(CatNMK.NMK_OPTR, NoticeBoptr); NmkBniwr.put(CatNMK.NMK_OPTL, NoticeBoptl); … … 1502 1502 } 1503 1503 1504 public static final EnumMap<CatNMK, Symbol> NmkPpwbcl = new EnumMap< CatNMK, Symbol>(CatNMK.class);1504 public static final EnumMap<CatNMK, Symbol> NmkPpwbcl = new EnumMap<>(CatNMK.class); 1505 1505 static { 1506 1506 NmkPpwbcl.put(CatNMK.NMK_WRAL, NoticePwralL); NmkPpwbcl.put(CatNMK.NMK_WLAR, NoticePwlarL); NmkPpwbcl.put(CatNMK.NMK_KTPM, NoticePktmL); NmkPpwbcl.put(CatNMK.NMK_KTSM, NoticePktmL); … … 1508 1508 } 1509 1509 1510 public static final EnumMap<CatNMK, Symbol> NmkPpwbcr = new EnumMap< CatNMK, Symbol>(CatNMK.class);1510 public static final EnumMap<CatNMK, Symbol> NmkPpwbcr = new EnumMap<>(CatNMK.class); 1511 1511 static { 1512 1512 NmkPpwbcr.put(CatNMK.NMK_WRAL, NoticePwralR); NmkPpwbcr.put(CatNMK.NMK_WLAR, NoticePwlarR); NmkPpwbcr.put(CatNMK.NMK_KTPM, NoticePktmR); NmkPpwbcr.put(CatNMK.NMK_KTSM, NoticePktmR); … … 1514 1514 } 1515 1515 1516 public static final EnumMap<CatNMK, Symbol> NmkRiwr = new EnumMap< CatNMK, Symbol>(CatNMK.class);1516 public static final EnumMap<CatNMK, Symbol> NmkRiwr = new EnumMap<>(CatNMK.class); 1517 1517 static { 1518 1518 NmkRiwr.put(CatNMK.NMK_NPAS, NoticeRnpas); NmkRiwr.put(CatNMK.NMK_NANK, NoticeRnank); NmkRiwr.put(CatNMK.NMK_NWSH, NoticeRnwsh); NmkRiwr.put(CatNMK.NMK_LMHR, NoticeRlmhr); NmkRiwr.put(CatNMK.NMK_TRNA, NoticeRtrna); … … 1521 1521 1522 1522 public static Scheme getScheme(MarSYS sys, BnkWTW bank) { 1523 ArrayList<Color> colours = new ArrayList< Color>();1523 ArrayList<Color> colours = new ArrayList<>(); 1524 1524 Scheme scheme = new Scheme(colours); 1525 1525 switch (sys) { -
applications/editors/josm/plugins/seachart/src/symbols/Symbols.java
r32380 r32393 69 69 70 70 public Scheme(ArrayList<Color> icol) { 71 pat = new ArrayList< Patt>();71 pat = new ArrayList<>(); 72 72 col = icol; 73 73 } … … 77 77 } 78 78 public Scheme(Color icol) { 79 pat = new ArrayList< Patt>();80 col = new ArrayList< Color>();79 pat = new ArrayList<>(); 80 col = new ArrayList<>(); 81 81 col.add(icol); 82 82 } 83 83 public Scheme() { 84 pat = new ArrayList< Patt>();85 col = new ArrayList< Color>();84 pat = new ArrayList<>(); 85 col = new ArrayList<>(); 86 86 } 87 87 } -
applications/editors/josm/plugins/seachart/src/symbols/Topmarks.java
r32380 r32393 475 475 } 476 476 477 public static final EnumMap<TopSHP, Symbol> Shapes = new EnumMap< TopSHP, Symbol>(TopSHP.class);477 public static final EnumMap<TopSHP, Symbol> Shapes = new EnumMap<>(TopSHP.class); 478 478 static { 479 479 Shapes.put(TopSHP.TOP_BESM, TopBesom); Shapes.put(TopSHP.TOP_IBESM, TopIBesom); Shapes.put(TopSHP.TOP_BORD, TopBoard); Shapes.put(TopSHP.TOP_CAN, TopCan); … … 489 489 } 490 490 491 public static final EnumMap<BoySHP, Delta> BuoyDeltas = new EnumMap< BoySHP, Delta>(BoySHP.class);491 public static final EnumMap<BoySHP, Delta> BuoyDeltas = new EnumMap<>(BoySHP.class); 492 492 static { 493 493 BuoyDeltas.put(BoySHP.BOY_PILR, new Delta(Handle.BC, new AffineTransform(0.948324, 0.317305, -0.3173047, 0.948324, 31.5, -95.0)));
Note:
See TracChangeset
for help on using the changeset viewer.