Mishneh Torah, Laws of Theft, 5:14, 17-18
The general principle is: Any law that a king decrees to be universally applicable, and not merely applying to one person, is not considered robbery. But whenever he takes from one person alone in a manner that does not conform to a known law, but rather seizes the property from the person arbitrarily, it is considered to be robbery.
Halacha 17
When a king cuts down trees belonging to private people and uses them for a bridge, one is permitted to cross over it. Similarly, if he destroys homes in order to construct a road or a wall, it is permitted to benefit from it. The same principle applies in all analogous situations, because the laws of a king are binding.
Halacha 18
When does the above apply? When the coins issued by a king are the tender of the land. This indicates that the inhabitants of that land have accepted him and consider him to be their leader and themselves to be his subjects.