Localization of a particle due to dissipation in 1 and 2 dimensional lattices