Lao Tzu said:
its an exaggerated joke, but i do have some issues with them. but im working beyond them. Patience grasshopper
I recall reading about a study they did once outlining why people in small towns appear friendlier than big city people. The short of it is simply because you encounter fewer people. If your walking down the street in small town, you run into relatively few people. As a result it is easier to look people in the eye, stop them, and say hello.
In large cities the opposite is true, people avoid making eye contact with others, for the simple fact that there are so many others passing them by. For some it is the sheer number of people they find frightengly overwhelming, and others just a nautural reaction to being unable to possibly interact with such a large number. So as a result to someone from a small town they appear cold and rude.
Anyone who possesses a commodity that other people greatly desire is constantly bombarded with people with their hand out so to speak. If you are going down the street and one person asks you for some spare change you are likely to give it with a smile. But if you are bombarded with 20+ people all asking you for money down that same street you eventually develop at best a feigned indifference, and at worst a hostile attitude toward it all. If the last few were themselves hostile or rude when panhandling, what would be your likely reaction to the next one?
Not to say that some people aren't just assholes, because of course they are. But better for you (stress that) if you simply give them the benefit of the doubt, assume that they have cause to act the way they do, and simply brush it off. You might even manage some sympathy for the person in the process. It neevr feels good when someone treats you poorly, especially when it hits so close to the ego. But in the end you are better off having some perspective about it all, recognizing that there are likely good reasons for why they behave the way they do, and don't take it very personally.