For a given lat/long pair as input, say {57.1475, -2.0954}, how do I find which UK postcode that point is in? Is there some way to do this for free, without having to use a commercial library or web service?
Would a very large amount of boundary data be required to do this acurately, and if this is infeasably large, what is the best way to get data for a reasonable time/space efficient approximation without being too complex?
http://www.freethepostcode.org/
You can download the list they created from that site :
http://www.freethepostcode.org/currentlist