Select to view content in your preferred language

Change Raster Mosaic Symbology to "Classified"

1691
3
01-19-2014 07:05 AM
JonathanMulder
Occasional Contributor
I have some Python scripting that creates two Raster Mosaic Datasets. The script then proceeds to add a number of surfaces simulating groundwater elevations. All of that is working well, but then I want to apply a color-ramped classified symbology from a layer file.

My layer file contains a classified symbology. But my Raster Mosaic Datasets have a "Stretched" symbology. My understanding is that the symbologyType property is ReadOnly and cannot be changed.

So my question is: Can the symbologyType of the Image layer in a Raster Mosaic Dataset be assigned to "Classified" when it's created?

Thanks for any insight you can provide.

Jon Mulder
Tags (2)
0 Kudos
3 Replies
JamesCrandall
MVP Alum
I have some Python scripting that creates two Raster Mosaic Datasets. The script then proceeds to add a number of surfaces simulating groundwater elevations. All of that is working well, but then I want to apply a color-ramped classified symbology from a layer file. 

My layer file contains a classified symbology. But my Raster Mosaic Datasets have a "Stretched" symbology. My understanding is that the symbologyType property is ReadOnly and cannot be changed. 

So my question is:   Can the symbologyType of the Image layer in a Raster Mosaic Dataset be assigned to "Classified" when it's created?

Thanks for any insight you can provide. 

Jon Mulder


Try to calculate statistics on the Mosaic. We are doing the same and manually right-click the mosaic in catalog tree then thru the Enhancements menu, choose Calculate Statisics (using all the defaults). Now when you access the Mosaic's properties, Classified should be available (which you can then apply the renderer of your choice).

However, when we attempt to programmatically Calculate Statisicts, arcpy.CalculateStatistics_management, it doesn't appear to work. So, I hope someone can chime in with some additional insight.
0 Kudos
JonathanMulder
Occasional Contributor
Thanks for you suggestion regarding "calculate Statistics".  Actually, I do Calculate Statistics, on the Raster Mosaic Dataset after I've created it and then added my rasters to it.  I had read on other threads that the Calculate Statistics is very necessary.

So, I think I'm in the same position as you are -- having to manually change the symbolization after the dataset is created and data added.  Maybe this would be a good item to put on ESRI's "wish list"?

In reading your post again, you mention that you can't programmatically Calculate Statistics; I'm able to do it with the following code:

   ##Calculate Statistics.
    arcpy.AddMessage("Calculating Statistics for " + ras + ".")
    arcpy.CalculateStatistics_management(ras, "1", "1", "#", "OVERWRITE")
0 Kudos
JamesCrandall
MVP Alum


In reading your post again, you mention that you can't programmatically Calculate Statistics; I'm able to do it with the following code:

   ##Calculate Statistics.
    arcpy.AddMessage("Calculating Statistics for " + ras + ".")
    arcpy.CalculateStatistics_management(ras, "1", "1", "#", "OVERWRITE")


We successfully run statistics with CalculateStatistics_management and we can verify that it completed by looking at the properties of the Mosaic. The problem is that if we load the Mosaic into ArcMap 10.1 and access the symbology tab, "Classified" is not available.  BUT, if we right-click the Mosaic in catalog and run Enhancement-->Caclulate Statistics then load the Mosaic into ArcMap, "Classified" is available in the symbology tab.

--Manually Calc statistics: Okay.
--Programatically Calc Statistics: It does it ok, but we cannot access the "Classified" properties after it completes.

I posted about this already and only solicited a reply that stated there are known issues and to submit a help ticket with ESRI.
0 Kudos