[GIS] QGIS Clipping Raster Layer

clipqgisraster

I am trying to reduce a world map raster layer (North America, Pennsylvania, etc.) I thought I could do Raster>Extraction>Clipper – I selected the raster layer and the destination of new tif file, used the select tool to select the extent area to extract. But I keep getting this error:

ERROR 1: Currently GMT export only supports 1 band datasets.

Can I only clip or extract raster layers that have 1 band only or am I doing something wrong? This raster layer has a render type of Multiband color.

enter image description here

Best Answer

I can see the output format switch in the gdal_translate dialog box is set to '-of GMT' despite the file extension '.tif'. This means that, although you think you are trying to export to GeoTiff, you are still telling GDAL to use the GMT driver and so you will continue to get the same error until you correct this. For GDAL it is the choice of output format driver that is important and not the file extension.

Clipper defaults to Geotiff, so opening a new dialog and ensuring that 'Save as type:' in the file-system dialog points to GeoTiff should fix this. You must have selected GMT in some previous operation and Windows has retained this choice for the file system save-as option.

Because the default is GeoTiff, if you see the '-of' switch in the text area at the bottom of the clipper dialog bog (see your own screen shot), then you have most likely done something wrong (unless it says '-of GTiff'). Note that you can actually edit these options by pressing the little yellow pencil button to the right side of the text area and edit where it says -of GMT to read -of GTiff. Refer to the documentation for further information - A list of supported formats and their limitations can be found here.

Related Question