Thursday 15 May 2008

Geocoding ain't so easy!

My redesign of Cottages-4-Holidays hit a stumbling block last night when I tested how accurate the postcode to longitude & latitude file worked. I downloaded the file a few weeks ago, when I first put my ideas together, and was really excited about what I'd found.

But when I tested it, none of the properties I expected to see where there. I'd test loaded a popular tourist attraction and looked at when properties I was claiming were close by. I checked these against the list that mentioned the place in the advert and they weren't included. Then I looked at where the properties were - and they were well off!

It doesn't affect the main build of the site, I can continue there. But it does affect how quickly I can load up tourist information. The problem is that all longitudes and latitudes were being rounded down to the previous whole number. So -1.988 etc become -1. Given at the same time 52.898 or whatever became 52, that was appearing as a fiar movement across the country.

The cottages themselves have geocoding supplied by the merchant, so I will trust them. But my own geocoding needs looking at. I have basically 2 choices:

First - the quickest choice is to again guess the geocoding based on the postcode - look for cottages on the database with similar postcodes and assume the same geocoding holds true. Probably a lot less effort, but not as accurate and what when there's no property with a matching postcode?

Second - every time I find somewhere to add, which will be quite a lot at first, I need to use a tool to geocode the postcode. Much more accurate, but it's adding time to the process and that will mean that in the end I get fed up quicker!

I suppose if the stats show that the site is starting to work again then I'll find the time and energy to put into lots of properly geocoded tourist attractions. But I was going to write an admin function to load new ones and get my wife to give me a hand! She'll just have to learn how to geocode as well!

No comments: