public void load(String coastLineFile) throws IOException, Exception {
        BufferedReader br;
        br = new BufferedReader(new FileReader(coastLineFile));

        String line;
        while ((line = br.readLine()) != null) {
            if (line.contains(">")) {
                while (!nodeRefQueue.isEmpty()) {
                    int fn = nodeRefQueue.poll();
                    if (!nodeRefQueue.isEmpty()) {
                        int tn = nodeRefQueue.peek();
                        processEdge(new CoastlineEdge(edgeID, fn, tn));
                        edgeID++;
                    }
                }
                nodeRefQueue.clear();
                continue;
            } else {
                String[] lineSplit = line.split("\\s+");
                try {
                    x = Double.parseDouble(lineSplit[0]);
                    y = Double.parseDouble(lineSplit[1]);
                } catch (NumberFormatException ex) {
                    Logger.getLogger(CoastlineLoader.class.getName()).log(Level.SEVERE, null, ex);
                    continue;
                }

                double easting = x;
                double northing = y;

                processNode(new CoastlineNode(nodeID, easting, northing));

                nodeRefQueue.add(nodeID);
                nodeID++;
            }

        }


        br.close();
    }