Converting from UK Grid Ref to WGS84 (for Google maps API) #35
-
Hi,
It was the lat and lng I was most interested in. The accuracy seemed to be very good - within a few meters. With version 4, i'm doing something like this:
This works, but i'd say the result (for mid-Wales, UK) is about 1-200meters out. Any suggestions what i'm doing wrong? Am I using the wrong CRS or am I missing a conversion step? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello You're going from OSGB36 (National Grid)...to OSGB36 with that code. I think you probably want Side note: Out of the box v4 will use a Helmert transform for this (like v3 did). In the next few days (next release), it will be able to use the definitive OSTN15 transform instead if |
Beta Was this translation helpful? Give feedback.
Hello
You're going from OSGB36 (National Grid)...to OSGB36 with that code. I think you probably want
$to_crs = Geographic2D::fromSRID(Geographic2D::EPSG_WGS84);
Side note: Out of the box v4 will use a Helmert transform for this (like v3 did). In the next few days (next release), it will be able to use the definitive OSTN15 transform instead if
php-coord/datapack-europe
is also installed.