  Let ${\mathcal X}$ be an RD-space with $\mu({\mathcal X})=\infty$, which
means that ${\mathcal X}$ is a space of homogeneous type in the sense of
Coifman and Weiss and its measure has the reverse doubling property. In this
paper, we characterize the atomic Hardy spaces $H^p_{\rm at}(\{\mathcal X})$ of
Coifman and Weiss for $p\in(n/(n+1),1]$ via the radial maximal function, where
$n$ is the "dimension" of ${\mathcal X}$, and the range of index $p$ is the
best possible. This completely answers the question proposed by Ronald R.
Coifman and Guido Weiss in 1977 in this setting, and improves on a deep result
of Uchiyama in 1980 on an Ahlfors 1-regular space and a recent result of Loukas
Grafakos et al in this setting. Moreover, we obtain a maximal function theory
of localized Hardy spaces in the sense of Goldberg on RD-spaces by generalizing
the above result to localized Hardy spaces and establishing the links between
Hardy spaces and localized Hardy spaces. These results have a wide range of
applications. In particular, we characterize the Hardy spaces $H^p_{\rm at}(M)$
via the radial maximal function generated by the heat kernel of the
Laplace-Beltrami operator $\Delta$ on complete noncompact connected manifolds
$M$ having a doubling property and supporting a scaled Poincar\'e inequality
for all $p\in(n/(n+\alpha),1]$, where $\alpha$ represents the regularity of the
heat kernel. This extends some recent results of Russ and
Auscher-McIntosh-Russ.
