[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 20196
  • Last Modified:

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

0
andieje
Asked:
andieje
2 Solutions
 
Jaime OlivaresCommented:
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

0
 
Jaime OlivaresCommented:
sorry, it is from 2nd to 4th digits
0
 
Jaime OlivaresCommented:
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
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jaime OlivaresCommented:
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....
0
 
Jaime OlivaresCommented:
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
0
 
Jaime OlivaresCommented:
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)
0
 
Jaime OlivaresCommented:
0
 
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

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
0
 
Jaime OlivaresCommented:
>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.
0
 
andiejeAuthor Commented:
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
0
 
Jaime OlivaresCommented:
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:
http://www.bangor.ac.uk/is/iss025/osgb3source.htm

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.
http://www.russ-hore.co.uk/osgb/index.php

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?
0
 
andiejeAuthor Commented:
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
0
 
Jaime OlivaresCommented:
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.
0
 
andiejeAuthor Commented:
Have you ever worked with MapServer. I have just posted another question actually because I need to choose between asp.map and mapserver.

0
 
Jaime OlivaresCommented:
No sorry, I develop my own GIS applications, because are for military use, just have worked with mapinfo/arcview, and many navigational systems.
0
 
madhu3nCommented:
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.

0
 
maphewCommented:
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 http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/norden03/presentation.html

The proj library itself is obtainable from http://proj.maptools.org/

hope this helps.

--matt
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now