Saturday 27 January 2007

Geocoding within the UK

So it seems you can no longer use Google's fantastic Maps API Geocoder for retreiving Longitude and Lattitude for UK PostCodes.

.. pitty. We we're playing with it for deployment on our soon-to-be-launched revamp of Gate54 and it was working last time I looked.

I picked up the thread again the other day, working on our Estate Agent Software product and 'bang!' no more.

The problem

As mapperz explains on this thread there are now legal restrictions in place that do not allow Google to provide their geocoding data for UK Postcodes; something to do with the PO or Crown Copyright.

Speaking to collegues this is not a new problem and has been hounding companies like Multimap and UpMyStreet for some time.

The result

Well... while a request such as this :

http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=xml&key=abcdefg

.. will provide a plethora of data, a similar request such as this :

http://maps.google.com/maps/geo?q=BA1+1JB,+UK&output=xml&key=abcdefg

... will simply get you a G_UNAVAILABLE_ADDRESS noted as :

The geocode for the given address cannot be returned due to legal or contractual reasons.

The solution:

Well, I haven't got that far! .. the Google Maps AJAX system still geocodes UK Postcodes so I would recommend having a play with that. In 'theory' as Mapperz puts it you could use the two together.

IMHO ( and I get the impression Mapperz things the same? ) doing this would violate the terms of use of both APIs and is therefore not a viable long term solution.

Also cited have been the Yahoo! Maps API which I've found to be pretty inaccurate and the Microsoft offering with which I've yet to play.

... watch this space!

1 comment:

Mapperz said...

Try
http://emad.fano.us/blog/?p=277

http://geo.localsearchmaps.com/?street=48+Leicester+Square&city=London &country=UK
returns

map.centerAndZoom(new GPoint(-0.130427, 51.510036), 4);

mapperz
http://mapperz.blogspot.com/