[Talk-GB] Postcode search on slippy map

Tom Hughes tom at compton.nu
Fri Aug 24 18:45:14 BST 2007


In message <4cbe7b174f.tom at loxley.compton.nu>
          Tom Hughes <tom at compton.nu> wrote:

> In message <46CF04A5.2060303 at acrewoods.net>
>           Tom Chance <tom at acrewoods.net> wrote:
> 
> > What's the status of this? I've put about lots of codes around my area
> > into FreeThePostcode, but when I search for my flat's code it replaces
> > the last two letters with "##". So for example "AB12 3CD" just comes out
> > with "AB12 3##", which loses a lot of granularity. I have about ten
> > codes that fit within that range.
> > 
> > Would it be possible to search down to the penultimate character and for
> > exact matches as well?
> 
> Well you need to talk to the NPE/FreeThePost code people - we just
> make an API call to npemap.org.uk and use the results.
> 
> I'm not sure if npemaps queries FTP in real time though, or if they
> have a cached copy of the FTP database that might be out of date?

In fact neither database seems to be giving a hit for that postcode
at the moment - the npemaps combined API that we use is:

  http://www.npemap.org.uk/cgi/geocoder.fcgi?format=text&postcode=ab12+3cd

which gives:

  # Easting,Northing,Matched Postcode,Latitude,Longitude
  394584,802098,'AB12 3##',57.1098126102708,-2.09104987478933

and the FTP API call is:

  http://www.freethepostcode.org/geocode?postcode=ab12+3cd

which gives something even worse:

  # looking up postcode ab12 3cd
  57 0 AB10 7LE

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the Talk-GB mailing list