Publish a single raster file as an image service with thematic symbology and a readable legend

330
2
Jump to solution
02-16-2022 03:00 PM
Labels (1)
AaronKoelker
Occasional Contributor III

I feel like I've done this in the past, but I'm stuck on how to make this work now with ArcGIS Pro and Server/Portal:

I have a single raster file (a .tif, but have also tried .crf and .cog). It is comprised of a single band containing thematic data. I would like to share this raster/thematic data as an image service via ArcGIS Server/Portal. Currently I have the symbology (colors and value labels) set up as needed via the layer symbology in a map, and have tried exporting that configuration as a raster function template -- but I can not get any of it to stick when sharing it to an image service. I need it so that when a user adds the image service into a new web map, the desired colors are drawn by default and the legend contains the value labels.

The closest I have gotten is to get the correct colors to show using three RGB bands, but then the value labels are gone. I've tried using a colormap as well but I can't get the datasets transparent NoData value to work correctly when doing that, and the value labels don't work with that either.

Can anyone point me in the right direction for how to make this work? It feels like it should be a simple process, but I'm having trouble finding much documentation on the issue. I haven't tried putting it into a mosaic dataset yet, since it's a just single image, but I suppose I'll try that next.

Desired legend when adding service to mapDesired legend when adding service to mapClosest I've gotten, correct colors, no legendClosest I've gotten, correct colors, no legend

-Aaron
0 Kudos
1 Solution

Accepted Solutions
AaronKoelker
Occasional Contributor III

I got the result I was looking for by following the process in the first half of this video -- adding a Red, Green, and Blue short integer field and calculating the colors for each class. I'm not sure if this is the best method or the only method, but it is a method and for now it will work. If you had a ton of classes, manually inputting the RGB values would be a pain.

Hope this helps someone else if they come across this post.

-Aaron

View solution in original post

0 Kudos
2 Replies
AaronKoelker
Occasional Contributor III

I got the result I was looking for by following the process in the first half of this video -- adding a Red, Green, and Blue short integer field and calculating the colors for each class. I'm not sure if this is the best method or the only method, but it is a method and for now it will work. If you had a ton of classes, manually inputting the RGB values would be a pain.

Hope this helps someone else if they come across this post.

-Aaron
0 Kudos
DanaPeterson1
New Contributor II

Having the same issue. I can't believe creating and calculating RGB columns is the only solution. 

0 Kudos