7

In ArcMap 10.2 I have a DEM and my aim is to change its color ramp using ArcMap, then export this colored raster as a geotiff (8 bit).

I checked "use renderer" and "force RGB" options but the results are not good (EDIT: when viewed in ArcMap). With some color ramps, the results are really off, and with others, they are slightly off.

For example: example 1: in ArcMapexample 1 exported

example 2: in ArcMap enter image description here

Is this a bug, or is this an artifact stemming from the the original image being simplified into an 8 bit image? (Does ArcMap stores its color ramps with more than 8 bits?)


it seems that results only look strange in ArcGIS - if viewed in other applications, colors look right.

So why is ArcMap displaying the exported rasters inaccuractly?

Do I need to change some settings somewhere to have them display correctly?

  • 1
    You might remove or play around with the stretch settings that ArcMap applies to the exported raster when you bring it back in. – johns Jul 8 '14 at 17:17
  • hi johns, when I drag the exported geotiffs into ArcMap, they show up as an RGB composite, so I assume I would need to probably change some settings there. Changing settings in stretched always seems to lead to complete loss of color. That being said, I haven't found what settings would need to change in the RGB composite (under properties> symbology) – GIStack Jul 8 '14 at 17:28
  • Are you exporting a subset (e.g. by dataframe) of the original image? – Aaron Jul 8 '14 at 17:58
  • no - just testing on a small raster (about 100 by 100 pixels) - output colored raster has same dimensions. – GIStack Jul 8 '14 at 18:00
  • 1
    Chris W nailed it. You might also find this interesting: blogs.esri.com/esri/supportcenter/2011/05/05/… – johns Jul 8 '14 at 18:52
17

I think you're missing something in what johns has said in his comment. When you are looking at the symbology for the raster there are two renderers to choose from - stretched and RGB composite. However, on the RGB composite settings there is also a stretch option. You need to set this to None.

dialog

There are a couple of ways to export a raster. If using the actual Export tool, note item 4. from that help file which states (emphasis mine):

Optionally, check the Use Renderer check box if you want to export the raster dataset with the current renderer options. Additionally, check the Force RGB check box if you want to export the output raster as a three-band RGB raster dataset with the current renderer.

If this exported raster dataset is brought back into ArcGIS, the stretched type should be set to None, since it is already stretched.

This means that if you don't change that to none, you're effectively doubling up your stretch effect (or applying two different stretches).

As far as bit depth, on the Export tool you can see a pixel depth - the values in your initial raster determine this, and it is set automatically to maintain those values. If your color ramp can be handled by 8 bits, there shouldn't be any issues. If it can't, the pixel depth should increase automatically. The Copy Raster tool allows you to change the pixel bit depth value, say if for some reason you wanted a 16-bit tif. Remember, you're taking a single band raster (DEM elevation value) and converting it to a three band raster (RGB), which means you don't have to store the entire value in a single pixel of whatever depth. The true value is the composite of three pixels, meaning those three can be lower bit depth than their single originator.

And while I don't think it's part of your issue here, I will point out that 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. But they should be pretty slight shifts, nothing too drastic.

  • 3
    Thanks for this clarification - changing the stretch type to none does not change the image, but doing this AND unchecking "apply gamma stretch" solves the issue! My only follow up question is how can I save these geotiff settings so that when someone else opens it in ArcMap, the image would open up with the desired colors? – GIStack Jul 8 '14 at 18:57
  • @GIStack That's caused by program settings. You might want to take a look at this help page. johns new comment links a blog post with one solution. Jakub's answer is another, which I cover in more detail at this question (ignore the GRID issue; tif symbolization/distribution is the same). Note the method you're using reclasses data, whereas that one doesn't and just specifies a color ramp to use. – Chris W Jul 8 '14 at 19:13
  • @GIStack should clarify - the blog post johns links to describes changing program settings up until the very last line - something you probably wouldn't expect whoever you send the file to do. But that last line says "Deleting the statistics will also prevent the display from being stretched." I think the real question is what are you sending - a picture of data or data. Because the RGB version of the DEM will pretty much be useless as a DEM. – Chris W Jul 8 '14 at 19:21
  • indeed the colored raster is no longer a DEM but rather it is a cartographic product. That said, I think there are still use cases for sending someone an exact cartographic layer without source data. It seems like it is not possible to send a single (cartographic) colored geotiff that will guarantee a specific display when someone opens it in ArcMap - the only way to guarantee a look in any ArcMap seems to be sending two files: the geotiff and the .lyr file (in which case it makes more sense to keep the original DEM data rather than convert it to 8 bit color) – GIStack Jul 8 '14 at 19:28
  • 1
    my tests show that deleting the statistics does nothing to help the color problems. Thanks for the tips. – GIStack Jul 8 '14 at 20:16
1

You can save the original layer file then add the exported tiff to map and import the saved layer file symbology in the raster Layer Properties -> Symbology tab. If the original raster is still in the map document you can also select it from the drop-down menu.

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.