Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- public static void Main()
- {
- //Console.WriteLine ("Hello World!");
- ElevationModel lakeTahoe = new ElevationModel("Lake Tahoe", "TahoeDEM.csv");
- int rowsRead, columnsRead;
- rowsRead = lakeTahoe.Rows;
- columnsRead = lakeTahoe.Columns;
- //find potential outliers and store them in the gridpoint array.
- GridPoint[] lakeTahoeOutliers = null;
- //NTS: return the outlier row and column to the row and column fields...
- lakeTahoeOutliers = lakeTahoe.Outliers();
- //find potential outliers and store them in the gridpoint array.
- for (int x = 0; x < lakeTahoeOutliers.Length; x++)
- {
- //print out the outliers (row, column)
- Console.WriteLine(lakeTahoeOutliers[x]);
- for (int r = 0; r < lakeTahoeOutliers.GetLength(0); r++)
- {
- for (int c = 0; c < lakeTahoeOutliers.GetLength(1); c++)
- {
- //correct the outliers
- lakeTahoe.SmoothOutlier(lakeTahoeOutliers[r].Row, lakeTahoeOutliers[c].Column);
- }
- }
- }
- //write the corrected outliers to a .csv file
- //lakeTahoe.WriteDem("NewTahoeDEM.csv");
- //display the area in square km (already taken care of in the method)
- Console.WriteLine("\nLake Size Estimates");
- Console.WriteLine(" Area: {0}", lakeTahoe.Area(197.9));
- Console.WriteLine(" Volume: {0}", lakeTahoe.Volume(197.9));
- }
- }
Add Comment
Please, Sign In to add comment