The flat rank of a totally disconnected locally compact group G, denoted
flat-rk(G), is an invariant of the topological group structure of G. It is
defined thanks to a natural distance on the space of compact open subgroups of
G. For a topological Kac-Moody group G with Weyl group W, we derive the
inequalities: alg-rk(W)\le flat-rk(G)\le rk(|W|\_0). Here, alg-rk(W) is the
maximal Z-rank of abelian subgroups of W, and rk(|W|\_0) is the
maximal dimension of isometrically embedded flats in the CAT0-realization
|W|\_0. We can prove these inequalities under weaker assumptions. We also show
that for any integer n \geq 1 there is a topologically simple, compactly
generated, locally compact, totally disconnected group G, with flat-rk(G)=n and
which is not linear