You could just measure the external diameter of the seatpost, using a flexible tapemeasure, or wrap a piece of string round it and measure with a ruler, etc.
31.8 and 34.9 are the metricated versions of 1 1/4" and 1 3/8" - usually roadbikes are the smaller size, but some carbon or alu bikes do use the bigger tubesize.
Anything bigger, or aero-profile or square-section tube, etc has to use the bolt-on variety.