I want to export an esri grid-raster into a *.tiff without losing the symbology I created for the grid (the symbology is classified). enter image description here

No matter how I try to solve it I get a stretched symbology in a greyscale. What I've tried so far:

  • Copy/export raster via: toolbox; TOC, rightclick --> data --> export data. When checking the 'Use Renderer' and 'Force RGB' boxes on the data export menu a lot of values turn into 'noData'. Furthermore, the colors are slightly different.
  • Created a layer-file from the original raster. Copied the grid and tried to set the source of the layer file to the newly copied raster. However, I could not set the new source.
  • Imported the symbology using a *.lyr file (Chris W's comment) with the folder button next to the save button upper right of the image: nothing happened.
  • Imported the symbology directly from my symbolized grid (Chris W's comment): nothing happened.

There must be a way to solve this but I cannot find a solution... Any hints?

Edit: Added clipped grid and *.lyr-file here.

  • There is a long-standing issue with not being able to edit layer (lyr) files, particularly for the path (possibly solved in scripting, but beyond the scope of the problem here). Rather than alter the source, have you tried applying the symbology and then saving a new layer file? On the symbology tab of your tif, you should be able to import a symbology either directly from your symbolized GRID or from its saved layer file (the folder button next to the save button upper right of your image).
    – Chris W
    Commented May 12, 2014 at 18:34
  • A workaround is to have the layer as the only object in a data frame then export to tiff (with a world file) in the same manner as export to PDF. Some nasty maths is involved with keeping the cell size based on the scale and output resolution. Commented May 12, 2014 at 22:10
  • Can you clarify what you want your end result to be? Are you looking for a single-band tif that preserves the orginal cell values, but to save your symbology classification? The symbology can be imported from any source layer, layer file, or raster function template xml file, and then a new version of that symbology saved pointing to the correct source. Are you wanting that symbology to load by default without a lyr/etc file? If you want a multiband RGB tiff that looks like your grid, you can check the 'Use Renderer' and 'Force RGB' boxes on the data export menu (no need to reclassify).
    – Chris W
    Commented May 13, 2014 at 1:33
  • @ChrisW, that's a much easier way to do that than my answer, none of the messing around and it doesn't need any extensions, it's a bit messy with the NoData but there's ways to get around that. Perhaps you should change that comment to an answer, I'd vote for it. Commented May 13, 2014 at 4:09

2 Answers 2


Ok, there is a way to do this but it's nasty.

Using your ranges (in a table or ASCII file) reclassify the data, this will turn your ranges into values (like 23.6-24.4 becomes 1). Then you can apply a colourmap to the file to get the same colours, this is the nasty part. The colourmap file looks like this:

1 255 255 0
2 64 0 128
3 255 32 32
4 0 255 0
5 0 0 255

See here about making a colourmap file... you have to longhand get the values, you can do this by double clicking on each patch and getting their RGB values. Then the exported, colourmapped image will be exacty the same as the classified raster.

  • Indeed, this is a nasty way but it works. If you plan to this with several grids it's a bit awkward. Commented May 13, 2014 at 7:29
  • When I was using this method the colourmap file was the same for each, I was using it to stack 1bit bitmaps of EPS separates to digitally produce what would be printed... black was 0x01, so anything odd was black, blue 0x02, green 0x04.. simple binary addition. but that was in AML on ArcINFO workstation; GIS people don't deal with separates much now, they leave it to the printers. Commented May 13, 2014 at 21:41
  • 1
    @C.B. If you reclass your data and get it under 25 unique values (which it looks to be from your image - 15 classes?), you have another option to generate the color map file. On the symbology tab, change to Unique Values and apply your color ramp, then use the Colormap drop-down button to export it.
    – Chris W
    Commented May 14, 2014 at 1:41
  • Great exemple, but doesn't work for me... It works well if I have multiple classes, but if I have only one, after applying "add colormap" containing only my one row for a class, I've always obtain the raster "stretched" scale insted of defined 1 0 97 0 in .clr file... I've created .clr file manually - copying and deleting values from previous one, could that be the problem?
    – maycca
    Commented May 19, 2016 at 5:01
  • @maycca, there should be at least two classes or all the raster would be the same value (dull green in your case). I suspect you raster has class 1 and NoData values only, try unsetting the NoData value (by setting to a value that is in range for your raster type but not present in the data and applying the reclass then set the NoData in the reclassified raster to the new value for class 0. Commented May 22, 2016 at 23:10

There are a couple of ways to go about this depending on exactly what output you are wanting.

If you want a single-band tif that preserves the original GRID values, you just need to apply the symbology of your GRID to an unmodified, exported tif.

  1. Right-click the GRID in the TOC and choose Data > Export Data. At the bottom left of this dialog is a help link you may want to read, particularly points 4 and 7. Set format to tif and choose compression if any, but change nothing else. (Note the pixel depth - the values in your GRID determine this, and it is set automatically to maintain those values. The Copy Raster tool allows you to change this value.) Hit Save and add it to the map.

    Export new raster

  2. Prepare symbology for import: Right-click the GRID again and save a lyr file, or do not save a lyr but make sure your symbolized GRID is added to the map.

  3. Apply the symbology: Open the symbology tab for the tif, change the type to classified (else you will get an error), and click the import folder icon upper right. Either browse to the saved layer file or select the GRID layer already in the map from step 2 and click apply.

    Import symbology

    Apply Symbology

  4. You can now save a new lyr file from the symbolized tif that will have the correct source. As mentioned in my comment, there is a long standing issue about not being able to edit lyr files, particularly as relates to pathing - it seems to ignore relative pathing when set. The simplest solution with a few layers is to just apply the symbology to your new source and save a new lyr file. With a number of layers, I believe some python scripting has been developed to fix them, but that's another question.

If you want a single-band tif that reclasses your data to fit a value range that is the number of your classes, you can use the color map method Michael describes. Alternatively, you have another option to generate the color map file from his method as long as you have fewer than 25 unique values in your data. On the symbology tab of your reclassed raster, change to Unique Values and apply your color ramp, then use the Colormap drop-down button to export it. Note that (by my testing anyway) using a color map will not allow you to preserve your legend labels - that can only be done with a lyr file.

If you want a multi-band RGB tif that reclasses your data to fit that value range (0-255 per each band), you can do it directly in the Export Data dialog by checking the 'Use Renderer' and 'Force RGB' boxes. There are a couple of considerations with this method (aside from the reclassing of the data).

  • As mentioned in the help file points referenced in 1 above, the process applies a stretch. If added automatically to the map, you need to go into the symbology to change the stretch method to none, otherwise you are doubling the stretch effect.
  • Also mentioned in that help file, you may need to specify a 'no data' value, otherwise it will pick one for you with potentially undesirable results.
  • Depending on the color ramp used in the original symbology, you may get slight color shifts when going to RGB. Some ramps and methods of color selection use other models, such as HSV, which there may not be a direct RGB value translation for.
  • If you only look at a single band, yes, a lot may be changed to no data, as it's only the combination of all three bands that will represent the original values.
  • Thx for your answer. I want a single band tif. Following your first part of the answer everything works out until 2. When I try to import either my saved layer file or the symbology from the grid (after switching to 'classified') nothing happens. I neither find an imported symbology nor does anything change. I've got no idea what I am missing... Commented May 14, 2014 at 12:03
  • @C.B. When you click the import (folder) button, it shows you the GRID in the drop-down list or allows you to click the (new) folder button and browse to your lyr file, but when you select either and click Ok nothing changes in the symbology tab (map wouldn't until you click apply of course)? That's very odd. I didn't have a GRID to test on, so I converted a tif raster to a GRID first, symbolized it, and then followed the steps outlined above. I wonder if it's something to do with your particular GRID format. Would you be able to post it or a clipped area from it and the lyr file?
    – Chris W
    Commented May 14, 2014 at 18:55
  • Thank you for your support! I uploaded a clipped area of the grid and the layer file here: geospatialview.de/wp-content/uploads/2014/05/evening.zip Commented May 15, 2014 at 7:35
  • @C.B. Well it's not the GRID format. I was able to use the same method I described above and import the symbology from either the lyr file or the symbolized GRID. I've added a couple of screenshots from in-process to hopefully help clarify things. Beyond that I have no idea why it wouldn't work for you.
    – Chris W
    Commented May 15, 2014 at 21:17

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.