Geohack performs incorrect conversion of lat/long to Ordnance Survey grid reference

Issue #13 new
Hike395 created an issue

Some UK maps (e.g., streetmap.co.uk) require OS grid references, rather than lat/long coordinates. Geohack attempts to convert lat/long to OS grid refs for this, but there is a bug. The current code assumes that the lat/long are given in a geographic datum dating to 1936 (OSGB36). This causes conversion error of tens of meters. Instead, Geohack needs to assume the lat/long are given in WGS84, and use the Helmert transformation to convert to OSGB36.

Based on code from de:Benutzer:Telford and en:User:RHaworth, I added Helmert transformation to the Geohack code. I have tested this on my own client, but have been unable to generate a pull request. I’ve attached the proposed modified files to fix this issue.

Comments (2)

  1. Log in to comment