Finding the Nearest Pub
Learn to use extensions to find the nearest desired location.
We'll cover the following
How far is the nearest pub?
Computing the distance between two given positions on the Earth, expressed as longitude and latitude, is not that easy. It involves knowing how to process the Earth as a sphere and some knowledge of the projection system in which the coordinates are valid. PostgreSQL makes it easy to solve, though, thanks to the earthdistance
extension included in contribs.
Get hands-on with 1400+ tech skills courses.