Basically, what I'm doing is plotting a radius around a point on a map, which is defined by the distance between two points on the map given their latitudes and longitudes. To achieve this I'm using the Haversine formula (spherical trigonometry). This equation is important in navigation, it gives great-circle distances between two points on a sphere from their longitudes and latitudes.

Included in the post is the code for three different implementations - PHP, Python and SQL, all using that same formula.

]]>