Under the conditions of superfluid--Mott-insulator criticality in two dimensions, the trapping centers---i.e., local potential wells and bumps---are generically characterized by an integer charge corresponding to the number of trapped particles (if positive) or holes (if negative). Varying the strength of the center leads to a transition between two competing ground states with charges differing by $\ifmmode\pm\else\textpm\fi{}1$. The hallmark of the transition scenario is a splitting of the number density distortion $\ensuremath{\delta}n(r)$ into a half-integer core and a large halo carrying a complementary charge of $\ifmmode\pm\else\textpm\fi{}\frac{1}{2}$. The sign of the halo changes across the transition and the radius of the halo
r0 diverges on the approach to the critical strength of the center,
V=Vc, by the law ${r}_{0}\ensuremath{\propto}{|V\ensuremath{-}{V}_{c}|}^{\ensuremath{-}\stackrel{\ifmmode \tilde{}\else \~{}\fi{}}{\ensuremath{\nu}}}$, with $\stackrel{\ifmmode \tilde{}\else \~{}\fi{}}{\ensuremath{\nu}}\ensuremath{\approx}2.33(5)$.
The coexistence of superfluid and Mott insulator, due to the quadratic confinement potential in current optical lattice experiments, makes the accurate detection of the superfluid--Mott-insulator transition difficult. Studying alternative trapping potentials which are experimentally realizable and have a flatter center, we find that the transition can be better resolved, but at the cost of a more difficult tuning of the particle filling. When mapping out the phase diagram using local probes and the local density approximation we find that the smoother gradient of the parabolic trap is advantageous.