  The observation of the diffuse Galactic gamma ray flux is the most powerful
tool to study cosmic rays in different regions of the Galaxy, because the
energy and angular distributions of the photons encode information about the
density and spectral shape of relativistic particles in the entire Milky Way.
  An open problem of fundamental importance is whether cosmic rays in distant
regions of the Milky Way have the same spectral shape observed at the Earth or
not. If the spectral shape of protons and nuclei is equal in all the Galaxy,
the dominant, hadronic component of the diffuse gamma ray flux must have an
angular distribution that, after correcting for absorption effects, is energy
independent.
  To study experimentally the validity of this factorization of the energy and
angular dependence of the diffuse flux it is necessary to compare observations
in a very broad energy range. The extension of the observations to energies
$E_\gamma \simeq 0.1$--10~PeV is of great interest, because it allows the study
of the cosmic ray spectra around the feature known as the "knee".
  The absorption probability for photons in this energy range is not
negligible, and distorts the energy and angular distributions of the diffuse
flux, therefore a precise calculation of the absorption effects is necessary
for the interpretation of the data.
  In this work we present predictions of the diffuse gamma ray flux at very
high energy, constructed under different hypothesis for the space dependence of
the cosmic ray energy spectra, and discuss the potential of the observations
for present and future detectors.
