[GIS] Converting GPS Positions to Google Maps

google mapsgpsmercatorwgs84

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?

Best Answer

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