Municipalities give their local police department letters of authority to issue trespass warnings just as a property owner could do. So long as the reason for trespassing the person isn't on the basis of race/religion/national origin/sex/age/etc. then a police officer can trespass any person for any reason. They don't issue them arbitrarily. Nothing would stop you from discussing the matter with the department's senior officer up to and including the chief. Perhaps if you have a reasonable conversation with them and explain the circumstances credibly they will rescind the trespass notice. If it's that important to you.
