This is a very complex matter, it differs between national legislations (a big issue in Europe with neighbouring countries so near).
But there are also most tricky, not foreseeable legal excemptions in seemingly most plain freedom-of-photography situations.
But there are also most tricky, not foreseeable legal excemptions in seemingly most plain freedom-of-photography situations.