Theory of edge radiation. Part I: Foundations and basic applications