I have two arrays each contains two columns. lon and lat.
I want to use the lon and lat values from the one array to look and find the nearest matching values in the 2nd array.
Here is some sample data of longitude and latitude.
lat="39.7553670 " lon="-88.8309830"
lat="39.7874000 " lon="-89.1040170"
lat="39.8309670 " lon="-89.0850330"
lat="40.1745330 " lon="-88.2416830"
I will never have exact matching values, so I just want to find the best fit. The best fit in the 2nd array may be either a slightly higher or lower value than the search value.
I want to extract a value from a third column from the 2nd array and place it into a similar column of the first array.
Any suggestions on how that might be coded?
I want to use the lon and lat values from the one array to look and find the nearest matching values in the 2nd array.
Here is some sample data of longitude and latitude.
lat="39.7553670 " lon="-88.8309830"
lat="39.7874000 " lon="-89.1040170"
lat="39.8309670 " lon="-89.0850330"
lat="40.1745330 " lon="-88.2416830"
I will never have exact matching values, so I just want to find the best fit. The best fit in the 2nd array may be either a slightly higher or lower value than the search value.
I want to extract a value from a third column from the 2nd array and place it into a similar column of the first array.
Any suggestions on how that might be coded?
Code:
aFoundCache = new Array(1,4)
aFoundCache[1,1] = "WayPoint"
aFoundCache[1,2] = "Lat"
aFoundCache[1,1] = "Lon"
aFoundCache[1,1] = "Time"
aTrackPoint = new Array(1,4)
aTrackPoint[1,1] = "Lat"
aTrackPoint[1,2] = "Lon"
aTrackPoint[1,3] = "Date"
aTrackPoint[1,4] = "Time"
Comment