Weather Observation Station 18

  • + 0 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.