Well that was an unfortunate turn of events in your case. This can be a really sensitive and convoluted subject to get into. Fortunately for me, I've not had this type of problem unless a private land owner is involved and doesn't want you near their property. The police in your situation I'm sure just wanted to resolve the situation as soon as possible and it was much easier to ask you to leave than to research the laws and rights. It was much easier for him to say leave and be done with it. If the person didn't call the police on you there would have been no problem. Every single time I've encountered the police during my prospecting it has always been an amicable encounter. When I told them what I was doing and showed them specimens I've found they were always fine. I was told to leave from a couple construction sites by police in the past but again it was amicable and of course I just stayed away from then on. But then of course I've never had a private land owner call the police on me either.
That being said it does seem the nation as a whole has become much more anti-social than in the past. I always hear stories about everyone being able to prospect in all these places in the past and one by one they all got shut down and posted by the owners and it's only getting tougher. It's just part of the changing tide affected by the population boom, the internet, crazy people shooting up places, bitcoin, climate change, presidents, flat earthers, santa clause deniers, etc, etc, etc, etc. There's nothing you can pin down in this crazy world we live in.
It is what it is right now. The best thing we can do is be as professional, amiable, and personable as possible when dealing with the locals or law enforcement. That attitude will be remembered and shared with others, thus sowing the seeds for friendly encounters in the future.
I hope your encounter doesn't leave that sour taste too long, as I do feel it was an isolated type of situation. A very similar thing happened to me just a few weeks back when I stopped to check out a construction site. Just after parking my car and slipping my gloves on to do some prospecting, this lady comes running out from a house nearby already with a very belligerent attitude asking me who I was and what I was doing. Well the first thing she said was that the entire sight was posted and that she was going to call the developer on me if I didn't leave immediately. Well she lied as there was not one posted sign anywhere. I then later she tells me that someone had stolen all of her rocks recently. And I was thinking to myself "as if I had something to do with that".
Anyway, I knew that she had no right to tell me what to do and that she had no affiliation with the developer, she just didn't want me back there because somebody else stole her rocks. But rather than cause a fuss I just left. It's incredibly unfortunate that some people will automatically pool everyone in the same pool as the a-holes unless they personally know them or are relatives. She never gave me the chance to introduce myself or have any sort of civil discussion -- she just wanted me gone or else she was going to take action. So the next time I just parked out of site and made sure to avoid going near her home and still got to prospect the site anyway. It sucks that we have to jump through hoops because of people, but to me it's just always been part of the game. The thrill of the hunt magnified. No pain no gain.
Scott