It can be done by physics for sure, but I doubt it often is.
The basic physics:
http://en.wikipedia.org/wiki/Trajectory_of_a_projectile (I haven't read it, but I'm sure it will give a good enough description)
This requires a bit of calculus if you want to include air resistance, which is a must for gaps, along with some empirical data about coefficients of drag, etc. This method also neglects any "pop" on take-off.
I've always thought about making something to define the "perfect" landing slope, where no matter your take-off speed for a given take-off angle (above a minimum speed), the angle at which you met the ground on landing would be less than, say, 10 degrees. It would be useful, but in reality very difficult to adhere to. For city jumps it would work fine (neglecting size constraints), but on mountains it's largely a matter of working with what you have.