2

I am trying to manualy change the break values for my raster image through layer properties and then symbology and classified manual. Whilst i am able to do this, I cannot figure out a way to save these values so that the next time I am on ArcMap it loads the raster with the manually changed break values.

Does anybody know how to do this?

  • How is your python? You can access the values (read/write) with arcpy.mapping resources.arcgis.com/en/help/main/10.2/index.html#/… see the examples. – Michael Stimson Jan 3 '18 at 1:13
  • @MichaelStimson, in fact this talks about one raster as far as I can see and saving as a layer could solve OP's problem. However if the no of classes and the ramp (assuming the symbology type would be the same) are to be applied different rasters, I think, your suggestion with Reclassify() call will be the answer. – fatih_dur Jan 3 '18 at 7:08
  • 1
    @fatih_dur, see my comment after the answer by cmrRose. The OP appears not to want the classes reclassified but to keep the same class ranges as the original raster. As it turns out this can be saved as a layer file and applied using ApplySymbologyFromLayer but only if the classification type is manual. – Michael Stimson Jan 4 '18 at 22:05
3

You can try saving your symbology as a .lyr file, then importing it when you want to re-use the symbology:

After setting your preferred symbology (edit: you must use the 'Manual' Classification Method for this to work, as @michael-stimson notes), right-click on the layer in the Table of Contents and select "Save as Layer File." Note where this file is saved. The layer file contains a reference to where your data file is stored as well as the symbology that you have set.

You can use the layer file in two different ways:

  • If you want to reference the same data layer and it's stored in the same place, just use 'Add Data" to add the .lyr file to your map document.

or

  • When you have any layer that you want to use the same symbology settings, you can go to the Symbology tab on the Layer Properties and use the "Import" button (looks like a folder with arrow -- see image below), then select your .lyr file that you just saved. This should import your manually-set class breaks and colors.

enter image description here

  • Nice try, unfortunately this is does not work as expected. Although the symbology type, number of classes and colour ramp are copied to the new layer the class break values are not, the copy 'to' layer is classified according to its value range. To copy the values from one layer to another you need to use arcpy.mapping module after copying the symbology with apply symbology from layer or using ArcObjects. – Michael Stimson Jan 3 '18 at 1:29
  • @MichaelStimson I'm not sure what I'm doing differently, but importing symbology from a .lyr file does import my manually-typed class break values. For instance, I open a raster file with values between 2 and 300, choose Symbology > Classified > Classify... > Method: Manual, and type break values at 2, 4, 6, 8, 10, 12. Then I save it to a .lyr file. Then I open a new Arcmap doc and add a different raster with values between 0 and 0.5, open Symbology>Classified>Import... and select the .lyr file. The break values are set exactly as I typed: 2,4,6,8,10,12. Maybe I don't understand the question – cmrRose Jan 3 '18 at 18:15
  • 1
    You're right, it does work that way, but only if the classification method is Manual; if the classification method is Quantile, Standard deviation etc.. then the symbology is applied and the classification is changed to match the 'to' raster statistics... well, I've learned something today. +1 from me. – Michael Stimson Jan 4 '18 at 22:01
0

In the layer properties, under the symbology tab, select show:Classified (menu on the left), then on the right/top are two little icons, an open folder icon and a save icon. Clicking the open icon allows one to import the symbology from another layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.