Ignore:
Timestamp:
2020-03-22T12:03:02+01:00 (5 years ago)
Author:
malcolmh
Message:

use XML DOM to parse OSM files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/josmtos57/src/josmtos57/Josmtos57.java

    r32907 r35392  
    66import java.io.FileInputStream;
    77import java.io.FileOutputStream;
    8 import java.io.FileReader;
     8import java.io.File;
    99import java.io.IOException;
    1010import java.io.UnsupportedEncodingException;
     
    6262    };
    6363
    64     static BufferedReader in;
     64    static File in;
    6565    static FileOutputStream out;
    6666    static S57map map;
     
    9393            System.exit(-1);
    9494        }
     95        in = new File(args[0]);
    9596        try {
    96             in = new BufferedReader(new FileReader(new File(args[0])));
    97             try {
    98                 S57osm.OSMmap(in, map, false);
    99             } catch (Exception e) {
    100                 System.err.println("Input data error");
    101                 System.exit(-1);
    102             }
    103             in.close();
    104         } catch (IOException e) {
    105             System.err.println("Input file: " + e.getMessage());
     97            S57osm.OSMmap(in, map, false);
     98        } catch (Exception e) {
     99            System.err.println("Input data error");
    106100            System.exit(-1);
    107101        }
Note: See TracChangeset for help on using the changeset viewer.