GaN nanowires (NWs) grown by molecular beam epitaxy on Ti films sputtered on Al2O3 are studied by X-ray diffraction (XRD) and grazing-incidence small-angle X-ray scattering (GISAXS). XRD, performed both in symmetric Bragg reflection mode and at grazing incidence, reveals Ti, TiN, Ti3O, Ti3Al and Ga2O3 crystallites with in-plane and out-of-plane lattice parameters intermediate between those of Al2O3 and GaN. These topotaxial crystallites in the Ti film, formed as a result of interfacial reactions and N exposure, possess little misorientation with respect to Al2O3. As a result, GaN NWs grow on the top TiN layer, possessing a high degree of epitaxial orientation with respect to the substrate. The measured GISAXS intensity distributions are modelled by the Monte Carlo method, taking into account the orientational distributions of NWs, the variety of their cross-sectional shapes and sizes, and the roughness of their side facets. The cross-sectional size distributions of the NWs and the relative fractions of the {1100} and {1120} side facets are determined.