How to manage rasters with different bands by using Mosaic Datasets

3070
4
01-02-2018 11:45 PM
JackBao
New Contributor

    Hi, 

    I have  some rasters with different bands,bit depth,cell size.And i want to publish them into webserice just for displaying them without any other porcessing.

      At first ,i loaded them into same Mosaic Datasets, but some  of them display complete black color.

   

      I read the help file on esri website Mosaic Datasets—Standard Workflow_Overview | ArcGIS ,and i create 9  Source Mosaic Datasets that have same number of bands, bit depth, and type of metadata.

   

      My question is should I create  Derived mosaic datasets (like add two types of A1 into same derived mosiac),if i need to ,what bands and bit depth should i set.Or do i have any other better choice

    

      Thanks in advance.

     The picture show metadata of rasters:

metadata of rasters

0 Kudos
4 Replies
JayantaPoddar
MVP Esteemed Contributor

How about you

1. add all the Rasters to ArcMap

2. Change the Band combinations and other symbology properties, as desired.

3. Change the order of the Raster layers in Table of Contents (the layers with more preference, in case of an overlap, should be on top).

4. Select all the Raster layers in Table of Contents > Right Click > Group.

Working with group layers—Help | ArcGIS for Desktop 

Publish this map document as a map service. 

N.B.: You could also add scale dependent visibility range for the Raster layers (in MXD) to control their visibility at particular scale ranges.

Displaying layers at certain scales—Help | ArcGIS for Desktop 



Think Location
0 Kudos
PeterBecker
Esri Regular Contributor

Adding rasters as a group in a map document and then serving as a map service, is one way to go, but it does not scale and does not provide control over display (or any processing). It is not clear what you want to do with the imagery or how you want it displayed. You mention 'just display without any processing', but also indicate that most of the data has >8bit and 3bands and includes datasets such as 7bands 32bit. Some processing is going to have to be done if you want to display this data..

It also not clear what sort of a web environment or user experience you want. One approach would to to create a mosaic dataset, but define it as Nbands=7 and Bits=32bit float. Do this as you create the mosaic dataset. You can then add all rasters to the mosaic dataset. Internally all rasters will be converted to 7band 32bit float. Now you can add as a mosaic dataset or serve as an image service. If you set the rendering to be Min/Max or StdDev with DRA on, you should be able to see the imagery. In the webmap you can also define the band combinations to display and if required set up various raster function to process the imagery in different way. I would suggest you ensure that pyramids exist for each dataset. Assuming there image do not form a mosaic then you should set MinPS=0 and MaxPS=HiPS*10. There are lots of ordering rules you can define if required.

If the image is overlapping then probably want to have a workflow by which users select specific raster and then lock to that raster for display.

My other recommendation would be to review the datasets that you have and determine if there more standardized groupings eg specific modalities or types of display. Then create mosaic dataset that group these together. It is possible that a number of the rasters get added to different groups possibly with different renderings. Eg you may determine that there are some specific band selection and rendering of the 7band 32bit data that makes is look similar to a specific band selection and rendering of the 4band 32bit data, in which case you can create source mosaic datasets of each subgroup with appropriate rendering and then combing into a derived mosaic dataset.

0 Kudos
JackBao
New Contributor

     Hi,peter,thanks for reply.

     I have thousand of rasters,and i want to publish them to web as basemap by arcserver(http service,display single one each time),the picture I upload is the metadata that i Organize.Obviouslyit's not wise to add rasters in one map document or one raster one map document.So,i use mosaic datasets to manager these rasters.

    I follow your suggestion and create a  7band 32bit mosaic,publish the mosaic to imageservice.I decide to send raster function from client,then i got a problem, the js api do not append RenderingRule to url,do i miss some key parameter?

var rasterFunction = new RasterFunction();
rasterFunction.functionName = "Stretch";
var arguments = {};
arguments.StretchType= 3;
arguments.NumberOfStandardDeviations = 50;// parseFloat(dojo.byId('txtSD').value);
// arguments.NumberOfStandardDeviations = parseFloat(dom.byId('nameDev').value);
arguments.Gamma =[1.25, 2 ,3.95];
arguments.Statistics = [
[0.2, 222.46, 99.35, 1.64],
[5.56, 100.345, 45.4, 3.96],
[1000, 352.37, 172.284, 2]
];
rasterFunction.functionArguments = arguments;
rasterFunction.variableName = "Raster";
imageServiceLayer.setRenderingRule(rasterFunction, false);

imageServiceLayer.refresh();

Thanks!

0 Kudos
PeterBecker
Esri Regular Contributor

Jack

I suggest you review ArcGIS Server REST API 

Also open the image service in the 'ArcGIS Online map viewer' accessible from the Service URL. This will provide options to set rendering rules and you can look at the syntax. Also check out the 'Export Image' section at the bottom of the service URL.

0 Kudos