Converting between latitude and longitude and metres (or OSGB) - Urgent


I am new to GIS and I desperately need some help.

I am creating a very basic tracking application and I use a GPS receiver which produces latitude and longitude coordinates.

I am using Navteq streets data and this uses the following projection:

datum: osgb_1936
ellipsoid - airy

I need to convert my latitude and longitude coordinates into the appropriate format for this map. I do not know what format this is. I have tried converting to UTM and that does not give me the right answer.

When i view a location on multimap this shows you the latitude and longitude coordinates for the location and some x,y coordinates. An example is shown below...

Location: United Kingdom
Grid ref: TA000000 Postcode district: DN21 4xx (map centre)
X: 500000m Y: 400000m
Lat: 53:29:14N (53.4872) Lon: 0:29:40W (-0.4944)
Web Address: 

I need to be able to convert my latitude and longitude coordinates into those x, y values in meters as that is what my map or my map software seems to use. I do not understand why but when i plot those x and y values on my map they come up at the right place.

Please can you tell me what system of projection those x,y coordinates are based on. Please can you also tell me a resource for converting between the two programmatically. I need the conversion to be very accurate. I am willing to pay. I need to be able to make the conversion from a program.

Thank-you very much for your help. This is an urgent problem.


Who is Participating?
PROJ.4 is one of the most widely used and accurate projection libraries I know about.  For an introduction to using it with VB see

The proj library itself is obtainable from

hope this helps.

Jaime OlivaresSoftware ArchitectCommented:
First analysis:
X: 500000m Y: 400000m appear to be the coordinates of center of map, and not Lat53.4872,Lon0.4944 (near)

Grid ref uses 3 first digits of x,y coordinates, by example, for a coordinate X: 505000m Y: 404000m,
grid = TA 050 040

Jaime OlivaresSoftware ArchitectCommented:
sorry, it is from 2nd to 4th digits
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Jaime OlivaresSoftware ArchitectCommented:
Second analysis:
first two letters on grid are related to first digit on x/y coordinate, by example, for a coordinate 499000m Y: 399000m
grid = SK990990
Jaime OlivaresSoftware ArchitectCommented:
There are some useful information in the internet like:

But I don't have clear what do you want to do:
You receive your data from GPS in latitude/longitude format
You want to display it in some format, but I think you don't need to convert it to X,Y, just to change datum from stardard WGS-84 (what GPS output) to OSGB-1936 (latitude/longitude)

Jaime OlivaresSoftware ArchitectCommented:
There are sever datum conversion formulas in the internet.
What you need are the correct indexes values for OSGB-1936. Them are:

SPHEROID = Airy 1830
Equatorial radius = 6377563.396,
Flattening = 1 / 299.3249646
Prime meridian = 0
0.0174532925199433 degrees
EPSG Code = 4278

Or, described with reference to WGS-84
Ellipsoid, Delta a, Delta f (* 10^4), Delta X, Delta Y, Delta Z.
Airy, 573.604, 0.11960023, +375, -111, +431
Jaime OlivaresSoftware ArchitectCommented:
Well, have found a function in Java with standard Molodensky equation:

But first, I want to know, how do you want to translate your data (from datum x to datum y)
Jaime OlivaresSoftware ArchitectCommented:
andiejeAuthor Commented:
Hello Jaime

Thank you very much for your replies. However, I am not sure I understand them. In fact, I am not sure I understand my own problem but I am trying!!

I know that I have a GPS receiver which gives me latitide and longitude values. I know that these values are not in the same format/projection (i don't know what the correct term is) as my map.

The x / y values that multimap shows seem to be correct for my map. I believe I need to convert my gps latitude and longitude co-ordinates into ordinance survey grid coordinates and that these look like the x/y values on multimap.

I do not know what a datum is. I know that gps uses WGS-84 and OS uses OSGB-1936.

I need to be able to convert very accurately from gps to ordinance survey. I have found this link which tells me I need to use OSTNO2

I want to make sure that I am performing the right conversion.

I am using GPS data and i want to be able to plot points on Navteq streets data which uses OCGB-1936. I need to find some software/library to convert my latitide and longitude values so they can be plotted on my map.

I hope that is clearer.

Jaime OlivaresSoftware ArchitectCommented:
>The x / y values that multimap shows seem to be correct for my map. I believe I need to convert my gps latitude
> and longitude co-ordinates into ordinance survey grid coordinates and that these look like the x/y values on
> multimap.
This is not necessarily true. Maybe your map application shows X,Y values, but, how do you pass information to it? X/Y or lat/long? do you have a sample code portion?

>I do not know what a datum is. I know that gps uses WGS-84 and OS uses OSGB-1936
In plain words, there are little difference (some meters) on how to name the position of an object in the earth, that depends on which values you have considered to measure de earth (equatiorial radius, flattening factor, etc). Every group of coefficients is called a datum. Today almost use a unique datum valid for all the world: WGS-84, but once upon a time, every country had its own datum.

So, please give me some details on your library's functions to help you better.
andiejeAuthor Commented:

I use aspmap. I simply create a map object and then create a callout object which basically puts a little call out graphic at a certain point on the map. I have to set the x/y coordinates of the callout. If i set the x/y coordinates to be the values to be the values I get from multimap it puts the callout at the right place on the map.

Set Map = Server.CreateObject("AspMap.Map")
Set Point = Server.CreateObject("AspMap.Point")
point.x = 387900
point.y = 341500
callout.X = point.x
callout.Y = point.y
callout.Text = "You are here"

If i use these coordinates it puts a callout on the map where i want it to (somewhere in stoke on trent). The gps latitude and longitude that my receiver gives is approximately 52n and -2w. I need to know how to get from the latitude and longitude to the x and y values as shown above and as used on multimap.

Jaime OlivaresSoftware ArchitectCommented:
Well your requirement is not common, every GIS system I know accepts latitude/longitude. Are you sure there is not a way to input lat/long instead of OSGB grid coordinates? Please review your documentation.

Anyway, it is really hard to find in the internet some algorithms to transform WGS Lat/Long to OSGB Grid (x/y)
I have found this:

But it requires that Lat/Lon datum is OSGB and not WGS-84, so you have to:
1)Make datum transformation, from WGS-84 to OSGB (Airy) datum. Data will be still lat/lon
2)Then, these lat/lon values will be the input for this algoritm that will convert to OSGB Grid coordinates
Here is a ready made program to test second part.

So review your documentation to avoid all these headache.

BTW, what software are you using? I know data is from NavTeq, but which ASP component, maybe ASPMap from VDS Technologies?
andiejeAuthor Commented:

I am using ASPMap fron VDS. I seem to have found one way to solve the problem.

My original navteq maps were in OSGB projection. I now have copies of the maps in WGS-84 projection and they allow me to plot latitude and longitude coordinates.

Do you know ASP Map. I would like to be able to simply plot my latitude and longitude values on a map in OSGB projection but it does not work. As I said, it works fine when my map is in WGS-84 but not OSGB

Jaime OlivaresSoftware ArchitectCommented:
Really have never worked with it. But the solution is in my previous post, if you want to do all these, just advice, but as I have mentioned, it is a hard job.
andiejeAuthor Commented:
Have you ever worked with MapServer. I have just posted another question actually because I need to choose between and mapserver.

Jaime OlivaresSoftware ArchitectCommented:
No sorry, I develop my own GIS applications, because are for military use, just have worked with mapinfo/arcview, and many navigational systems.
check out this link.

the basic math behind the conversion of latitudes and longitudes in to linear distance is also available in the link.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.