  We determine the spatial (impact parameter) dependence of nuclear parton
distribution functions (nPDFs) using the $A$-dependence of the spatially
independent (averaged) global fits EPS09 and EKS98. We work under the
assumption that the spatial dependence can be formulated as a power series of
the nuclear thickness functions $T_A$. To reproduce the $A$-dependence over the
entire $x$ range we need terms up to $[T_A]^4$. As an outcome, we release two
sets, EPS09s (LO, NLO, error sets) and EKS98s, of spatially dependent nPDFs for
public use. We also discuss the implementation of these into the existing
calculations. With our results, the centrality dependence of nuclear
hard-process observables can be studied consistently with the globally fitted
nPDFs for the first time. As an application, we first calculate the LO nuclear
modification factor $R^{1jet}_{AA}$ for primary partonic-jet production in
different centrality classes in Au+Au collisions at RHIC and Pb+Pb collisions
at LHC. Also the corresponding central-to-peripheral ratios $R_{CP}^{1jet}$ are
studied. We also calculate the LO and NLO nuclear modification factors for
single inclusive neutral pion production, $R_{dAu}^{\pi^0}$, at mid- and
forward rapidities in different centrality classes in d+Au collisions at RHIC.
In particular, we show that our results are compatible with the PHENIX
mid-rapidity data within the overall normalization uncertainties given by the
experiment. Finally, we show our predictions for the corresponding
modifications $R_{pPb}^{\pi^0}$ in the forthcoming p+Pb collisions at LHC.
