Changeset 30298 in osm for applications/editors/josm/plugins/smed2/src/panels/PanelS57.java
- Timestamp:
- 2014-02-19T10:26:43+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/panels/PanelS57.java
r30286 r30298 10 10 package panels; 11 11 12 import java.awt.Color; 12 13 import java.awt.Dimension; 13 14 import java.io.*; … … 51 52 JFileChooser ifc = new JFileChooser(Main.pref.get("smed2plugin.file")); 52 53 FileInputStream in = new FileInputStream(inf); 53 PanelMain. messageBar.setText("Select OSM types file");54 PanelMain.setStatus("Select OSM types file", Color.yellow); 54 55 ifc.setCurrentDirectory(inf); 55 56 int returnVal = ifc.showOpenDialog(Main.parent); … … 65 66 MapBounds bounds = S57dec.decodeFile(in, types, map); 66 67 67 PanelMain.messageBar.setText("Import done");68 68 in.close(); 69 69 … … 85 85 node.setOsmId(ref, 1); 86 86 data.addPrimitive(node); 87 // out.format(" <node id='%d' lat='%.8f' lon='%.8f' version='1'>%n", -ref, Math.toDegrees(node.lat), Math.toDegrees(node.lon));88 // out.format(" <tag k='seamark:type' v=\"%s\"/>%n", type);89 // if ((feature.type == Obj.SOUNDG) && (node.flg == S57map.Nflag.DPTH))90 // out.format(" <tag k='seamark:sounding:depth' v='%.1f'/>%n", ((Dnode) node).val);91 87 addKeys(node, feature, type); 92 88 done.add(ref); … … 195 191 Main.map.mapView.addLayer(layer); 196 192 Main.map.mapView.zoomTo(new Bounds(bounds.minlat, bounds.minlon, bounds.maxlat, bounds.maxlon)); 193 PanelMain.setStatus("Import done", Color.green); 197 194 } 198 195 … … 203 200 } 204 201 keys.put("seamark:type", type); 202 if (feature.type == Obj.SOUNDG) { 203 Snode snode = map.nodes.get(feature.geom.elems.get(0).id); 204 if (snode.flg == S57map.Nflag.DPTH) { 205 keys.put("seamark:sounding:depth", ((Double)((Dnode)snode).val).toString()); 206 } 207 } 205 208 for (Map.Entry<Att, AttVal<?>> item : feature.atts.entrySet()) { 206 209 String attstr = S57att.stringAttribute(item.getKey());
Note:
See TracChangeset
for help on using the changeset viewer.
