View Single Post
  #2 (permalink)  
Old 03-11-2008, 10:37 PM
LineCutter's Avatar
LineCutter LineCutter is offline
Senior Member
 
Join Date: May 2007
Location: Daarsit
Posts: 119
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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.
Reply With Quote