Hi - thanks for the update - I see now. It works really well. Can I ask why you use only partial data from the API server and pick up most from the Postcode database? Hence when it comes to Lond and Lat it would be best to get accurate data instead of the middle ground downloaded data. Only asking as trying to find the best way to update my DB. I'm willing to pay and therefore trying to find the best method
OK here's a very long answer ....
When I was originally developing this, I tested the output from various online address providers including the PostOffice / IdealPostcodes / GetAddress / Hopeweiser / Postcoder and more.
All online providers charge for the data to cover the licensing costs from the Post office as well as their own costs & of course to make a profit.
I also tried obtaining all the data from Google maps hoping to get the data for free.
In theory you could download all 28 million addresses using their API & I started doing just that. However:
- Google throttles such requests to a 'crawl' after 200 or so results & it would have taken more than one lifetime to get them all (even if I used various proxy addresses)
- not all addresses are available (or at least aren't complete)
- I found larger discrepancies in long/lat data from Google compared to the ONS data (I've been told its deliberately inaccurate due to licensing issues)
So I abandoned Google & returned to paying online providers for the data.
I also found that the quoted longitude/latitude values for postcodes varied slightly for each provider. It wasn't just rounding errors - the figures differed slightly from each other and from that downloaded from the Office for National Statistics (ONS) via
www.doogal.co.uk.
From memory, none of the providers gave exact values for each address - just for the approx centre of that postcode
When I inquired, one provider (GetAddress) informed me the quoted data was representative rather than precise for each postcode!
Not very helpful & one of several reasons why I didn't use them!
I eventually decided on IdealPostcodes as the address provider.
Their API & support are both excellent and their prices were less than most providers.
As a bonus, their long/lat data matches that from ONS (after rounding)
The ONS long/lat data has 6 decimal places,
IdealPostcodes approx 15 d.p. but the data matches extremely closely!
I could use either dataset on my form but decided 6 d.p. would be sufficient
BTW - the datasets from the Post Office are prohibitively expensive unless you are a major business needing many thousands of searches each day.
For small to medium scale use, online providers are much cheaper
I've been working on other projects for the past 2 months but am planning to continue developing the postcode database shortly with a view to selling an updated version via my website. This should be ready mid/late November
This will have additional features including:
a) a postcode search wizard (similar to that on satnavs) - useful if you aren't sure what postcodes exists for each area/district/sector - see screenshot
b) Postal address from UDPRN (unique delivery point reference number as used by delivery drivers) - see screenshot
c) Full address finder for all addresses matching a partial address
e.g. all addresses including '12 High Street'
d) Data for Northern Ireland - not included in the Doogal ONS dataset due to licensing issues - I have the data ready to import
a) & b) are done - c) & d) shouldn't be too difficult to add
If you want an address finder for more than the occasional search, you will have to pay for it in one way or another.
If you are interested in purchasing mine, please email me using the link in my signature line to discuss further
Best wishes