You are viewing a single comment's thread. Return to all comments →
The Manhattan Distance formula for two points (x1, y1) and (x2, y2) is: DManhattan = (x1−x2) + (y1−y2)
Applying this to points P1(a, b) and P2(c, d): DManhattan=(a−c) + (b−d)
SELECT ROUND(ABS((MIN(LAT_N) - MAX(LAT_N))) + ABS((MIN(LONG_W) - MAX(LONG_W))), 4) FROM station
N.B ABS() (absolute value) function, is crucial for Manhattan distance.
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 18
You are viewing a single comment's thread. Return to all comments →
The Manhattan Distance formula for two points (x1, y1) and (x2, y2) is: DManhattan = (x1−x2) + (y1−y2)
Applying this to points P1(a, b) and P2(c, d): DManhattan=(a−c) + (b−d)
SELECT ROUND(ABS((MIN(LAT_N) - MAX(LAT_N))) + ABS((MIN(LONG_W) - MAX(LONG_W))), 4) FROM station
N.B ABS() (absolute value) function, is crucial for Manhattan distance.