[GIS] Calculation to convert db data to Lat/Lng degrees

coordinatesdatadatabasegps

In a database I have the following Lat/Lng data. I wish to convert it to a readable format.

177514245:34726053  =>  S 32 7.3947, E 115 51.4245
177513828:34726948  =>  S 32 7.3052, E 115 51.3828
177508930:34829424  =>  S 31 57.0576, E 115 50.8930
177508084:34829842  =>  S 31 57.0158, E 115 50.8084
177504234:34831118  =>  S 31 56.8882, E 115 50.4234
177504474:34831039  =>  S 31 56.8961, E 115 50.4474
177507746:34829955  =>  S 31 57.0045, E 115 50.7746
177504623:34830989  =>  S 31 56.9011, E 115 50.4623
177507014:34830191  =>  S 31 56.9809, E 115 50.7014
177506702:34830295  =>  S 31 56.9705, E 115 50.6702

I was given the formula for converting the db data o the readable format but lost the information after a hhd failure.

The number before the ':' becomes the Lng and the second the Lat.
I don't want to through any red herrings into confuse anyone, but this is what I can remember.

Apparently this is a common format.
The raw Lat and Lng number was subtracted by a constant. I can't remember if they were the same, and then divided to give degrees and minutes.

But take that all with a grain of salt.

Thanks in advance,
Simon

  1. I have no idea. The data in the db is the 18 varchar figure. The OEM software represents the coordinates in the format as shown above.

  2. Have been Google ing it for 3 days and have found nothing. Can't remember the site I posted the question on about 3 or 4 years ago so I could go back and read it again.
    At the time I was told it was a pretty common method of storing coordinates.

  3. The db is sqlite, I use RAD Studio.

The OEM GUI that displays the data doesn't allow me to access the data through it. But I can read/write the db itself and I wish to map the coordinates. Hence the need to be able to make sense of how:

177514245:34726053

becomes

S 32 7.3947, E 115 51.4245

Best Answer

This way it works:

For Easting, subtract 108 000 000 from lng, and divide by 600 000

For Northing, subtract 54 000 000 from lat, and divide by 600 000:

lng         lat           E           N
177514245   34726053    115,857075  -32,123245
177513828   34726948    115,856380  -32,121753
177508930   34829424    115,848217  -31,950960
177508084   34829842    115,846807  -31,950263
177504234   34831118    115,840390  -31,948137
177504474   34831039    115,840790  -31,948268
177507746   34829955    115,846243  -31,950075
177504623   34830989    115,841038  -31,948352
177507014   34830191    115,845023  -31,949682
177506702   34830295    115,844503  -31,949508

First dividing by 600 000 and then subtracting 180 or 90 should do the same.

You get decimal degrees. For the values in your table, you have to convert them to decimal minutes by multiplying the fractional part with 60.

Related Question