Postcode data with lat/long
Postcode data with lat/long
Author
Discussion

pontypool

Original Poster:

615 posts

270 months

Monday 6th July 2009
quotequote all
Does anyone know where I can buy a list of all UK postcodes that has the relevant lat/long references?

I have found sites selling the data based on first half of the postcode, but for the application I have in mind need to be more accurate and get data for full postcode with second half as well?

Plotloss

67,280 posts

301 months

Monday 6th July 2009
quotequote all
You need more than the post code.

You need the DPS (delivery point suffix) to get Lat/Long as far as I remember and its been a while.

The only thing with that used to be the full PAF file from the Royal Mail direct.

cs02rm0

13,966 posts

222 months

Monday 6th July 2009
quotequote all
Yeah you have to pay for the second half, the first half is released free I believe.

Royal Mail IIRC, or whatever they're called these days.

pontypool

Original Poster:

615 posts

270 months

Monday 6th July 2009
quotequote all
Happy to pay whatever it is for the full postcode listing, but then is there somewhere else I need to go to get the assocaited lat/long co-ordinates?


Plotloss

67,280 posts

301 months

Monday 6th July 2009
quotequote all
http://www.freemaptools.com/download-uk-postcode-l...

That gives you the LAT/LONG for an outcode, which isnt very specific.

If you need the lat/long for a specific outcode, incode and DPS then thats going to be pretty involved as you need PAF and PIF and then another data source

It is a while since I've played with any of this stuff though, years in fact.

jbswagger

965 posts

232 months

Monday 6th July 2009
quotequote all
From what I remember of doing GIS at uni a postcode won't always refer to a specific place (lat & long). A full post code if I remember correctly is shared by on average 16 delivery units (seperate addresses), in rural areas these could all over the place although in urban areas it is more accurate, even down to a specific building

selwonk

2,143 posts

256 months

Monday 6th July 2009
quotequote all
If you are happy to pay for the full PAF data, someone like PostcodeAnywhere will be able to return the lat/long too:

http://www.PostcodeAnywhere.co.uk

eharding

14,648 posts

315 months

Monday 6th July 2009
quotequote all
Google provide a Javascript API google.search.Search (previously called GlocalSearch) which performs a decent geocoding of UK postcodes - take a look at the following:

http://code.google.com/apis/ajaxsearch/documentati...

You could test the accuracy of the lookup simply by going to http://maps.google.co.uk and keying in a UK postcode in the search criteria - as far as I know, Google Maps uses the same underlying lookup.





miniman

30,237 posts

293 months

Monday 6th July 2009
quotequote all
eharding said:
Google provide a Javascript API google.search.Search (previously called GlocalSearch) which performs a decent geocoding of UK postcodes - take a look at the following:

http://code.google.com/apis/ajaxsearch/documentati...

You could test the accuracy of the lookup simply by going to http://maps.google.co.uk and keying in a UK postcode in the search criteria - as far as I know, Google Maps uses the same underlying lookup.
You have to be a little careful, though, as technically you aren't "supposed" to store any geocoding data you receive. In other words you can use the API to look up a lat / long, but you aren't "supposed" to store that data in such a way as to create your own PAF.

PetrolTed

34,468 posts

334 months

Monday 6th July 2009
quotequote all
There is 'open' data these days:

http://en.wikipedia.org/wiki/OpenStreetMap

miniman

30,237 posts

293 months

Monday 6th July 2009
quotequote all
PetrolTed said:
There is 'open' data these days:

http://en.wikipedia.org/wiki/OpenStreetMap
Cool. But where can one query lon/lat for postcodes? There seems to be data at freethepostcode.org but it doesn't look fully-formed enough to use for commercial requirements.

PetrolTed

34,468 posts

334 months

PetrolTed

34,468 posts

334 months

Monday 6th July 2009
quotequote all

miniman

30,237 posts

293 months

Monday 6th July 2009
quotequote all
Nice one, thanks.

pontypool

Original Poster:

615 posts

270 months

Tuesday 7th July 2009
quotequote all
just got back to the office and am about to check all these various links out, so thanks to all and will let you know what we end up with (and if you are very lucky you too can soon find a local tennis court using your postcode!)

stevieb

5,253 posts

298 months

Tuesday 7th July 2009
quotequote all
I dont know if you need it for home or business use. But i currently get my Postcode data from Map Mechanics.

http://www.mapmechanics.com/digital-mapping-data/u...

We currently have these products:-
Unit postcodes with delivery points, UK
&
Full Postcode Address File, premise level, UK

I tried looking for freebies and using Java to automate the lookup via free post code lookup sites but is was getting to complicated, we ended up buying the complete data set.

Also, most of the data will be provided in OSGB coordinates, these will have to be converted to Long/Lat, but this can be automated in excel or Access. There are a few free VBA modules you can download to do this.

Steve

pontypool

Original Poster:

615 posts

270 months

Friday 10th July 2009
quotequote all
ok, I am now in possesion of 1.7 million postcodes and their relevant lat/long as well as grid co-ordinates.

If anyone else needs it i found these guys from one of the threads on a forum link above http://www.xyzmaps.com/

Sent them nigh on £3k and a few mins later popped a link to download fully licensed set of data. Job Done.

PetrolTed

34,468 posts

334 months

Monday 20th July 2009
quotequote all
I've been probing further into this stuff and found that the OpenStreetMap even has a gazetteer which appears to be accurate to postcode level too.

It's available via an RPC call and returns data as XML. e.g.

http://gazetteer.openstreetmap.org/namefinder/sear...

It's got a few glitches and can be quite slow but depending on your application it could be useful, particularly as the licence allows you to use it as you like.

Simpo Two

93,103 posts

296 months

Tuesday 21st July 2009
quotequote all
Please help an idiot. I can understand why you'd want addresses and postcodes for mailshots, but what on earth do you do with everybody's latitude and longitude? Missile strikes?

miniman

30,237 posts

293 months

Tuesday 21st July 2009
quotequote all
Simpo Two said:
Please help an idiot. I can understand why you'd want addresses and postcodes for mailshots, but what on earth do you do with everybody's latitude and longitude? Missile strikes?
If you want to place a "pin" onto a Google Map (e.g. PH does it where you can view members locations on a map) then you have to pass it the long / lat data rather than a postcode.