The federal government has long stayed out of zoning regulations (as per the constitution). When you are moving along at a reasonable pace and acting as a transient not a member of the community, I think you are protected by all of the Federal Laws regarding Navigable Waters. Unfortunately, you might have to sue the local or state government after the fact to protect yourself under federal law, which I know that no one has the money to do or wants to do.
But, when you have some guy floating on anchor and not moving anywhere, or planning to, I consider that that guy is living there and no longer protected by federal law.
I may disagree with some local statues and ordinances, but it is better than the federal government being involved in zoning or the local government involved in navigable waters.
I know it isn't perfect (far from), but it is a pretty neat system that our founding fathers set up.