The definition of Kimon is “the demon’s gate; the quarter lying to the northeast of one’s position, superstitiously believed to be bad luck.”
This thought has started in Heian era.
By the way of the Japanese aspect of a house construction which is a mixture of Buddhism and Shintoism thought that were tied to the Yin Yang method, we tend to treat northeastern direction as "undesirable and hateable" even in the present age.
There are several ways to seal the Kimon, and on the streets of Kyoto you will find lots of examples. Sometimes it is architecture itself, sometimes it is gravels, trees and plants set on the northeast direction of houses.
One of the examples of sealing Kimon near Tamao is Higashi Honganji temple; the wall surrounding the temple does not have northeast corner so that the demon cannot enter the temple.
another, and the biggest example is Enryakuji in Mt.Hiei is of course located northeast of the city, and seals the Kimon for the entire old capital. maybe this is one of the reason why we have little damage every time natural disasters hit us since hundreds of years .