Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.


I set symbology and exported each raster in my mxd (one by one) to jpg file. My script is ok and it works (it is shown at the bottom).

The question is: how can I customly set my legend? Now I have those standard labels ("High: #max.number" and "Low: #min.number"), see the image link. Is it possible to use a python script that sets labels different, for example "Max. value: #maximum number" and "Min. value: #minimum number"? I have 200 images and renaming each legend is time consuming...

cheers! Rok

image link (example):

enter image description here

MY SCRIPT:
mxd=arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
    arcpy.ApplySymbologyFromLayer_management(lyr, "my_first_layer")
for lyr in arcpy.mapping.ListLayers(mxd):
    #turn off all layers
    lyr.visible = False
for lyr in arcpy.mapping.ListLayers(mxd):
    #turn one layer on at a time and export ...
    lyr.visible = True<BR>
    arcpy.mapping.ExportToJPEG(mxd, "D:\\Users\\JPG_FILES\\"+ lyr.name 
                                     +".jpg",resolution=300)
    lyr.visible = False
share|improve this question
add comment

1 Answer

If you are using ArcGIS 10.1 then the new RasterClassifiedSymbology class of arcpy.mapping may be what you need to look at.

share|improve this answer
2  
Yeah, 10.0 does not have this option. –  Tomek Oct 23 '12 at 10:02
    
thank you for the advice. but it doesn't help. i don't have classidfied symbology. i have stretched symbology. when i check lyr.symbologyType it returns me "OTHER". –  Rok Oct 23 '12 at 12:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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