471,330 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

National grid to lat long conversion

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

Aug 28 '07 #1
3 8503
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/oswe...s/information/
coordinatesystemsinfo/guidecontents/guidea.html

and

http://www.ordnancesurvey.co.uk/oswe...s/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/script...g-gridref.html

Regards,
Carl.

Aug 28 '07 #2
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.
Aug 28 '07 #3
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/script...g-gridref.html

Cheers

Neil

Sep 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by marchab | last post: by
67 posts views Thread by Serve La | last post: by
17 posts views Thread by Magix | last post: by
117 posts views Thread by phil-news-nospam | last post: by
3 posts views Thread by pranab.salian | last post: by
3 posts views Thread by vineetbatta | last post: by
11 posts views Thread by Steven Woody | last post: by
8 posts views Thread by d major | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.