On Wed, 2007-03-14 at 09:49 +0000, Dick Turpin wrote:
I had a look, and it sort-of worked :-) I got the following errors
repeated many times:
Notice: Undefined offset: 6 in /var/www/html/lugfinder/index.php on line
31
Notice: Undefined offset: 7 in /var/www/html/lugfinder/index.php on line
32
and the postcode entry box had this in it:
ST61LJBNOTICEBUNDEFINEDVARIABLEPOSTCODEINBVARWWWHTMLLUGFINDERINDEXPHPBONLINEB62BBR
(ST6 1LJ is the postcode that I entered)
Can anyone give me some guidance on how I go about getting the
long/lat info? I had a look on google earth which gives some but the
numbers don't look long enough compared to the ones Stewart has
inputted.
Geo-coding (converting lat/lon to postcodes & vice-versa) is currently a
royal pain in the arse in the UK. The Royal Mail owns the data, and
charges a lot of money to licence it.
However, there are free alternatives: Free the Postcode [1] and NPE Maps
[2]. Both are collecting postcode data. The first one is more precise
(since it uses GPS units) but has less data.
I'd say that for your purposes, all you really need is the prefix (eg
ST6, ST5, etc). NPE currently has 88% of them, and FtP probably has some
that NPE doesn't, so I imagine that a combination of both sets of data
would be enough for your purposes.
Different sources will give different degrees of precision for lat/lon
data, so it's not unusual to have data from different sources having
different lengths.
Russ
[1]
http://www.freethepostcode.org/
[2]
http://www.npemap.org.uk/