Rasters in mosaic dataset turn out black and white after footprint editing

6006
7
Jump to solution
12-18-2017 05:30 AM
Labels (1)
JelenaCvetinovic1
Esri Contributor

After creating mosaic dataset, rasters are added to it and footprints are edited because every raster has the white frame that has to be removed in order to get mosaic image. After editing footprints RGB rasters turn out to be black and white. Rasters and mosaic dataset do not have statistics calculated, color balancing is not applied. 

Same workflow is replicated in ArcMap 10.3 and after editing footprints rasters remain in their original state (RGB) except they are clipped to new footprint.

All raster are in .tiff format.

Footprints editing is done both manually in Edit session and using GP tool Import mosaic dataset geometry. Result is the same. After clipping raster to new footprint, raster change it properties and turn out black and white.

Please, refer to attached images Mosaic 1 through Mosaic 4.

Also, after sharing mosaic as image service same thing occured. Mosaic is created in 10.3 and published through 10.3 client to ArcGIS Server 10.5.1 and then opened in both ArcMap 10.3 and 10.5.1 and result is black and white rasters.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

do you mean this bug? http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwODQyNQ==

The double == for some reason always gets parsed from a url copy paste

View solution in original post

7 Replies
PeterBecker
Esri Regular Contributor

I have not been able to reproduce this. Can you clarify what version of desktop you are using to edit the mosaic dataset. If you set 'Always clip raster to footprint' to Yes and then edit the footprints, does this work and not turn to bw. I noticed the image are scanned maps. Can you confirm if these are 3band images or are they 1ban 8bit with a color map. I'm trying to determine if the colormap for the images got lost

0 Kudos
DanPatterson_Retired
MVP Emeritus

do you mean this bug? http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwODQyNQ==

The double == for some reason always gets parsed from a url copy paste

PeterBecker
Esri Regular Contributor

Please correct link. "This bug does not exist"

0 Kudos
DanPatterson_Retired
MVP Emeritus

fixed.. double == in the url gets stripped for some reason

0 Kudos
JelenaCvetinovic1
Esri Contributor

Thank you for help Dan. This was the issue with my rasters. 

0 Kudos
JelenaCvetinovic1
Esri Contributor

As I said desktop version is 10.5.1. I tried same in 10.3 and there was no problem at all. Option "Always clip rasters to footprint" is set you "Yes" and it's 3 band rasters. The thing I don't understand is that same data, same workflow is working perfectly with 10.3 but with 10.5.1 it produces bw rasters in the mosaic.

0 Kudos
PärSmårs
New Contributor III

I got bitten by the same annoying bug. My remedy was to add two raster functions to the Mosaic Dataset:

1. Make sure your Mosaic Dataset is 1-band 8-bit unsigned

2. Create a colormap (*.clr) file from one of the images, say image1.tif > image1.tif.clr (Symbology tab for the image)

3. In the database (file/sde) double-click the Mosaic Dataset, and then navigate to the Functions tab

4. Right-click your existing Mosaic Function (the bottom most function, default) and select Insert Function > Colormap Function

5. Navigate to the Colormap tab make sure the Colormap radio button is selected, then add your .clr file using the bottom folder button to find it, press OK

6. Then do the same again, but select the Colormap To RGB function, while right-clicking the Colormap Function you just added.

From top to bottom, you will now have:

Function Chain

<your own Mosaic Dataset name>

Colormap To RGB Function

Colormap Function

Mosaic Function

You may also need to adjust output data such, that you have 8-bit unsigned, in each of the functions. Might not be needed. YMMV...

If you have images that have individual colormaps such, that if you add one colormap as a file like above, the result will look like something the cat threw up on your kitchen floor. Then you need to use a different technique:

1. Make sure your Mosaic Dataset is 3-band, 8-bit unsigned

2. Create a Raster Function Template file (.rft.xml) and add the function Colormap To RGB to it and save the file

3. Apply this function on each of the images using the Toolbox tool Edit Raster Function (note the checkbox at the top to apply the function on each image instead of to the Mosaic Dataset).

This last technique might not be optimal if you have many images, since each image has to be converted using a raster function, but it works.

Good luck!

0 Kudos