National grid to lat long conversion

A

Astley.lejasper

Hi,

I have a load of British National Grid references that I want to
convert to decimal degrees so I can create a google KML file. Does
anyone know of a module to do this?

I've looked at http://pygps.org/#LatLongUTMconversion but am not
really up to speed with projections and all this other mapping stuff.

I want to take something like

x = 417512 y = 315098 (SK 17570 15100)

and convert it to a google compatible decimal degrees

lat: 52.733255N Long: -1.741239

Any help would be great
 
D

Dennis Lee Bieber

I've looked at http://pygps.org/#LatLongUTMconversion but am not
really up to speed with projections and all this other mapping stuff.
Unfortunately, that's the stuff you will need... Including reference
points for the datums used.

The datum defines the shape of the earth, which effects the
translation from a spherical "latitude" to an oblate one (latitude is
commonly taken to be the perpendicular at the surface of the earth, but
on an oblate earth, that doesn't intersect the center).

Similarly, you need to know where (0, 0) is defined relative to each
system.
I want to take something like

x = 417512 y = 315098 (SK 17570 15100)

and convert it to a google compatible decimal degrees

Quick&Dirty:
Get a decent GPS unit, configure it for your grid/datum... Enter the
coordinates as a waypoint... reconfigure the units to the desired output
grid/datum... display the waypoint properties...

Don't know if you can find one that lets you do the configuring
remotely -- you can use a waypoint manager to enter/retrieve them, but
may not be able to change display mode through it.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
C

Carl Drinkwater | 29degrees

I have a load of British National Grid references that I want to
convert to decimal degrees so I can create a google KML file. Does
anyone know of a module to do this?

If there isn't a module available, you could roll your own. The
equations are to be found at :

http://www.ordnancesurvey.co.uk/oswebsite/gps/docs/
convertingcoordinatesEN.pdf

They shouldn't be too hard to Pythonise.

Regards,
Carl.
 
C

Carl Drinkwater | 29degrees

I have a load of British National Grid references that I want to
convert to decimal degrees so I can create a google KML file. Does
anyone know of a module to do this?

I should probably have added that you can get a number of the
variables you start off with from :

http://www.ordnancesurvey.co.uk/oswebsite/gps/information/
coordinatesystemsinfo/guidecontents/guidea.html

and

http://www.ordnancesurvey.co.uk/oswebsite/gps/information/
coordinatesystemsinfo/guidecontents/index.html

might be useful to read around the subject. It might look complex,
but don't let it put you off. Also, you can get JavaScript code to
do just this from the URL below, which would be a good starting point.

http://www.movable-type.co.uk/scripts/latlong-gridref.html

Regards,
Carl.
 
A

Astley Le Jasper

Hi,

I was a bit limited with time so in the end used an online service
with an API which is great for the limited number of look-ups I
needed. It can be found at:

http://www.nearby.org.uk/

It was also very useful for site for other conversions and lookups.

I manage to find a couple of other examples in other languages which I
might have used as the basis for some pythonification.

PHP
- http://www.megalithia.com/search/llfuncshighlight.php
- http://www.jstott.me.uk/phpcoord/

Javascript
- http://www.movable-type.co.uk/scripts/latlong-gridref.html

Cheers

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top