gergelypolonkai-web-jekyll/_posts/2013-03-05-haversine-in-mysql.markdown

18 lines
495 B
Markdown
Raw Normal View History

2014-06-26 16:48:13 +00:00
---
layout: post
title: "Haversine in MySQL"
2016-02-26 15:26:26 +00:00
date: 2013-03-05 12:49:28
2014-06-26 16:48:13 +00:00
permalink: /blog/2013/3/5/haversine-in-mysql
tags: [mysql, development]
published: true
author:
name: Gergely Polonkai
email: gergely@polonkai.eu
---
Just insert it in your database, feed them two Google coordinates, and you get
the distance in kilometres. If you happen to need it in miles, change the
constant `12756.200` in the `RETURN` row to `7922.6` instead.
2017-08-31 09:55:54 +00:00
{% gist bdad1cf2d410853bef35 %}