This also happens occasionally in Copenhagen, Denmark, when the police decides to create 'search zones', where the police create zones, where they have the right to search anyone. They don't need political or judicial permission to do so, they already have it.
But at least, these zones are met with much public debate, and the police has refrained from using them lately.
They introduced something similar for the UK, as part of Terrorism powers - there was a big stink when it turned out that the Metropolitan (London) Police had continuously designated the entire of Greater London as such a zone continuously for years, as soon as the law was passed.
I was stopped and searched in the City of London under terrorism laws for acting suspiciously and "doing a double take" when I saw a police car. I was simply looking twice before crossing the road, but there you go...
As it happens I was heading in to a meeting with a client who I was doing some web dev work for at the time. They published a porn magazine, and I had a big pile of their magazines in my bag. To her credit, the cop who was searching me didn't even raise an eyebrow when she saw them.
Woah. I should have noted, that the 'search zones' in Copenhagen were rather limited (usually to parts of Nørrebro). But they would often fall in busy areas.
But at least, these zones are met with much public debate, and the police has refrained from using them lately.