I have a python script tool that calls a MDCS. For some reason the edit raster function does not work anymore. I can apply it with the GUI tool and it works. I have tested with other TIFs. It actually worked before, but I cannot remember what I have changed.
extract from config file:
<?xml version="1.0" encoding="utf-8"?>
<Application>
<Name>Amberg1Demo</Name>
<Command>CM+SP+AR+ERF</Command>
<Workspace>
<WorkspacePath>C:\Users\Hackenberg\Documents\ArcGIS\Projects\MyProject3</WorkspacePath>
<Geodatabase>Amberg</Geodatabase>
<MosaicDataset>
<MosaicDatasetType>Source</MosaicDatasetType>
<Name>Amberg1</Name>
<SRS>25832</SRS>
<num_bands>1</num_bands>
<pixel_type>8_BIT_UNSIGNED</pixel_type>
<DefaultProperties>
<allowed_compressions>LZ77;None</allowed_compressions>
<default_compression_type>LZ77</default_compression_type>
<resampling_type>NEAREST</resampling_type>
<clip_to_footprints>CLIP</clip_to_footprints>
<clip_to_boundary>CLIP</clip_to_boundary>
<footprints_may_contain_nodata>FOOTPRINTS_DO_NOT_CONTAIN_NODATA</footprints_may_contain_nodata>
<allowed_mosaic_methods>NorthWest;None</allowed_mosaic_methods>
<default_mosaic_method>NorthWest</default_mosaic_method>
<cell_size>5</cell_size>
<metadata_level>BASIC</metadata_level>
<data_source_type>THEMATIC</data_source_type>
<max_num_of_download_items>200</max_num_of_download_items>
<minimum_pixel_contribution>50</minimum_pixel_contribution>
</DefaultProperties>
<AddRasters>
<AddRaster>
<dataset_id>Amberg</dataset_id>
<raster_type>Raster Dataset</raster_type>
<Sources>
<data_path>D:\Praktikanten\Hackenberg_Moritz\DTK-Workflow-test\2022-11-24</data_path>
</Sources>
<filter>*col.tif</filter>
<sub_folder>SUBFOLDERS</sub_folder>
<duplicate_items_action>OVERWRITE_DUPLICATES</duplicate_items_action>
</AddRaster>
</AddRasters>
<Processes>
<EditRasterFunction>
<edit_mosaic_dataset_item>EDIT_MOSAIC_DATASET</edit_mosaic_dataset_item>
<edit_options>INSERT</edit_options>
<function_chain_definition>DTK-colormap_PQS1.0.rft.xml</function_chain_definition>
<location_function_name>Mosaic Function</location_function_name>
</EditRasterFunction>
</Processes>
</MosaicDataset>
</Workspace>
</Application>
Does it maybe have to do with the order of the commands?
The python toolbox only calls the MDCS:
<
import MDCS
MDCS.main(2, ["x", r"-i:C:\Users\Hackenberg\Downloads\mdcs-py-master\mdcs-py-master\Parameter\Config\Amberg1.xml"])
Anything in the source documentation that is applicable?
Mosaic Dataset Configuration Script