I'm trying to convert an XYZ file from WGS84 (lat/long) to UTM ED50 zone 34. QGIS can load the file as a raster, but I can't see a way of changing the coordinate system or exporting the results as an XYZ file.

Is this possible in QGIS?

  • Have you seen this question? It has some useful info and links that should point you in the right direction, but may be slightly different depending on your version of QGIS. Unfortunately, I don't have a install of QGIS handy so I can't answer you definitively. Sep 23 '14 at 15:18

Assuming you have an ASCII XYZ file with SRTM-like data loaded to the canvas:

  • go to Raster -> Projections -> Warp (Reproject)
  • select your input file (if not alredy selected)

Unfortunately, gdalwarp can not write XYZ raster files, so we use a vrt file for intermediate saving

  • select an output file test.vrt (format .vrt)
  • Set Source SRS to EPSG:4326
  • check target SRS and select EPSG:23034 for for ED50 34N

The command line in the last box should be something like

gdalwarp -overwrite -s_srs EPSG:4326 -t_srs EPSG:23034 -of VRT D:/Karten/Geotiff/N50E019.xyz D:/Karten/Geotiff/test.vrt

Just hit Ok and the file should be created and added as new layer.

No we translate the vrt to XYZ in a second step:

  • Raster -> Conversion -> Translate
  • select the vrt layer for input
  • for output, choose File format ASCII gridded XYZ and a new name:

gdal_translate -of XYZ D:/Karten/Geotiff/test.vrt D:/Karten/Geotiff/out.xyz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.