Anisotropic Kosterlitz-Thouless transition induced by hard-wall boundaries