I am using the mosaic to new raster tool to mosaic two rasters together, one 2-bit and one 4-bit, and the output raster has given all the previously nodata pixels the value 3. Some of the pixels in the output should be 3, their original and intended value, while the majority should be nodata or a much higher or lower value like 255 or -/+ 32,768 that appears when I use the mosaic tool on data with different extents.

Any idea what could be causing this? Should I be converting the 2-bit data to 4-bit to match the other raster?

I have used the tool on very similar data for the exact same process and not had an issue like this before.

1 Answer 1


Yes, make the data 8 bit. I would use GDAL_Translate -ot byte, it's less messy than trying to do it in ESRI.

Mosaic to new raster will also resample your data if there isn't an exact (or near exact) cell alignment. In the mosaic tool, which is called by mosaic to new raster there is a cell alignment parameter which determines if a raster is resampled or shifted. A value of 0.5 guarantees shifted cells, but this parameter is missing from the to new raster tool; to avoid resampling your classified data either get the cells to line up or use the straight mosaic tool - you need to create a new raster to put it into.

To get the cells to line up you can use Shift with a snap raster of one of the other rasters.

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.