Changeset 29172 in osm for applications/editors/josm/plugins/smed2/src/seamap/SeaMap.java
- Timestamp:
- 2013-01-05T16:09:17+01:00 (12 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/SeaMap.java
r29156 r29172 21 21 import s57.S57val.*; 22 22 23 public class Map {23 public class SeaMap { 24 24 25 25 public enum Fflag { … … 66 66 public HashMap<Long, ArrayList<Long>> ways; 67 67 public HashMap<Long, ArrayList<Long>> mpolys; 68 public HashMap<Long, Feature> features; 68 public EnumMap<Obj, ArrayList<Feature>> features; 69 public double minlat; 70 public double minlon; 71 public double maxlat; 72 public double maxlon; 69 73 70 74 private Feature feature; 71 75 private ArrayList<Long> list; 72 76 73 public Map() {77 public SeaMap() { 74 78 nodes = new HashMap<Long, Coord>(); 75 79 ways = new HashMap<Long, ArrayList<Long>>(); 76 80 mpolys = new HashMap<Long, ArrayList<Long>>(); 77 81 feature = new Feature(); 78 features = new HashMap<Long, Feature>();82 features = new EnumMap<Obj, ArrayList<Feature>>(Obj.class); 79 83 } 80 84 … … 115 119 feature.flag = Fflag.AREA; 116 120 } 117 features.put(feature.refs, feature); 121 if (features.get(feature.type) == null) { 122 features.put(feature.type, new ArrayList<Feature>()); 123 } 124 features.get(feature.type).add(feature); 118 125 } 119 126 } … … 144 151 } 145 152 AttVal attval = S57val.convertValue(val, att); 146 atts.put(att, new AttItem(attval.conv, attval.val));153 if (attval.val != null) atts.put(att, new AttItem(attval.conv, attval.val)); 147 154 } else { 148 155 if (subkeys[1].equals("type")) { … … 152 159 if (att != Att.UNKATT) { 153 160 AttVal attval = S57val.convertValue(val, att); 154 feature.atts.put(att, new AttItem(attval.conv, attval.val));161 if (attval.val != null) feature.atts.put(att, new AttItem(attval.conv, attval.val)); 155 162 } 156 163 }
Note:
See TracChangeset
for help on using the changeset viewer.