Territorial Waters
I think Merlin is technically correct Veeps as territorial waters only extends 12 nautical miles out from the coast. So you if you are over territorial waters you are most certainly encroaching the landmass. The overwater overflights that only require flight plan notification i would assume would relate to a country's exclusive economic zone which extends 200 nautical miles, plus any international airspace that they are responsible for, more or less an extension of maritime law.
If there are any countries that dont follow this then it would be useful to know however.
Cheers,
Buzzz