Can only state the case for Germany, here, the constitution explicitly states that "Ownership entails responsibilities" and that ownership is not absolute but subject to greater good considerations.
If someone would implement a law or rule like the one in Barcelona (or probably Vancouver) in Germany, it would probably be based on such a consideration.
IANAL, mind.