hillshade with function does not export correctly?

6432
7
03-28-2016 08:39 AM
DuarteCarreira
Occasional Contributor II

So I've made a very good looking hillshade using a raster function like explained here:

Hillshade function—Help | ArcGIS for Desktop

I just used the defaults: Azimuth=315, Altitude=45.

But used a Z factor = 5.

The result in arcmap is very nice:

So now I'm trying to get this to a file... everything I tried does not replicate the same visual output. Anyone knows how to get this function result to a file (not a lyr, but a raster)?

First attempt: Data Export, like it says in the Help. This is the result:

As you can see there's plenty more "noise"...

Second attempt: run Spatial Analyst Hillshade tool with the same arguments... I get the same noisy result:

... geonet applies some kind of aliasing to the images posted. In my arcmap these images are even more grained.

So, the question is: how to save to disk a hillshade raster function that really reproduces what you see on screen?

Thanks.

7 Replies
DanPatterson_Retired
MVP Emeritus

well according to this Editing functions on a raster dataset—Help | ArcGIS for Desktop

there are three options for saving them, which I suspect you have explored, but I suspect that some of the properties and their appearance aren't translated to a static environment

0 Kudos
ChrisDonohue__GISP
MVP Alum

I don't know the exact answer (and have not used 10.4 yet), but will throw out some ideas based on where I have seen things go awry in more traditional raster export:

  • Are there environment settings that are causing the cellsize to be increased on export?  Check the output cell size to see if it came out far larger than expected.
  • Maybe after export Statistics need to be Recalculated for the image before displaying?
  • What type of Display Settings are being used when looking at the exported image?  When the exported image is being brought back in, is a Bilinear Interpolation or Cubic Convolution being applied to the display?

Chris Donohue, GISP

0 Kudos
ChrisDonohue__GISP
MVP Alum

Also, in the Help section What are the functions used by a raster or mosaic dataset?—Help | ArcGIS for Desktop
they start out with this:

The raster functions allow you to define processing operations that will be applied to one or more rasters. These functions are applied to the raster data on the fly as the data is accessed and viewed; therefore, they can be applied quickly without having to endure the time it would otherwise take to create a processed product on disk.

So I wonder it that means the product you are viewing is not fully processed to the point it could be exported, and instead a different or additional process will be needed to create the desired hillshade output?

Chris Donohue, GISP

0 Kudos
curtvprice
MVP Esteemed Contributor

You may want to use the stretched renderer with the function set to None. This will display the hillshade with zero to 255 as it is. Then if you export the raster using the Raster To Other Format tool you'll get what you started with.

Your grainy image looks resampled from the original resolution as nearest neighbor. If you're zoomed all the way out you may be looking at pyramid samples, not the original data.

0 Kudos
DuarteCarreira
Occasional Contributor II

Thanks all for the usefull suggestions!

It got me exploring some options. First, when zoomed to raster resolution images look the same. Differences appear at zoom out, so that got me thinking on pyramids... just like Curtis suggested.

The exported raster and the raster_with_function have the same settings:

Resolution: 50m

Pixel Depth: 8 Bit unsigned

NoData Value: (empty)

Pyramids: level 6, resampling: Nearest Neighbor

Compression: None

Display resample: None

Stretch: None

So I tried every combination of pyramids and display settings. The closest I got was building level 6, resampling: Cubic.

It got me close but it's not the same thing still... bit darker and grainier. But close to the original.

Really weird since the statistics of both rasters (dynamic with function vs exported) have the exact same statistics.

Left: original, dynamic with raster function                      Right: exported, bicubic pyramids

Differences are much less evident.

So maybe arcmap is not showing the correct description of the dynamic with raster function and there's something done to the image that we don't know about.

Anyway I'm going to accept these small differences.

Thanks to all who chimed in.

DuarteCarreira
Occasional Contributor II

Hi there again. I have been reviewing this and maybe I spoted the issue - still have to check...

But I followed this article: https://blogs.esri.com/esri/arcgis/2012/03/08/an-alternative-to-overlaying-layer-tints-on-hillshades...

So there's some fiddling with gamma values and max/min values there and that might explain the different rendering.

Going to try that when I get a bit of time.

0 Kudos
DanPatterson_Retired
MVP Emeritus
0 Kudos