  In this paper, we show that the building at infinity of a two-dimensional
affine R-building is a generalized polygon endowed with a valuation satisfying
some specific axioms. Specializing to the discrete case of affine buildings,
this solves part of a long standing conjecture about affine buildings of type
G~_2, and it reproves the results obtained mainly by the second author for
types A~_2 and C~_2. The techniques are completely different from the ones
employed in the discrete case, but they are considerably shorter, and general
(i.e., independent of the type of the two-dimensional R-building).
