Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

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

Hello

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: www.multimap.com/map/browse.cgi?lat=53.4872&lon=-0.4944&scale=2000000&icon=x 

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 vb.net program.

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

Thanks
Andrea

Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

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

sorry, it is from 2nd to 4th digits
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
There are some useful information in the internet like:
http://www.36haroldstreet.freeserve.co.uk/convert.htm
http://www.bangor.ac.uk/is/iss025/osgbfaq.htm

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)

continues....
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
Well, have found a function in Java with standard Molodensky equation:
http://home.hiwaay.net/~taylorc/bookshelf/math-science/geodesy/datum/transform/molodensky/

But first, I want to know, how do you want to translate your data (from datum x to datum y)
Avatar of andieje
andieje

ASKER

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

http://www.gps.gov.uk/gpssurveying.asp

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.

Thanks
Andrea
>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.
Avatar of andieje

ASKER

Hello

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.

Thank
SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andieje

ASKER

Hello

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

Andrea
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.
Avatar of andieje

ASKER

Have you ever worked with MapServer. I have just posted another question actually because I need to choose between asp.map and mapserver.

No sorry, I develop my own GIS applications, because are for military use, just have worked with mapinfo/arcview, and many navigational systems.
Hi,
check out this link.
http://jan.ucc.nau.edu/~cvm/latlongdist.html

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

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial