May 2019
Beginner
170 pages
4h 9m
English
Manhattan distance is a distance metric inspired by the near rectangular street block design in Manhattan. The distance between two locations is calculated as the sum of the straight-line distance along the x axis and the straight-line distance along the y axis:

Here, the x axis distance (d1) is nothing but the difference in longitude, while the y axis distance (d2) is the Haversine distance of the difference in latitude. Before we proceed with our calculation, there's just one small geographical subtlety that we have to take care of, and that is the angle made by the north-south running streets of New York to the true ...
Read now
Unlock full access