Changeset 31731 in osm for applications/editors/josm/plugins/seachart/src/s57/S57att.java
- Timestamp:
- 2015-11-05T13:43:10+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/s57/S57att.java
r31704 r31731 86 86 AttIENC.put(Att.LC_DR1, 18022); AttIENC.put(Att.LC_DR2, 18023); AttIENC.put(Att.LC_SP1, 18024); AttIENC.put(Att.LC_SP2, 18025); AttIENC.put(Att.LC_WD1, 18026); 87 87 AttIENC.put(Att.LC_WD2, 18027); AttIENC.put(Att.SHPTYP, 33066); AttIENC.put(Att.UPDMSG, 40000); AttIENC.put(Att.BNKWTW, 17999); 88 }89 90 private static final HashMap<Integer, Att> S57Att = new HashMap<Integer, Att>();91 static {92 for (Map.Entry<Att, Integer> entry : AttS57.entrySet()) {93 S57Att.put(entry.getValue(), entry.getKey());94 }95 for (Map.Entry<Att, Integer> entry : AttIENC.entrySet()) {96 S57Att.put(entry.getValue(), entry.getKey());97 }98 88 } 99 89 … … 354 344 } 355 345 356 public static Att decodeAttribute(long attribute) { // Convert S57 attribute code to SCM attribute enumeration 357 Att att = S57Att.get((int)attribute); 358 return (att != null) ? att : Att.UNKATT; 346 public static Att decodeAttribute(long attl) { // Convert S57 attribute code to SCM attribute enumeration 347 for (Att att : AttS57.keySet()) { 348 if (AttS57.get(att) == attl) return att; 349 } 350 for (Att att : AttIENC.keySet()) { 351 if (AttIENC.get(att) == attl) return att; 352 } 353 return Att.UNKATT; 359 354 } 360 355
Note:
See TracChangeset
for help on using the changeset viewer.
