Manhattan distance (adjusted)
arthurpaulino opened this issue · comments
For distances within cities, the Manhattan distance may be a more accurate approximation for trajectory lengths due to the rectangular shapes of the blocks.
There's a challenge, though: the streets may not be aligned with the x/y axes and the Manhattan distance would be distorted if computed without applying a rotation first.
Example: New York City
Notice how the components of the Manhattan distance would match the distance across the streets most of the times if we applied a counter-clockwise rotation of approximately 30º on the image.
This could be done if the user provided a base vector, which indicates the direction of a straight line on the map. As default, the base vector could be simply (0, 1)
(north).