Thank you all for your support. Forgive me for not replying to you all individually, but everything every one you has said means a lot to me.
Gail - I've felt safe in NYC 99% of the time, though I admit I haven't lived in Brooklyn. I have however lived in the Bronx, and since I always kept my wits about me and was cautious I never had any real problems there. My parents were terrified when I moved there, though!
taylor, I'm sorry about your recent experience. It pays to stay vigilant, for sure.
Suz - I am angry about this too. But I suspect this person is mentally ill, and that the Me Too movement probably hasn't been at the forefront of his mind. That's not to excuse him, though. He clearly has messed up ideas about how to treat women.
Bijou - don't worry, I love my city and am used to dealing with the occasional crazy person or threatening situation. This happened half a block (albeit half a long block) from the cops. I could have walked over there rather than Starbucks if I'd felt really threatened. This happened on an unusual stretch of block that's long and only has one entrance to a campus of buildings (no entrances to any buildings right on the street), so it can be a bit even deserted during the day if no one else happens to be walking on it. I will probably avoid it and cross the street in the future if I look down it and see a guy loitering alone.