Sort the file by Lat
Break it up into convenient sized chunks (index the range of lat in each file somehow)
[This saves memory space for the PPC version]
Read the Lat (& long) from your textboxes
Load the correct file (as a whole) into a database structure (table or SQL)
Use a binary search routine to home in on the correct Lat
Read "up" & "down" to find the limits of that Lat in your database
Search these to find the Long (you could sort by long, within each lat value when you create the data files,& do a binary search through these if there are lots)
Read the postcode.
|