Geographic coordinate values format conversion to DD (Decimal Degrees) format

From: Allan Kamau <kamauallan(at)gmail(dot)com>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Geographic coordinate values format conversion to DD (Decimal Degrees) format
Date: 2018-12-04 20:36:03
Message-ID: CAF3N6oSG8W+e5QL+h5YJyf3L+ZtuQMz4JU0uzoV5=GqfRjBKMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have data that contains geographic coordinate values in various
geographic coordinate system formats such as "degrees minutes seconds" and
"degrees decimal minutes".
I would like to convert these geographic coordinate values into decimal
degrees format.
Does PostgreSQL (more specifically PostGIS) have functions for these types
of conversions.

Below are examples of the geographic coordinates values I have coupled with
the resulting decimal degrees values.
39.529053 N 107.772406 W= 39.5290530°, -107.7724060°
27.485973 S 153.190699 E= -27.4859730°, 153.1906990°
30°32’39” N, 91°07’36” E= 30.5441667°, 091.1266667°
27.485973 S 153.190699 E= -27.4859730°, 153.1906990°
1¡20'1N 103¡45'15E= 01.3336111°, 103.7541667°
S 20 10.8035165 W 176 36.074496= -20.1800586°, -176.6012416°

The "°" sign in the results is optional.

Allan.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2018-12-04 20:38:07 Re: simple division
Previous Message Martin Mueller 2018-12-04 20:29:38 simple division