Friday 20 April 2018

dem - Is there a way to programatically force RGB (3 bands) in a raster with arcpy?


I'd like to include conversion to a 3 band RGB raster in a script to prepare multiple DEMs for image processing. The input files are rasters extracted from a raster mosaic.


The manual option is to use the Export Data option in the TOC, but I have to repeat this for 15-25 different rasters so I'd like to automate it.


Each input raster is a single band that I'd like to force RGB like the image below (maunal method).


enter image description here



Answer




I got some help from an ESRI employee. Apparently there isn't a Python method available to accomplish this, but you can export a Raster and force RGB through ArcObjects (IRasterLayerExport Interface).


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...