Ignore:
Timestamp:
2014-02-19T10:26:43+01:00 (12 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/panels/PanelS57.java

    r30286 r30298  
    1010package panels;
    1111
     12import java.awt.Color;
    1213import java.awt.Dimension;
    1314import java.io.*;
     
    5152                JFileChooser ifc = new JFileChooser(Main.pref.get("smed2plugin.file"));
    5253                FileInputStream in = new FileInputStream(inf);
    53                 PanelMain.messageBar.setText("Select OSM types file");
     54                PanelMain.setStatus("Select OSM types file", Color.yellow);
    5455                ifc.setCurrentDirectory(inf);
    5556                int returnVal = ifc.showOpenDialog(Main.parent);
     
    6566                MapBounds bounds = S57dec.decodeFile(in, types, map);
    6667
    67                 PanelMain.messageBar.setText("Import done");
    6868                in.close();
    6969               
     
    8585                                                                        node.setOsmId(ref, 1);
    8686                                                                        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);
    9187                                                                        addKeys(node, feature, type);
    9288                                                                        done.add(ref);
     
    195191                Main.map.mapView.addLayer(layer);
    196192                Main.map.mapView.zoomTo(new Bounds(bounds.minlat, bounds.minlon, bounds.maxlat, bounds.maxlon));
     193                PanelMain.setStatus("Import done", Color.green);
    197194        }
    198195
     
    203200                }
    204201                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                }
    205208                for (Map.Entry<Att, AttVal<?>> item : feature.atts.entrySet()) {
    206209                        String attstr = S57att.stringAttribute(item.getKey());
Note: See TracChangeset for help on using the changeset viewer.