Changeset 31722 in osm for applications/editors/josm/plugins/seachart/josmtos57
- Timestamp:
- 2015-10-29T23:01:53+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/josmtos57/src/josmtos57/Josmtos57.java
r31716 r31722 11 11 12 12 import java.io.*; 13 import java.util.HashMap; 13 14 import java.util.Scanner; 14 15 import java.util.zip.CRC32; … … 60 61 static S57map map; 61 62 static byte[] buf; 63 static HashMap<String, String> meta; 62 64 63 65 public static void main(String[] args) throws IOException { … … 72 74 try { 73 75 Scanner min = new Scanner(new FileInputStream(args[1])); 74 while (min.hasNext()) { 75 min.next(); 76 } 76 meta = new HashMap<String, String>(); 77 meta.put("FILE", args[3]); 78 // while (min.hasNext()) { 79 // String[] tokens = min.next().split("="); 80 // meta.put(tokens[0], tokens[1]); 81 // } 77 82 min.close(); 78 83 } catch (IOException e) { … … 91 96 try { 92 97 buf = new byte[5242880]; 93 idx = S57enc.encodeChart(map, buf);98 idx = S57enc.encodeChart(map, meta, buf); 94 99 } catch (IndexOutOfBoundsException e) { 95 System.err.println("Output file too big (limit 5 MB)"); 100 System.err.println("Output file too big (limit 5 MB) - try smaller areas"); 101 System.exit(-1); 102 } catch (UnsupportedEncodingException e) { 103 System.err.println("Input data error" + e.getMessage()); 96 104 System.exit(-1); 97 105 }
Note:
See TracChangeset
for help on using the changeset viewer.