Pushpin Help/Guide
Firstly, l am unsure as to whether this is the correct place to post this and if not could anyone recommend the right forums to help me?
I want to display our member base on MS Maps but the only way l can get the location from our database is based on postcodes. So l need to know how l can convert these postcodes to a usable format to imput into the map. Ideally l want it to read from a csv file or something to that effect so that l can just update this file as and when l want.
So basically l need to know how to convert my database output to a usable and workable format (it currently outputs as a csv document) and then how to implement the map to read this data and diaplay my member base on the map as pinpoints.
Any help will be greatly appreciated.
Luke,
You can use the Virtual Earth VEMap.Find method which accepts postal codes to some extent and gives back a location. This will only work one zip code at a time so it'd be time consuming (and it's not really documented how to search on postal codes) to use Virtual Earth to execute a batch geocode.
What your really looking to do is use the Mappoint Web Service, Microsoft's older mapping product which is capable of batch geocodes (using the Customer Service Site or CustomerDataService API). So using MWS you can upload a .csv (or XML / Delimited .TXT) full of postal codes and the MWS geocoder can interpret them into latitude/longitude pairs. It's best however if your looking into this to take any other questions to the Mappoint Web Service Newsgroup here:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.mappoint.webservice&lang=en&cr=US
The Mappoint Web Service does require licensing if you plan to use it for commercial use or you can sign up for a developer account and "try" it for free.
A lot of customers have used a combination of MWS and VE such that MWS does their geocoding process and the results get plotted onto a VE map.
Hope that helps,
How many have you got, and is it a one off task, or an ongoing task.I have a web based postcode geo-coder that runs as a web service for bulk geo-coding.
Map point is an expensive option if all you want to do is geo-code postcodes.
Duncan Garratt
www.gis-logic.co.uk
Thanks for all your replies!
At present l am looking to develop a proof-of-concept so do not want to pay anything. Once l have the proof and the idea is a proved then we can look at paid for models.
I will be looking to import/refresh the post code data most likely every 2-4 weeks and not on-the-fly so yes, it will be an on-going task. This however will not be the only feature of the map l am looking to implement, this is only for the proof stage.
Duncan, do you have a demo of this code you mentioned?
Any other resources that you can point me in the right direction for l would greatly appreciate as l am not a coder, more a designer / usability expert researching into an idea.
Yes I do
It is a .Net control I have written, which uses Virtual Earth or Google to Geo Code Postcodes, Zip Codes, addresses etc.Not only will it return the Lat/Long, but also convert to British National Grid or 160 other grid systems coordinates.As it is written as a .Net Control in C#, it will run happily in almost any .Net application, without a browser.
For further info please contact me.
http://www.gis-logic.co.uk/contact.htm Luke,
You can actually write your own proof-of-concept using the Mappoint Web Service by signing up for a developer (trial) account which allows limited (10,000/day) transactions but gives you pretty much access to everything you've described. It allows you to try before you buy so your not forced to commit to anything. You can sign up for one here:
https://mappoint-css.live.com/MwsSignUp/Default.aspx
I highly recommend giving this a try as you'll find how easy it will be to handle batch geocodes (MWS can handle hundreds of thousands of records) using the CustomerDataService (automatic uploading) or through the Customer Service Site (manual uploading)
In answer to your original question, about geocoding UK postcodes, there are a number of options out there.
- Use a free service for small batches of postcodes, say less than 500 or so a day.
My own free .Net component will do this! Download URL http://www.gis-logic.co.uk/geokit.zip
- Use Mappoint (Costly if all you want is to geocode postcodes!)
- Buy the postcode data from a PAF Reseller. (Postcode Address File) or from the Post Office direct, and convert the coordinates from BNG to latitude, and longitude. (Updates each month or quarter) Franson produce a highly accurate coordinate conversion library that will convert BNG to Lat/Long, for around £60. (GPS Tools) http://www.franson.com/ (Please note that your client may already have purchased the PAF data, for their address system) I would recommend AFD as a PAF data reseller, as their API, and database, which is DBISAM, is blindingly fast, and compact. http://www.afd.co.uk/ Lastly for this option is how you link the PAF data to your existing systems. You could use .Net or a win32 application of some sort to geocode your data.
If you are using MS SQL as a backend database, then my recommendation would be, is to write an Extended Stored Procedure for the PAF link to your own system, which can be called from a stored procedure for the initial geocoding, and a trigger for inserts or updates to the MS SQL database. This is a great method for implementing geocoding across large enterprise solutions, which is independent of middleware or front-end applications, and when setup, runs itself. To write the extended stored procedure link is about a days programming for a good C++ or Delphi programmer, two at the most.
Additionally if you are looking at direct marketing operations, then you may wish to consider the following: Mail Preference Service, Telephone Preference Service, Fax Preference Service, and the Corporate Preference Service. All of these services can be accessed using Extended Stored Procedures in MSQL.
Please note that in the UK it is now illegal to send unsolicited communications either by post, or electronic means, to people on these lists. This is European law implemented into UK law, and applies to individuals. An individual is classed as a person, sole trader or partnership, in short if the business is not a Limited company, then they are classed as an individual. Any organisation not checking their data against these services, and is sending out unsolicited communications to individuals is breaking the law. This applies to post, telephone calls, faxes, text messages, emails, or any other type of electronic communications. If you are writing for a regulated sector such as financial institutions, or the pharmaceutical industry, and have to comply with the FSA or US food, and drugs administration regulations such as CFR 21 Part 11. (Digital signatures) then this method will aid validation, as all you need to do, is write one set of validation documentation containing the IQ, OQ, PQ.
IQ = Installation Qualification
OQ = Operator Qualification
PQ = Production Qualification
The fundamental question is what volumes in terms of the number of postcodes you have to geo reference at any given time? Option 3 is the most commonly used system in the UK, and is the best answer for large volumes by far. Lastly on this note is how up to date is Microsoft’s data? Option 3 ensures that your postcode data is up to date, which is significant as there are significant amounts of new builds occurring in the next few years, hence new postcodes. Additionally the Post Office can supply gone away data, which is data about redirected mail from an address, this can be significant as mail I believe can be redirected for up to two years.
This requires security certification, for the server room, systems, and full compliance with the Data Protection Act, as the data is confidential. (Re gone away data) BS7799/ISO27001 CRAM is the best tookit to aid security certification their url is http://www.cramm.com/
It should always be worth keeping in mind when dealing with resellers of data, where a system is reliant on a resellers API, and data, the resellers stability regarding their business, and technologies used. In this respect for large clients I have always recommend dealing direct with the Post Office, and additionally for corporate wide licences they are often cheaper. A good example of this is a financial institution I was working for, was paying over £10K per annum to a PAF reseller, when in fact at that time they could have bought the same data for under £4K per annum with a full corporate licence.
On the subject postcode cartographic accuracy, the accuracy can vary from a few metres to half a kilometre or more. This is because a postcode typically represents up to 16 properties, and in remote rural areas, properties can be spread out. There is data that is more accurate from Ordnance Survey but is very expensive. People can get very upset about this, and one solution I have used in the past is to provide coordinates on a mouse move event over the map, so that people can email in with the correct coordinates.
I hope this is of help.
Duncan Garratt
http://www.gis-logic.co.uk/