I can't say how the Pigeon was caught, as Sparrowhawks will take birds from perches - from the ground - in flight, and even chase them on the ground if necessary. As you've witnessed, if the prey is a similar size or larger than the Sparrowhawk, the prey is eaten on the ground; although they do prefer a bit of cover, as other predators/opportunists can try to take their meal. They will sometimes eat part of their meal on the ground and eat the rest in a tree or a favourite perch. Smaller birds are more often eaten in trees, but not always, I've many pics of small birds being eaten on the ground.
Unfortunately for the prey, Sparrowhawks don't have a "kill shot" like a Falcon (actually, some sort-of do, but it's something they learn as they get older, and it's a bit gory to describe I guess); so they just stab and prod/squeeze with their talons until the prey is still enough to start plucking and eating (both together, not pluck the prey and then eat). This means that larger prey that isn't killed by the initial strike, only dies when a vital organ is damaged or they bleed to death... this can take many minutes. Just a note; the Sparrowhawk has no choice but eat this way, it's how it's evolved and has no other way to survive.
EDIT: One other thing; a Sparrowhawk will have taken hours to get to a place to hide... birds' alarms sounding each time it was spotted. It will have watched and chosen the easiest meal... often a bird that is sick or careless. If it's scared from it's meal (by a dog or a keen photographer trying to get too close) it will either have to try again or die from starvation. The original prey will most likely be mortally injured, so rather than save one bird at least two will die. So please be careful if you're fortunate enough to get photo opportunities, and try not to spook the Sparrowhawk... some will let you get quite close while they are eating, others will spook at the twitch of a curtain