  We examine the formation of localized states on a generalized nonlinear
impurity located at, or near the surface of a semi-infinite 2D square lattice.
Using the formalism of lattice Green functions, we obtain in closed form the
number of bound states as well as their energies and probability profiles, for
different nonlinearity parameter values and nonlinearity exponents, at
different distances from the surface. We specialize to two cases: impurity
close to an "edge" and impurity close to a "corner". We find that, unlike the
case of a 1D semi-infinite lattice, in 2D, the presence of the surface helps
the formation of a localized state.
