Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basic question, but I have been asked to export data to an XYZ format. Is this the same as CSV files.

I am using QGIS 1.8.0. So i am presuming i select the data I want to export, right click its parent file in the window on the right and save selection as...CSV??

share|improve this question
Difficult to say, it could just be Global X-Y-Z coordiantes: – AndreJ Jan 4 '13 at 12:04
Wikipedia says its a format for chemical atomic bonds. Kind of larger scale than most GIS' can handle. ;-) - ----- You need to ask whoever asked for this data to be more specific. – GIS-Jonathan Jan 4 '13 at 12:08
up vote 3 down vote accepted

XYZ is an ASCII gridded data format (see the documentation) for raster data. So, it is very similar to CSV.

However, the tools available in QGIS, don't seem to support exporting to XYZ even though GDAL does (for instance it is not available under either the Save As option and neither through Raster Calculator). However, you can use the gdal_translate command-line utility to translate your raster to XYZ format. Otherwise you have to import your raster to GRASS and then do it there.

share|improve this answer
You can use Raster->Convert->Translate form the Qgis menu, and edit the command line from -of Gtiff to -of XYZ. "Save As" is only working for vector layers. – AndreJ Jan 4 '13 at 12:28
Cheers for this! – Ger Jan 4 '13 at 12:43

i havent try it for creating csv from save as csv but you can use in grass.The module exports a raster map as a list of x,y,z values into an ASCII text file. - Export a raster map to a text file as x,y,z values based on cell centers.

i hope it helps you...

share|improve this answer

QGIS has a GDAL plugin gdal2xyz that can do it. It is however slow and creates a huge file. Importing it back as ASCII layer in QGIS is even slower and almost freezes the whole computer.

I find much faster than gdal2xyz and creates files 3 to 4 times smaller.

Loading the files back in GRASS is also much faster Below I imported the files generated by (458 MB, extension xyz) (loaded in 18 s) the GDAL plugin (1.6 GB, extension csv) (loaded in 1 min 6 s).

It is true, however, that the GDAL plugin has found more points. Visually the imports look the same but the efficiency is dramatically different. output=TopoToR_XYZ separator=
Reading data ... Writing to map ... complete. 11398193 points found in region. (Fri Dec 13 16:06:36 2013) Command finished (18 sec)

(Fri Dec 13 16:16:04 2013) output=TopoToR_XYZ_CSV separator=, Reading data ... Writing to map ... complete. 51619840 points found in region. (Fri Dec 13 16:17:11 2013) Command finished (1 min 6 sec)

Also, to import/export in XYZ format from a vector layer and v.out.ascii can be used from Grass.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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