1

I am trying to clip a .tif file using the extent of a polygon (.shp). I am using the conventional Raster/Extraction/Clipper tool in QGIS 2.18.10. After choosing the appropriate settings, I get the following message:

ERROR 1: Attempt to create ADRG dataset with an illegal data type (Float32), only Byte supported by the format.

I am asking the exact same question as uybfi in this thread, which was marked as a duplicate for no apparent reason. The referred answer fails to address the issue. My raster is already in a supported format (Float32), and when changing the pixel depth with gdal_translate to other supported formats (e.g. Int32), I still get the this error.

Any thoughts?

enter image description here

10
  • According to the docs gdal.org/frmt_various.html#ADRG Creation is possible, but it must be considered as experimental. I suggest you find a different format, something like HFA (ERDAS Imagine) or GTIFF driver to create your output. Commented Aug 8, 2017 at 1:42
  • @MichaelStimson Unless I am mistaken, this refers to using .gen or .thf formats. I am using none of these two.
    – Vlad
    Commented Aug 8, 2017 at 1:49
  • What output driver are you then using? the error message is about ADRG (ArcInfo Digitized Raster Graphic) format which means you're using the ADRG driver, albeit unintentionally. If you're doing it like this qgistutorials.com/en/docs/raster_mosaicing_and_clipping.html can you include a screen shot of clipper window. Commented Aug 8, 2017 at 1:52
  • 1
    the driver is specified with -of in the command line which comes up in the window at the bottom of the tool just before execution. Each output format has a driver associated with it. I suspect your output is using the ADRG driver because it's the first alphabetically in the list but may not be what you're after. Commented Aug 8, 2017 at 2:00
  • 1
    OH I SEE! you can clearly see -of ADRG, on the 3rd line, you need to change that to -of GTIFF to export a GeoTIFF. I think when you specify the output format you may need to select GeoTIFF in the filter to make the tool use the correct driver. Commented Aug 8, 2017 at 2:06

1 Answer 1

2

The issue had to do with QGIS wrongfully inputing -of ADRG instead of -of GTiff in the command line when choosing the output file destination. Below is a screenshot of the clipper window properly set-up to successfully perform the clip operation. Thanks to @MichaelStimon for resolving this.

enter image description here

1
  • 1
    To solve the issue on Windows, you have to remove a registry entry, see issues.qgis.org/issues/16979. I'm not sure where the stuff is saved in Linux or MacOS.
    – AndreJ
    Commented Aug 8, 2017 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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