  We constrain the energy at which the transition from Galactic to
extragalactic cosmic rays occurs by computing the anisotropy at Earth of cosmic
rays emitted by Galactic sources. Since the diffusion approximation starts to
loose its validity for E/Z >~ 10^(16-17) eV, we propagate individual cosmic
rays (CRs) using Galactic magnetic field models and taking into account both
their regular and turbulent components. The turbulent field is generated on a
nested grid which allows spatial resolution down to fractions of a parsec.
Assuming sufficiently frequent Galactic CR sources, the dipole amplitude
computed for a mostly light or intermediate primary composition exceeds the
dipole bounds measured by the Auger collaboration around E ~ 10^18 eV.
Therefore, a transition at the ankle or above would require a heavy composition
or a rather extreme Galactic magnetic field with strength >~ 10 muG. Moreover,
the fast rising proton contribution suggested by KASCADE-Grande data between
10^17 eV and 10^18 eV should be of extragalactic origin. In case heavy nuclei
dominate the flux at E >~ 10^18 eV, the transition energy can be close to the
ankle, if Galactic CRs are produced by sufficiently frequent transients as e.g.
magnetars.
