Changeset 31846 in osm for applications/editors/josm/plugins/seachart/josmtos57/src
- Timestamp:
- 2015-12-21T16:57:17+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/josmtos57/src/josmtos57/Josmtos57.java
r31735 r31846 29 29 */ 30 30 31 /* 32 * To do: 33 * 1. Geometry truncation at cell boundary. 34 * 2. Geometry validation/correction to comply with S57 limitations. 35 * 3. Improvements in mapping of OSM features to S57 objects. 36 */ 37 31 38 static byte[] header = { 32 39 '0', '0', '2', '6', '2', '3', 'L', 'E', '1', ' ', '0', '9', '0', '0', '0', '7', '3', ' ', ' ', ' ', '6', '6', '0', '4', '0', '0', '0', '0', '0', '0', '0', '0', … … 64 71 try { 65 72 Scanner min = new Scanner(new FileInputStream(args[1])); 66 meta = new HashMap< String, String>();73 meta = new HashMap<>(); 67 74 meta.put("FILE", args[3]); 68 75 while (min.hasNext()) { … … 78 85 try { 79 86 in = new BufferedReader(new FileReader(new File(args[0]))); 80 S57osm.OSMmap(in, map); 87 try { 88 S57osm.OSMmap(in, map); 89 } catch (Exception e) { 90 System.err.println("Input data error"); 91 System.exit(-1); 92 } 81 93 in.close(); 82 94 } catch (IOException e) { … … 113 125 idx = header.length; 114 126 int recs = 2; 115 fields = new ArrayList< Fparams>();127 fields = new ArrayList<>(); 116 128 fields.add(new Fparams(S57field.CATD, new Object[]{ "CD", recs, args[3], "", "V01X01", "BIN", Math.toDegrees(map.bounds.minlat), 117 129 Math.toDegrees(map.bounds.minlon), Math.toDegrees(map.bounds.maxlat), Math.toDegrees(map.bounds.maxlon), String.format("%08X", crc.getValue()), "" }));
Note:
See TracChangeset
for help on using the changeset viewer.