473,698 Members | 2,942 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8588
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/
coordinatesyste msinfo/guidecontents/guidea.html

and

http://www.ordnancesurvey.co.uk/oswe...s/information/
coordinatesyste msinfo/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/
convertingcoord inatesEN.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1676
by: marchab | last post by:
Hallo! I've got a problem with INSERT statment which includes any special (national) character. It ends with SQL0104 error. It's strange because isql utility executes the same statement without any problem. Below I attached details of my configuration >locale
67
3872
by: Serve La | last post by:
I asked if MS has any plans to support C99 in the next VisualC. This is their answer. I think we should whine more :-) We feel that C++ addresses this space sufficiently. In general we have no plans to add any C99 features that duplicate functionality in C++ or conflict with it. That also matches the feedback we have gotten from customers. In fact the non interest in C99 is the clearest feedback I have seen of any issue. The
17
1479
by: Magix | last post by:
Hi, Let say I have following function: long number(void) { long sum = 421; return (sum*sum); }
117
18520
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore for using DIV. There are other disadvantages to not using TABLE/TR/TD, such as the lack of ability...
3
7097
by: pranab.salian | last post by:
I need to compile some newer code in Borland TC 3.0. Here's the snippet.. /* CODE */ /* // --------------------------------------------------------------- // Shift register implementation: Message is divided by G. In the // reminder, stored in the syndrome register S, are the redundant // bits. // ---------------------------------------------------------------
3
9572
by: vineetbatta | last post by:
I have Custom Data class which stores data about single customer and then i store that customer objects in arraylist as shown below. Customer custdata = null; // Custom Data class for 1 customer data. ArrayList ar = new ArrayList(); // To store more than one customer object. for (int x = 0; x < 30; x++) { custdata = new Customer();
6
4205
by: CFAN | last post by:
Here is a example of double-type-conversion char * __cdecl _itoa ( int val, char *buf, int radix ) { if (radix == 10 && val < 0) xtoa((unsigned long)val, buf, radix, 1); else
11
2662
by: Steven Woody | last post by:
long i = nnn; long j; double d; d = i; j = ( long )d; in this case, i == j ? thanks.
8
14145
by: d major | last post by:
I was very puzzled about the conversion between float and long, I cann't understand why a long val can convert to a float, as the below codes show: typedef unsigned long u_long; float val = 3.14159; u_long nw_val = *((u_long *) &val); than the nw_val equal to 1078530000, I made such conversion: float d_val = *((float*)&nw_val);
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8611
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8904
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.