Several issues here. One is trespass--not going to address that--amyparrot already gave good advice.
Another is whose responsibility it is to know the law. And that is YOURS. It is not code enforcement or the police's responsibility to tell you the law--it is your responsibility to seek the information.
I love chickens, and I appreciate that they can and do exist well in towns and cities. However, if the place you live does not allow them, and you want them, then you need to pursue a legal means of achieving your goal, not get upset and angry when code is enforced.
I don't know the whole story, but from what you have said and how, I sense a whole lot of attitude that will get you nowhere.