There are a great many movies set in New York, and there are even more supposedly set here but actually shot in Canada or somewhere else with no unions. Setting alone was not the criteria for Movies Oddity's list of the 20 Greatest New York movies.
The criteria for the list is simple enough, though. The movies have to be of the City, or as the site says: "In each film, New York deserves recognition as the best supporting actor." Now you can argue that Sex and the City was robbed (the list is male-centric and with the exception of When Harry Met Sally and a couple of Woody Allen movies, most involve guns), but then you can always create your own list. Of course, you'd put The Pope of Greenwich Village and Panic In Needle Park on yours.
But, going by MO's picks, Robert De Niro is the greatest NY actor of all time, starring in five films on the list, including one he directed and topping the list at No. 1 with Taxi Driver. And, no surprise here, Woody Allen and Martin Scorsese tie for best director, with three appearances each (Hannah and Her Sisters, Manhattan and Annie Hall; Mean Streets, Good Fellas, and the aforementioned Taxi Driver; respectively).
Speaking of Taxi Driver, you may want to check out this New York You've Changed from Nick Carr, looking at scenes from that classic film and comparing to them to the way the locations look today.
The full Movies Oddity list can be found here.