Ninjas are alleged to have determined the depth of moats by taking a reed that's attached to the bottom of the moat, and measuring the height of the reed above water, and how far forward they had to push the reed until it was submerged, and using Pythagoras' theorem. Is this the case?
Some characters in the Japanese drama series "Nihonjin No Shiranai Nihongo" debate this claim, starting from around here in this YouTube clip. As background, while most of the students in the class are fairly silly, the character who speaks at 2:48 saying that Pythagoras' theorem was mentioned in Edo period documents is a very serious and studious individual, and therefore unlikely to support bogus claims.
The claim is also mentioned in this CIA document posted in 2007. Apart from the paragraph about ninjas turning into a stone, most of the content in the document is at least plausible.