Guest User

Untitled

a guest
Jul 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. class Program
  2. {
  3. public static void Main()
  4. {
  5. //Console.WriteLine ("Hello World!");
  6. ElevationModel lakeTahoe = new ElevationModel("Lake Tahoe", "TahoeDEM.csv");
  7. int rowsRead, columnsRead;
  8.  
  9. rowsRead = lakeTahoe.Rows;
  10. columnsRead = lakeTahoe.Columns;
  11.  
  12. //find potential outliers and store them in the gridpoint array.
  13. GridPoint[] lakeTahoeOutliers = null;
  14. //NTS: return the outlier row and column to the row and column fields...
  15. lakeTahoeOutliers = lakeTahoe.Outliers();
  16.  
  17. //find potential outliers and store them in the gridpoint array.
  18. for (int x = 0; x < lakeTahoeOutliers.Length; x++)
  19. {
  20. //print out the outliers (row, column)
  21. Console.WriteLine(lakeTahoeOutliers[x]);
  22.  
  23. for (int r = 0; r < lakeTahoeOutliers.GetLength(0); r++)
  24. {
  25. for (int c = 0; c < lakeTahoeOutliers.GetLength(1); c++)
  26. {
  27. //correct the outliers
  28. lakeTahoe.SmoothOutlier(lakeTahoeOutliers[r].Row, lakeTahoeOutliers[c].Column);
  29. }
  30. }
  31. }
  32.  
  33.  
  34.  
  35. //write the corrected outliers to a .csv file
  36. //lakeTahoe.WriteDem("NewTahoeDEM.csv");
  37.  
  38.  
  39. //display the area in square km (already taken care of in the method)
  40. Console.WriteLine("\nLake Size Estimates");
  41. Console.WriteLine(" Area: {0}", lakeTahoe.Area(197.9));
  42. Console.WriteLine(" Volume: {0}", lakeTahoe.Volume(197.9));
  43. }
  44. }
Add Comment
Please, Sign In to add comment