A retired New York City police officer was seriously injured early yesterday when a woman drove up alongside the car he was driving on a Brooklyn street and shot him at least four times , the police said .