I have four .xyz files with terrain data. I can convert them to TIFs in QGIS 3.4, but in either format, merging them fails. The merge output always has the X dimension of the merged rasters, but a Y dimension of only one pixel. This happens in QGIS 2.18, 3.2 and 3.4 and whatever settings I apply. Any idea how to solve this problem?
Your images have a positive N-S pixel resolution in the geotransform. This is quite unusual and means the origin coordinates for the image are in the lower-left rather than the upper-left of the image. In the usual upper-left case the geotransform N-S pixel resolution would be negative.
Are you sure your image georeferences are correct?
Try exporting all your raster as asciis and check the UL or LL settings for irregularities with your favourite text viewer.
this is not an answer to your question, but may solve your problem anyways. the rasters that you are trying to mosaic are also available as a WCS under this link: https://isk.geobasis-bb.de/ows/dgm_wcs You can just add the WCS to QGIS and use it for your processing.