How is a waste drain vent pipe vertical clearance measured?
It's measured on the high side (the nearest point or the shortest dimension).

Typical language:


  Vent pipes shall terminate not less than 6 inches above the roof, measured from the highest point where the vent intersects the roof.




Image source