Select to view content in your preferred language

Mosaic to new raster is not showing all values in output raster

7253
7
10-04-2018 09:54 PM
CaraMayo1
Emerging Contributor

I am using the mosaic to new raster tool to combine 3 rasters. They have the same pixel type and number of bands. In Environments -> Processing Extent, I select "union of inputs". When I run the tool, however, only the attributes of the first DEM that I selected in the tool's Inputs shows up. The range in the legend is still correct, but the actual values in the attribute table don't match the legend.

I've seen a couple other questions similar to this one but I haven't seen any answers to them. Does anyone know why my attribute table is only showing 1 of my raster dataset values?

Thanks!

7 Replies
DanPatterson_Retired
MVP Emeritus

Cara,

is there overlap in the inputs?

is it an enterprise gdb? 

what were the range of values for your inputs and what did you end up with? (in light of the above)

In the case of overlap and the extent options, the help suggests that Mosaic offers more options in the mosaic type option. 

Mosaic To New Raster—Data Management toolbox | ArcGIS Desktop 

Mosaic—Data Management toolbox | ArcGIS Desktop 

0 Kudos
CaraMayo1
Emerging Contributor

Hi Dan,
There is a small amount of overlap in the inputs on the borders. I'm not using an enterprise gdb. The range should be 0-91 (dem1:0-52; dem2: 0-91; dem3: 0-30). I see the range 0-91 in the legend each time. If I select dem1 first when I select inputs, my output raster is identical to dem1 and doesn't include values or counts for dem2 and dem3.

I've read through the Mosaic to new raster help page and played around with the overlap and extent options and nothing has made a difference yet. Maybe there's something I haven't tried yet.

0 Kudos
GuenterDoerffel
Esri Contributor

Cara,
I assume by reading your rasters have colormaps - so individual values assigned to individual colors/labels. By what you write, the different rasters dont have identical colormaps, though. When you turn 3 rasters into one, there can only be ONE colormap. Thats what the "mosaic_colormap_mode Property of the tool is meant to control. If you didnt set it at all, the first colormap coming up in any file will be used for the output. Try "match" for a better result, if you have more than one colormap.  But this has limits: If within many colormaps the same value is assigned to different classes, this will fail (say water is 8 in one dataset and in another forest is 8).

Best would be to analyze this in advanced. When needed, a mosaic dataset can be created that first "homogenizes" your datasets using a raster function on each raster, then assigns the AttributeTable you want to the result ... and then you can still export 🙂    Let me know if you need assistance - but then I#d need the data

Guenter  

 

CaraMayo1
Emerging Contributor

Hi Guenter,

I don't believe my dems have colormaps. They are all black and white values that are stretched from min-max. Perhaps I'm not understanding exactly what a colormap is...? I tried setting the color ramp to MATCH and nothing changed.

0 Kudos
GuenterDoerffel
Esri Contributor

Sorry Cara,

now that you mention again, I see the word DEM in your original post - no Colormaps for DEMs 🙂
Have you re-calculated the statistics for the resulting raster after you merged them?
And please also make sure to set the property for the raster type to elevastion so the stretching applied is min-max by default.

Guenter

0 Kudos
DanPatterson_Retired
MVP Emeritus

And a reminder to do examine/calculate statistics for each dem separately and not for the resultant mosaic because...

When using this tool to calculate statistics on a mosaic dataset, the statistics are calculated for the top-level mosaicked image, not for every raster contained within the mosaic dataset.

Calculate Statistics—Data Management toolbox | ArcGIS Desktop 

0 Kudos
CodyBenkelman
Esri Regular Contributor

Cara

you said that the output raster is identical to dem1 and doesn't include values or counts for dem2 and dem3.  Do you mean the pixels and extents of dem2 and dem3 were simply ignored and not properly added into the output raster?  If that's the case, it sounds like a bug.  What version you're using?  If you're on an old version, this may be a bug that was fixed long ago.  Are you using ArcGIS Pro?  ArcMap?  You should work with Support on this.

If I misunderstood and the pixels are all there but simply the attribute table has not been updated, have you run "Build Raster Attribute Table" on the new raster after combining the three source rasters?

Last, (re: Dan's last comment), don't confuse a Mosaic Dataset (a database structure unique to ArcGIS for accessing and mosaicking separate rasters on-the-fly) with a mosaic.  This is the first mention of a Mosaic Dataset (which I might recommend if you're not using the resulting file outside ArcGIS, and you have some experience with it) but I assume you have a reason for wanting to create a new file with all three original datasets combined into one. 

Cody

0 Kudos