  We investigate how the dust temperature is affected by local environmental
quantities, especially dust surface density ($\Sigma_\mathrm{dust}$),
dust-to-gas ratio (D/G) and interstellar radiation field. We compile
multi-wavelength observations in 46 nearby galaxies, uniformly processed with a
common physical resolution of $2~$kpc. A physical dust model is used to fit the
infrared dust emission spectral energy distribution (SED) observed with WISE
and Herschel. The star formation rate (SFR) is traced with GALEX ultraviolet
data corrected by WISE infrared. We find that the dust temperature correlates
well with the SFR surface density ($\Sigma_{\rm SFR}$), which traces the
radiation from young stars. The dust temperature decreases with increasing D/G
at fixed $\Sigma_{\rm SFR}$ as expected from stronger dust shielding at high
D/G, when $\Sigma_\mathrm{SFR}$ is higher than $\sim 2\times 10^{-3}~\rm
M_\odot~yr^{-1}~kpc^{-2}$. These measurements are in good agreement with the
dust temperature predicted by our proposed analytical model. Below this range
of $\Sigma_\mathrm{SFR}$, the observed dust temperature is higher than the
model prediction and is only weakly dependent on D/G, which is possibly due to
the dust heating from old stellar population or the variation of SFR within the
past $10^{10}~$yr. Overall, the dust temperature as a function of
$\Sigma_\mathrm{SFR}$ and $\Sigma_\mathrm{dust}$ predicted by our analytical
model is consistent with observations. We also notice that at fixed gas surface
density, $\Sigma_{\rm SFR}$ tends to increase with D/G, i.e. we can empirically
modify the Kennicutt-Schmidt law with a dependence on D/G to better match
observations.
