I don't do any volume measurements in my cooler. Measure what goes in; measure what comes out.
If you were measuring in the cooler, the strike water would be measured pre-grain, so no problem.
Batch sparge mash water would be post-grain (after all absorption had occcurred) so again, no problem.
Once you know how many vertical inches of cooler space equals 1 gallon, you can do either of these measurements.