Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a set of GPS-coordinates in a database, which I want to compare to a coordinate supplied by the html5 location API.

My coordinates look like this:

            <WGS84Coordinates>
                <Longitude>180325E</Longitude>
                <Latitude>591947N</Latitude>
            </WGS84Coordinates>

This is from Stockholm Central Station. If I enter these coordinates into google maps, I end up southwest of Stockholm in Google Maps. If I enter coordinates supplied by the html5 location API, I end up right next to Stockholm Central Station in Google Maps (which is my correct location).

The same pattern applies to all the coordinates I supply form my GPS-coordinate-database.

What is going on here? I've read that Google Maps uses WGS84, as does the coordinates from my database. I've also read that the html5 position API uses WGS84. Also, I've read something about Google Maps using Mercator Projection. I am unsure which projection the coordinates from the database has.

Ideally, I'd want a converter to convert between the two formats.

Any ideas?

share|improve this question
2  
Your coordinates are of the type degrees-minutes-seconds. Try pasting this in Gmaps search 59 19'47" 18 03'25", it'll take you right to the central station. Use the formula @AndreJoost posted to convert all your data to decimal degrees. In the above example, 59 is your degrees, 19 is minutes and 47 is seconds. –  Martin Jun 17 at 7:40
add comment

1 Answer 1

up vote 4 down vote accepted

You have to be sure whether the coordinates are in degree-minute-second or decimal degrees.

From the sample you gave, it is not easily detectable.

If you need decimal degrees, you have to calculate degrees + minutes / 60 + seconds / 3600. This can be done easy with any spreadsheeet calculation.

Here is your test point, once taken as decimal degrees, and once transformed from dms to decimal:

enter image description here

share|improve this answer
    
Unfortunatly I don't know whether they are degree-minute-second or decimal degrees. Is there a way for me to backwards engineer and find out? I'm not sure I follow how to to the degrees + minutes calculation. What are "minutes" and "seconds" in this example? –  Soroush Hakami Jun 17 at 7:28
    
If it is decimal, the first two are before the decimal point. If it is degminsec, the first two are degrees, three and four minutes, and the last two seconds. –  Andre Joost Jun 17 at 7:56
1  
if you don't know precisely where your points should be, but if you have a large number of points, check the last two pairs of number. if they never exceed 59, then the probability that you have DDMMSS is very high. (note that DDMM.mm also exist, so you should check both pairs –  radouxju Jun 17 at 8:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.