Insanity
Now that GPS has largely, if not quite completely, standardised the worldwide location of Points of Interest using latitude and longitude that conform to WGS84, new work on such spots is fairly straightforward.
However, there is still the problem of historic data, and dealing with national standards, such the British National Grid Reference System. Add to this the fact that each of these systems varies over time, uses different references, and is updated and maintained independently, and it becomes clear that pinning down one point to “A Point” is not as simple and straightforward as it might first be expected to be. And, you’d better like maths if you want to play with those numbers yourself.
Our site uses lots of maps, since much of its content relates to “things in places”, and this is largely eased by the adoption of WGS84 as the default system for online resources, except of course, those in Britain. Firmly entrenched in the national system, most mapping, especially historic, is unavoidably attached to a Grid Reference. This is no bad thing, and I’m not knocking the system, but its use is restricted, and it has the nasty side effect of existing in multiple formats, for example, Sullom Voe oil terminal could be located as say HU396753 or 439668,1175316. The figures actually represent a square (rather than a point), HU396753 being 100 m per side, HU3975 1 km, and HU39667531 10 m, and so on. It all leads to less than simple rules for converting between systems (and I like simple).
Bear in mind also that although lat/lon pairs do define a point, that point is at the centre of a circle whose radius is determined by the number of decimal places given, and the location could tend to lie anywhere within the circle, although unlike the NGR square, where there is no indication of where in the square a point may lie, the lat/lon circle will tend to be centred on the point. Just don’t count on it being there though.
Fortunately, the conversions have already been turned into applications, and can be located in various formats without too much trouble. Provided you are aware of the errors that can arise with conversion, it’s fairly easy to do the job to any required accuracy level.
I decided to add some of this functionality to the site, as the maps need both lat/lon and NGR. It should have been easy. Our Google maps process JavaScript, and I had the appropriate functions handy to slot in an provide the missing NGR values from the lat/lon values we usually have anyway. Of course, the functions wouldn’t work (I still haven’t worked out why), so I changed over to some PHP code that I knew worked, only to fall into the trap of server-side and client-side processing, and having the converted values in the wrong place, with no easy way to transfer the values back and forth. Punching the PHP numbers into JavaScript was easy, but going back the other way was too much hassle, and also seemed to involve methods I’d politely describe as ‘Chewing gum and string’, rather than disciplined programming.
So, it’s going to be back to the JavaScript functions, and another head-scratching session to figure out what obvious error I’m making that is preventing them from running (beside similar functions), and that’s where the insanity reference comes in, as I used to work with a chap whose conversation depended on stringing little catchphrases together (I don’t think he ever came up with anything original). One went along the lines of “Doing the same thing over and over again, that’s the definition of insanity”.
Having already spent the weekend frustrated by this anomaly, I expect to be making a call for some white-coated personnel to attend soon, as there weren’t any obvious errors in what I was doing, or reported in my error logs or traps, so I may be “Gone for some time”. ![]()












