internal static void readStopFile(out KDTree.KDTree rootNode) { rootNode = new KDTree.KDTree(2); Stream reader = getFileStream("stops.txt"); StreamReader streamReader = new StreamReader(reader); while (!streamReader.EndOfStream) { Stop stop = readStopLine(streamReader.ReadLine()); if (stop != null) { rootNode.insert(new double[] { stop.stop_lat, stop.stop_lon }, stop); } } }