# esri/mdcs-py architecture

> Architecture diagram of the GitHub repository esri/mdcs-py, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/esri/mdcs-py
- Repository: https://github.com/esri/mdcs-py

## Overview

MDCS is an ArcGIS mosaic-dataset automation tool. A user supplies an XML configuration or job, the MDCS entry point dispatches workflow commands, and those commands create/configure/populate mosaic datasets through ArcPy. Processing metadata, custom fields, referenced datasets, and raster ingestion are distinct stages. The repository also includes MDTools management utilities for proxy handling, location export, search/replace, and image-service publishing. Some MDTools internals are distributed rather than sampled here, so those documented integrations are shown conservatively.

Main entry points: [`scripts/solutionsLib.py`](https://github.com/esri/mdcs-py/blob/master/scripts/solutionsLib.py) (Workflow dispatcher), [`jobSamples/hello.job`](https://github.com/esri/mdcs-py/blob/master/jobSamples/hello.job) (Job input), [`scripts/AddRasters/AddRasters.py`](https://github.com/esri/mdcs-py/blob/master/scripts/AddRasters/AddRasters.py) (Add rasters), [`scripts/CreateRefMD/CreateRefMD.py`](https://github.com/esri/mdcs-py/blob/master/scripts/CreateRefMD/CreateRefMD.py) (Referenced mosaics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and orchestration"]
  node_job_input["Job input<br/>[hello.job]"]
  node_mdcs_cli["MDCS entry point<br/>[MDCS.py]"]
  node_workflow_engine["Workflow dispatcher<br/>[solutionsLib.py]"]
end

subgraph group_configuration["Configuration processing"]
  node_xml_config["XML configuration<br/>[sample.xml]"]
  node_base_runtime["Base runtime<br/>[Base.py]"]
  node_process_info["Process metadata<br/>[ProcessInfo.py]"]
end

subgraph group_mosaic["Mosaic lifecycle"]
  node_create_md["Create mosaic<br/>[CreateMD.py]"]
  node_add_rasters["Add rasters<br/>[AddRasters.py]"]
  node_referenced_md["Referenced mosaics<br/>[CreateRefMD.py]"]
  node_add_fields["Custom fields<br/>[AddFields.py]"]
  node_md_properties["Mosaic properties<br/>[SetMDProperties.py]"]
  node_mosaic_store[("Mosaic dataset store")]
  node_raster_sources[("Raster sources")]
end

subgraph group_management["Management tools"]
  node_mdtools["MDTools package<br/>[MDTools_Setup.zip]"]
  node_proxy_search["Proxy search replace<br/>[search_replace.py]"]
end

subgraph group_publishing["Publishing integration"]
  node_publish_tool["Publish image service"]
  node_imagery_service["Imagery service client<br/>[imagery_service.py]"]
end

node_user(("User"))
node_arcgis_server["ArcGIS Server or Portal"]

node_user -->|"starts workflow"| node_mdcs_cli
node_user -->|"provides job"| node_job_input
node_job_input -->|"loads job"| node_mdcs_cli
node_mdcs_cli -->|"dispatches commands"| node_workflow_engine
node_xml_config -->|"reads XML"| node_base_runtime
node_job_input -->|"supplies parameters"| node_base_runtime
node_base_runtime -->|"loads processes"| node_process_info
node_process_info -->|"provides metadata"| node_workflow_engine
node_workflow_engine -->|"invokes creation"| node_create_md
node_workflow_engine -->|"invokes ingestion"| node_add_rasters
node_workflow_engine -->|"invokes references"| node_referenced_md
node_workflow_engine -->|"invokes fields"| node_add_fields
node_workflow_engine -->|"invokes configuration"| node_md_properties
node_create_md -->|"creates dataset"| node_mosaic_store
node_add_rasters -->|"reads rasters"| node_raster_sources
node_add_rasters -->|"adds items"| node_mosaic_store
node_referenced_md -->|"creates references"| node_mosaic_store
node_referenced_md -->|"sets properties"| node_md_properties
node_add_fields -->|"adds fields"| node_mosaic_store
node_md_properties -->|"reads and writes"| node_mosaic_store
node_user -->|"runs management"| node_mdtools
node_mdtools -.->|"manages proxies"| node_mosaic_store
node_mdtools -.->|"exports locations"| node_raster_sources
node_user -->|"runs replacement"| node_proxy_search
node_proxy_search -->|"rewrites XML"| node_xml_config
node_user -->|"publishes service"| node_publish_tool
node_publish_tool -->|"calls client"| node_imagery_service
node_imagery_service -->|"manages services"| node_arcgis_server

click node_xml_config "https://github.com/esri/mdcs-py/blob/master/Parameter/Config/sample.xml"
click node_job_input "https://github.com/esri/mdcs-py/blob/master/jobSamples/hello.job"
click node_mdcs_cli "https://github.com/esri/mdcs-py/blob/master/scripts/MDCS.py"
click node_workflow_engine "https://github.com/esri/mdcs-py/blob/master/scripts/solutionsLib.py"
click node_base_runtime "https://github.com/esri/mdcs-py/blob/master/scripts/Base/Base.py"
click node_process_info "https://github.com/esri/mdcs-py/blob/master/scripts/ProcessInfo/ProcessInfo.py"
click node_create_md "https://github.com/esri/mdcs-py/blob/master/scripts/CreateMD/CreateMD.py"
click node_add_rasters "https://github.com/esri/mdcs-py/blob/master/scripts/AddRasters/AddRasters.py"
click node_referenced_md "https://github.com/esri/mdcs-py/blob/master/scripts/CreateRefMD/CreateRefMD.py"
click node_add_fields "https://github.com/esri/mdcs-py/blob/master/scripts/AddFields/AddFields.py"
click node_md_properties "https://github.com/esri/mdcs-py/blob/master/scripts/SetMDProperties/SetMDProperties.py"
click node_mdtools "https://github.com/esri/mdcs-py/blob/master/MDTools_Setup.zip"
click node_proxy_search "https://github.com/esri/mdcs-py/blob/master/scripts/search_replace.py"
click node_publish_tool "https://github.com/esri/mdcs-py/blob/master/Tools/PublishImageService.pyt"
click node_imagery_service "https://github.com/esri/mdcs-py/blob/master/scripts/imagery_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_job_input,node_mdcs_cli,node_workflow_engine,node_user toneBlue
class node_xml_config,node_base_runtime,node_process_info toneAmber
class node_create_md,node_add_rasters,node_referenced_md,node_add_fields,node_md_properties,node_mosaic_store,node_raster_sources,node_arcgis_server toneMint
class node_mdtools,node_proxy_search toneRose
class node_publish_tool,node_imagery_service toneIndigo
```

## Components

### Entry and orchestration

- [Job input](https://github.com/esri/mdcs-py/blob/master/jobSamples/hello.job): `jobSamples/hello.job`
- [MDCS entry point](https://github.com/esri/mdcs-py/blob/master/scripts/MDCS.py): `scripts/MDCS.py`
- [Workflow dispatcher](https://github.com/esri/mdcs-py/blob/master/scripts/solutionsLib.py): `scripts/solutionsLib.py`

### Configuration processing

- [XML configuration](https://github.com/esri/mdcs-py/blob/master/Parameter/Config/sample.xml): `Parameter/Config/sample.xml`
- [Base runtime](https://github.com/esri/mdcs-py/blob/master/scripts/Base/Base.py): `scripts/Base/Base.py`
- [Process metadata](https://github.com/esri/mdcs-py/blob/master/scripts/ProcessInfo/ProcessInfo.py): `scripts/ProcessInfo/ProcessInfo.py`

### Mosaic lifecycle

- [Create mosaic](https://github.com/esri/mdcs-py/blob/master/scripts/CreateMD/CreateMD.py): `scripts/CreateMD/CreateMD.py`
- [Add rasters](https://github.com/esri/mdcs-py/blob/master/scripts/AddRasters/AddRasters.py): `scripts/AddRasters/AddRasters.py`
- [Referenced mosaics](https://github.com/esri/mdcs-py/blob/master/scripts/CreateRefMD/CreateRefMD.py): `scripts/CreateRefMD/CreateRefMD.py`
- [Custom fields](https://github.com/esri/mdcs-py/blob/master/scripts/AddFields/AddFields.py): `scripts/AddFields/AddFields.py`
- [Mosaic properties](https://github.com/esri/mdcs-py/blob/master/scripts/SetMDProperties/SetMDProperties.py): `scripts/SetMDProperties/SetMDProperties.py`
- **Mosaic dataset store**
- **Raster sources**

### Management tools

- [MDTools package](https://github.com/esri/mdcs-py/blob/master/MDTools_Setup.zip): `MDTools_Setup.zip`
- [Proxy search replace](https://github.com/esri/mdcs-py/blob/master/scripts/search_replace.py): `scripts/search_replace.py`

### Publishing integration

- [Publish image service](https://github.com/esri/mdcs-py/blob/master/Tools/PublishImageService.pyt): `Tools/PublishImageService.pyt`
- [Imagery service client](https://github.com/esri/mdcs-py/blob/master/scripts/imagery_service.py): `scripts/imagery_service.py`

### Other components

- **User**
- **ArcGIS Server or Portal**

## Connections

- User → MDCS entry point: starts workflow
- User → Job input: provides job
- Job input → MDCS entry point: loads job
- MDCS entry point → Workflow dispatcher: dispatches commands
- XML configuration → Base runtime: reads XML
- Job input → Base runtime: supplies parameters
- Base runtime → Process metadata: loads processes
- Process metadata → Workflow dispatcher: provides metadata
- Workflow dispatcher → Create mosaic: invokes creation
- Workflow dispatcher → Add rasters: invokes ingestion
- Workflow dispatcher → Referenced mosaics: invokes references
- Workflow dispatcher → Custom fields: invokes fields
- Workflow dispatcher → Mosaic properties: invokes configuration
- Create mosaic → Mosaic dataset store: creates dataset
- Add rasters → Raster sources: reads rasters
- Add rasters → Mosaic dataset store: adds items
- Referenced mosaics → Mosaic dataset store: creates references
- Referenced mosaics → Mosaic properties: sets properties
- Custom fields → Mosaic dataset store: adds fields
- Mosaic properties → Mosaic dataset store: reads and writes
- User → MDTools package: runs management
- MDTools package → Mosaic dataset store: manages proxies
- MDTools package → Raster sources: exports locations
- User → Proxy search replace: runs replacement
- Proxy search replace → XML configuration: rewrites XML
- User → Publish image service: publishes service
- Publish image service → Imagery service client: calls client
- Imagery service client → ArcGIS Server or Portal: manages services
