I'm looking to convert a unsigned integer grid to a short integer grid for use in TauDEM. The unsigned integer grid has values ranging from 0 - 4.

  • What have you tried so far? If there's only 5 discrete values, a 4-bit image would hold it, in addition to 8-bit and 16-bit. ("short integer" is 16-bit", "integer is 32-bit"; "8-bit is "byte", and 4-bit is "nibble") – Vince Mar 7 '16 at 16:48
  • There is actually only 2 discrete values now (0 and 1). This particular analysis tool within TauDEM specifies the input needs to be a short integer grid, although i've used this 8 bit unsigned integer and it seems to have worked. Is there a way to convert it to short integer 16 bit to see if i get the same results? Thanks – Steven Mar 7 '16 at 22:13
  • Again, what have you tried? If you haven't tried a Save As or Export, then you weren't ready to post a question. – Vince Mar 7 '16 at 22:43
  • Doing Data > Export Data > Format: GRID gives a 32bit pixel depth. – Steven Mar 7 '16 at 22:59
  • From Catalog, right-clicking on the image offers Export -> Raster as Different Format, which pulls up the Copy Raster UI, which has a "Pixel Type (optional)" pull-down – Vince Mar 8 '16 at 1:12

TauDEM uses three grid data types internally. These are

  • FLOAT_TYPE, corresponding to GDAL GDT_Float32
  • SHORT_TYPE, corresponding to GDAL GDT_Int16
  • LONG_TYPE, corresponding to GDAL GDT_Int32

It uses the method GDALRasterIO to read from whatever grid the user provides into the type that corresponds to the variable being used. According to http://www.gdal.org/gdal_tutorial.html this method automatically takes care of data type conversions (which is why it was chosen). So you should not need to convert an unsigned integer grid into a short integer grid to use in TauDEM.

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.