Skip to content

Instantly share code, notes, and snippets.

@tkama
Last active August 18, 2021 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkama/733982cc14383ca1d94901d71dada243 to your computer and use it in GitHub Desktop.
Save tkama/733982cc14383ca1d94901d71dada243 to your computer and use it in GitHub Desktop.
交通事故統計情報の緯度経度変換クエリ
SELECT
*,
ST_Point(
substr( field_56, 1, 3 )
+ substr( field_56, 4, 2 )/60.0
+ substr( field_56, 6 )/3600000.0
,
substr( field_55, 1, 2 )
+ substr( field_55, 3, 2 )/60.0
+ substr( field_55, 5 )/3600000.0
) AS geo
FROM
honhyo_2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment