as far as I am aware, a police man can walk up to anyone they wish and talk to them, ask them for ID ect.
So can I. They can politely just say, “No. “ And continue on their way without further harrassment.