Using scanning-tunneling microscopy (STM) and first-principles total-energy calculations, we have determined the atomic geometry of the superstructures formed by the adsorption of up to 0.5 monolayer of indium on Ge(001) and annealing at temperatures above 200 \ifmmode^\circ\else\textdegree\fi{}C. A strong interaction between indium adatoms and the germanium substrate atoms leads to the formation of two different In-Ge subunits on the Ge(001) surface. In the subsaturation regime separate $(n\ifmmode\times\else\texttimes\fi{}4)$ subunits are observed where n can be either 3 or 4 and the STM images resemble those of the $\mathrm{Si}(001)\ensuremath{-}(3\ifmmode\times\else\texttimes\fi{}4)\ensuremath{-}\mathrm{In}$ and -Al reconstructions. An ordered arrangement of the subunits into a $(7\ifmmode\times\else\texttimes\fi{}4)$ reconstruction can be prepared at saturation coverage. The $(3\ifmmode\times\else\texttimes\fi{}4)$ subunits are well described by the pyramidlike model introduced by O. Bunk, G. Falkenberg, L. Seehofer, J. H. Zeysing, R. L. Johnson, M. Nielsen, R. Feidenhans'l, and E. Landermark, Appl. Surf. Sci. 123/124, 104 (1998) for In on Si(001). For the $(4\ifmmode\times\else\texttimes\fi{}4)$ subunit, we propose a model that includes the main features of the $(3\ifmmode\times\else\texttimes\fi{}4)$ subunit together with additional mixed Ge-In dimers. The atomic positions were optimized using ab initio total-energy calculations. The calculated local densities of states are in excellent agreement with the STM images.