I live in the city and my dog gets restless and tries to herd people.
He needs an exercise that I guess is like herding but minus the livestock.
So he can "herd" that, instead of people.
Or maybe suggest other forms of exercise...
Brisk walks in the park...play ball...join a club and participate in some classes like D.Campbell suggested. Interact w/your dog in your own yard and work on obedience during the play. Anything to get him out and moving. See if there are some dog parks around your area.
There may be herding clubs somewhere near you too. We have taken Sidney to one in a nearby town and he just LOVED it! There is a video on Sidney's page if you want to check him out. Other than that, like D. Cambell said, agility is really good for them. We're hoping to start Sid in agility this spring.
Some nefarious corgis I know are occasionally allowed to run discreetly and carefully off-leash in a mostly fenced paved area herding a soccer ball when nobody's looking. I will name no names. I hope they never get busted because they LOVE this and are quite good at herding and steering that ball and it really wears them out, faster than their owner.