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 degreesC. 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 (nx4) subunits are observed where n can be either 3 or 4 and the STM images resemble those of the Si(001)-(3x4)-In and -Al reconstructions. An ordered arrangement of the subunits into a (7x4) reconstruction can be prepared at saturation coverage. The (3x4) 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 (4x4) subunit, we propose a model that includes the main features of the (3x4) 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.