Using Dictionary will be good approach as it will result in O(1) search for the file result but i think the memory usage will be very high and building the dictionary it will be costly.
I was thinking can you Binary Search after the sorting the data based on the latitude and longitude . In this case NLog(N) , you can find each matching on on logN time.
struct D : ICompareable
{
decimal latitude,
decimal longitude,
int km ;
public int CompareTo(object a)
{
D incoming = (D)a;
if(incoming.latitude == this.latitude)
return this.longitude.CompareTo(incoming.longitude);
return this.latitude.CompareTo(incoming.latitude);
}
}
// load the first file data in the Struct array and do the Binary Search