Hi all !
I'm trying to link 2000 GPS points (with lat and long coordinates in decimals) to a list of 200 cities (that also have lat and long coordinates in decimals) by choosing the closest city.
I guess I have to build some kind of double matrix and where I calculate the differences between the latitude of the first point and all the latitudes of my city list, and choose the smallest differences. But in the same I have to do the same with longitudes...that's where it gets trickier...Should I build some kind of vector that calculates the absolute distance? How could I do that?
Is it clear? Any ideas ?
Because of confidentiality, I cannot give the coordinates (but it is for a good cause :-))
Thanks in advance for your help!
Pierre
Bookmarks