  We present a new strategy for fitting the structure and kinematics of the HI
in edge-on galaxies using a fit to the terminal-velocity channel maps of a HI
data cube. The strategy can deal with self-absorbing HI gas and the presence of
warps. The method is first tested on a series of models. We demonstrate that
fitting optically thin models to real galaxies will lead to an overestimation
of the thickness and velocity dispersion, and to a serious underestimation of
the HI face-on column densities. We subsequently fit both self-absorption and
optically thin models to the HI data of six edge-on galaxies. In three of these
we have also measured the velocity dispersion. On average 27 \pm 6 % of the
total HI mass of edge-on galaxies is hidden by self-absorption. This implies
that the HI mass, thickness and velocity dispersion of galaxies is typically
underestimated in the literature.
