The basic idea is that toward the starting point of a route is 上り, and to the end point is 下り. Tokyo or big cities are often the starting point of major routes, so the directions toward these places are often 上り.
Since the directions 上り and 下り are used throughout each route, it's not changed between the north side and south side or east side and west side of a big city on the route. For example, the starting point of Route 4 is Tokyo and the end point is Aomori, so, toward Tokyo is always 上り. Thus, at a place on the south side of Sendai, away from Sendai is 上り even if the place is very close to Sendai and 上り looks like away from a big city Sendai and toward to a rural area.
Route 45 is from Sendai to Hachinohe, and Route 9 is from
Kyoto to Shimonoseki. It's clear which is which for your rest two examples, isn't it?
However, there seems to be exceptions. Although the starting point of Route 122 is Nikko and the end point is Tokyo,
toward Tokyo is called 上り in road traffic information (probably because it's confusing).
道路交通情報では、終点である東京へ向かう方向を上りと表現している