Changeset 31735 in osm for applications/editors/josm/plugins/seachart/src/s57/S57dat.java
- Timestamp:
- 2015-11-08T09:49:14+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/s57/S57dat.java
r31731 r31735 262 262 public static byte[] encSubf(S57subf subf, Object val) { 263 263 S57conv conv = convs.get(subf); 264 if ( conv.bin == 0) {264 if ((conv.bin == 0) || asc) { 265 265 String sval = ""; 266 266 if (val instanceof String) { 267 267 sval = (String) val; 268 } else if (val instanceof Integer) { 269 sval = ((Integer)val).toString(); 268 270 } else if (val instanceof Long) { 269 271 sval = ((Long)val).toString(); … … 328 330 }; 329 331 332 static boolean asc = false; 333 334 public static byte[] encRecord(String i8rn, ArrayList<Fparams> fparams) { 335 asc = true; 336 return encRecord(Integer.parseInt(i8rn), fparams); 337 } 338 330 339 public static byte[] encRecord(int i8rn, ArrayList<Fparams> fparams) { 331 340 ArrayList<Index> index = new ArrayList<Index>(); … … 380 389 System.arraycopy(String.format("%05d", fbuf.length).getBytes(), 0, fbuf, 0, 5); 381 390 System.arraycopy(String.format("%05d", (leader.length + ibuf.length)).getBytes(), 0, fbuf, 12, 5); 391 asc = false; 382 392 return fbuf; 383 393 }
Note:
See TracChangeset
for help on using the changeset viewer.