I would like to programmatically export symbology for a raster dataset as a raster function template xml file, as can be done by clicking the export button in the symbology tab of the layer properties dialog in ArcMap 10.2.2.
I wish to do this in a batch environment (outside of ArcMap) using ArcObjects.
Subsequently ESRI Canada support advised that the export required above is not exposed in the ArcObjects API. However I have found that xml serializing the RasterRenderer for the layer, snippet here, does in fact produce the same content as seen as the value for the Renderer variable in the manually / UI exported raster function template (!).
I'm trying to bring the symbology across for individual rasters after they are added to a mosaic dataset. Color maps seem to come across, but stretches don't. So after realizing the above, I'm working on wrapping the RasterRender serialized XML to be a raster function template and then applying it.