  Two-dimensional almost-Riemannian structures are generalized Riemannian
structures on surfaces for which a local orthonormal frame is given by a Lie
bracket generating pair of vector fields that can become collinear. We study
the relation between the topological invariants of an almost-Riemannian
structure on a compact oriented surface and the rank-two vector bundle over the
surface which defines the structure. We analyse the generic case including the
presence of tangency points, i.e. points where two generators of the
distribution and their Lie bracket are linearly dependent. The main result of
the paper provides a classification of oriented almost-Riemannian structures on
compact oriented surfaces in terms of the Euler number of the vector bundle
corresponding to the structure. Moreover, we present a Gauss?Bonnet formula for
almost-Riemannian structures with tangency points.
