I am working with a CSV file with well over 100,000 lines of data. The data depicts various points throughout the world via a lot long. I would like to have a list returned back to me that shows the closest point from a given known point. A example line of data is here
956985,Bob,large_building,California,41.45339929,-119.6739981,4398,NA,US,US-CA,Alturas,no,A24,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
The data above 41.45339929 is the latitude and the -119.6739981 is the longitude. I would want the filteredpoints to return a list that will be in order of closest lat and longs
For example
private List<string> points = new List<string>();
private List<string> filteredpoints = new List<string>();//list of closest lat long matches
private double MyLatitude = 39.23836;
private double MyLongitude = -119.5550003;
private void Window_Initialized(object sender, EventArgs e)
{
var strLines = File.ReadLines(@"C:\ProgramData\Inksnape\Data\file.csv");
foreach (var line in strLines)
{
points.Add(line);
}
} ```
I am stumped on how I can proceed with this issue