Photometric redshifts for future cosmological galaxy surveys