コード例 #1
0
ファイル: CsvReader.cs プロジェクト: imilligan/GrtLookup
 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);
         }
     }
 }
コード例 #2
0
        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);
                }
            }
        }