This harassment is easy to stop. Hit them where it hurts – in the paycheck. Remember, most people have a boss.
In the early ’80’s at an ivy league college (I was a lecturer, not a student) I was harassed when my daily route took me past a university construction site. As a physics/chemistry student in the ’60’s, I’d had it with harassment.
I took note of date, time, place, exact occurrence, and the fact that I felt demeaned and unsafe (that is very important). I noted the name of the contractor (usually posted on a sign at the site). I then went to talk to the head of Buildings and Grounds for the university, the people who let the contracts for buildings, and told him of the incidents. I made it clear that I was determined to put an end to this for myself and female students. I had to go no further, the harassment came to an immediate halt.
If you go to the boss and get no help, or are dismissed, go to their boss, and keep going up the chain. You will eventually find someone who realizes this could cost him $.
Discuss the behavior in terms of what it is: men who feel powerless trying to exert some power.
If the problem is men on the street, non workers, the only option is to go to the police with the same data and stress that you feel unsafe and threatened. If the police dismiss you, keep working up the chain of command. The police ultimately work for you and the community.
Find out what laws are on the books in your community and get them enforced.
Any effort you put in will be worthwhile in your feeling of power and of helping other women. I still remember walking past those guys at the university construction site immediately after my meeting noted above – they silently looked at me; they were now fearful of saying a word. In a few days we women passing by were simply ignored, just like the men passing by.