Is it possible to query a UK Postcode Database that is available offline and gather Geo Coordinates with JavaScript?
I am under the impression that the database is too vast to do this without online/local database management.
Has anyone found a solution for this problem?
Thanks.
EDIT:
The data will need to be used by a private organisation and does not need to be either hugely accurate nor updated regularly. (Basically the user needs to find the nearest location to their specific postcode - < 10 locations). I Think my concern is seeing the 550+mb databases.
It also needs to work purely in the browser offline using JavaScript. JSON format would be preferred.
This is possible and there are few choices but first a few questions.
It is a large amount of data, but is manageable. The practicalities depend more upon the amount of time and money you want to invest.
There are two approaches:
1) Build your own
If needing premise level coordinates, you'll need to get a copy of the postcode file from the Royal Mail here and depending upon your level of accuracy you'll then need to also grab a supply of coordinate information from someone such as Ordnance Survey.
Load and link together the supplies into some sort of database or other store you are comfortable working in and make sure this process is easily repeatable once a month when the data comes through.
For just postcode level, I think the Code-point Open data should be good for you. If you are not worried about individual premises and postcode level is good enough. That comes to about 150MB in CSV files but you can get it a lot smaller than that by just storing the data you need.
The next step and develop a look up mechanism. The quality of your look up will depend upon your use case. If you are just after a rough location from the postcode this will be simpler than if you are after it down to the nearest cm and need a full premise address.
2) Go third party.
There are many companies around that can do this for you. My company - Experian Data Quality - provide tools to allow you to do this offline as a library or SOAP based service.
Once integrated, they will allow your users to quickly and easily find their correct address and then in the same call enhance the address with location (and many other types) of information.
This will cope with typos, data updates etc. Fill in the form or give us a call for a demo if sounds useful http://www.qas.co.uk/solutions/data-quality-software/data-capture/address-checker.htm
There is sample integration code available that will allow you to hook it into your website with JavaScript.