With or without water it can be used as a barrier, as an alternative for a fence.
A trench is a long narrow ditch.
Types and applications include:
... winner of the Nobel Peace Prize April 16 - Fifi D'Orsay, actress (+ 1983) April 22 - Robert Oppenheimer, physicist (+ 1967) May 6 - Harry Martinson, swedish author, ...