I am new to working with a Map Service. I am using this public dynamic map service: https://mapservices.weather.noaa.gov/raster/rest/services/snow/NOHRSC_Snow_Analysis/MapServer
Layer ID:3 of this service is a raster layer representing snow depth. I am trying to understand if there are server side or client side functions that would allow me to only show areas based on a minimum and maximum snow depth range? I'm more familiar with an image service where I would use raster functions like mask, remap, and colormap to accomplish this.
Honestly I think I may be misunderstanding the fundamental concept behind a map service. Any help would be appreciated.
If the Map Service has dynamic map layers turned on (it usually is as that's been the default for ages) you can try something like this sample code to query out certain data from that sublayer and/or substitute a renderer that hides the undesirable pixels.
Hi @DavidSolari ,
I would like to learn more about "substitute a renderer that hides the undesirable pixels". This map service doesn't seem to have any fields that contain the snow depth data but perhaps I can read the pixel values of the raster layer.
Hi @KeenanStahl ,
MapImageLayers do not have raster functions instead you would apply a renderer, like a ClassBreaksRenderer to one of the sublayers.
https://developers.arcgis.com/javascript/latest/visualization/data-driven-styles/
https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-renderers/
Hi @Sage_Wall ,
I had looked into applying a renderer. Unfortunately, I don't see any fields in any of the sublayers that contain the snow depth data represented in the raster layer. Is their a renderer that can use the RGB values in the raster layer?
Sorry about that @KeenanStahl , I don't have a good answer for you. Without a snow depth field and being just an image there isn't really a way to modify the visualization of this Map Service after it's been published. All of the renderers rely on fields and values. I guess that's one advantage to publishing these kinds of layers as an Image Service, but you've got no control over that ☹️