Simple geometry. You measure out a distance from the base of the flag pole, and then measure the angle to the top of the pole. Then you divide the sin of the angle by the distance to the base. This will give you the height of the flag pole.
The simplest way to measure it is to bring it down, measure it and then re-erect it. If you can't bring it down, measure the length of the rope used to raise and lower the flag.