# esri/collector-tools architecture

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

- Interactive diagram: https://gitdiagram.com/esri/collector-tools
- Repository: https://github.com/esri/collector-tools

## Overview

CollectorUtils is a set of independent ArcGIS utilities for preparing collection layers and web maps for Collector (and, in many cases, Field Maps). Users run scripts or toolbox tools against local feature classes or hosted feature services; separate notebooks demonstrate web-map exclusion, search configuration, and app-link generation. The script stages include GNSS schema setup, popup configuration, required-field cleanup, attachment copying, and geometry recreation. The README documents these capabilities, but several implementations—including notebooks, toolbox dispatch, and project-Z—were not sampled, so their internal links are not inferred.

Main entry points: [`CollectorUtils/scripts/add_update_gnss_fields.py`](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/add_update_gnss_fields.py) (GNSS fields (local)), [`CollectorUtils/scripts/add_update_gnss_fields_python_api.py`](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/add_update_gnss_fields_python_api.py) (GNSS fields (hosted)), [`CollectorUtils/scripts/configure_gnss_popup_python_api.py`](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/configure_gnss_popup_python_api.py) (GNSS popup setup), [`CollectorUtils/scripts/reset_required_fields_python_api.py`](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/reset_required_fields_python_api.py) (Required-field reset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gnss["GNSS Configuration"]
  node_gnss_local["GNSS fields &#40;local&#41;"]
  node_gnss_hosted["GNSS fields &#40;hosted&#41;"]
  node_popup["GNSS popup setup"]
end

subgraph group_data["Feature Data Utilities"]
  node_reset["Required-field reset"]
  node_attachments["Attachment copying"]
  node_geometry["Geometry recreation"]
end

subgraph group_maps["Web Map Workflows"]
  node_exclude["Exclude web maps"]
  node_search["Layer search setup"]
  node_links["App-link generation"]
end

subgraph group_interfaces["User Interfaces"]
  node_protoolbox["ArcGIS Pro toolbox"]
  node_arcmaptoolbox["ArcMap toolbox"]
  node_projectz["Project Z model<br/>[project_z.md]"]
end

node_operator(("GIS operator"))
node_arcgis[("ArcGIS services")]
node_localdata[("Local feature data")]
node_collector["Collector / Field Maps"]

node_operator -->|"runs script"| node_gnss_local
node_operator -->|"runs script"| node_gnss_hosted
node_operator -->|"runs script"| node_popup
node_operator -->|"runs script"| node_reset
node_operator -.->|"runs script"| node_attachments
node_operator -.->|"runs script"| node_geometry
node_operator -->|"uses notebook"| node_exclude
node_operator -->|"uses notebook"| node_search
node_operator -->|"uses notebook"| node_links
node_operator -->|"runs tools"| node_protoolbox
node_operator -->|"runs tools"| node_arcmaptoolbox
node_operator -->|"runs model"| node_projectz
node_gnss_local -->|"adds fields"| node_localdata
node_gnss_hosted -->|"updates layer schema"| node_arcgis
node_popup -->|"updates web map"| node_arcgis
node_reset -->|"updates templates"| node_arcgis
node_attachments -->|"copies attachments"| node_localdata
node_geometry -->|"rebuilds geometry"| node_localdata
node_exclude -.->|"configures maps"| node_arcgis
node_search -.->|"configures search"| node_arcgis
node_links -.->|"generates links"| node_collector
node_protoolbox -.->|"provides tool access"| node_gnss_hosted
node_arcmaptoolbox -.->|"provides tool access"| node_gnss_local

click node_gnss_local "https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/add_update_gnss_fields.py"
click node_gnss_hosted "https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/add_update_gnss_fields_python_api.py"
click node_popup "https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/configure_gnss_popup_python_api.py"
click node_reset "https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/reset_required_fields_python_api.py"
click node_attachments "https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/maintain_attachments.py"
click node_geometry "https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/recreate_geometry.py"
click node_exclude "https://github.com/esri/collector-tools/blob/master/notebooks/UseInCollector.ipynb"
click node_search "https://github.com/esri/collector-tools/blob/master/notebooks/LayerSearchConfig.ipynb"
click node_links "https://github.com/esri/collector-tools/blob/master/notebooks/GenerateCollectorAppLinks.ipynb"
click node_protoolbox "https://github.com/esri/collector-tools/blob/master/CollectorUtils/pro/CollectorUtils_Pro.tbx"
click node_arcmaptoolbox "https://github.com/esri/collector-tools/blob/master/CollectorUtils/arcmap/CollectorUtils_ArcMap.tbx"
click node_projectz "https://github.com/esri/collector-tools/blob/master/CollectorUtils/pro/project_z.md"

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_gnss_local,node_gnss_hosted,node_popup toneBlue
class node_reset,node_attachments,node_geometry,node_arcgis,node_localdata toneAmber
class node_exclude,node_search,node_links toneMint
class node_protoolbox,node_arcmaptoolbox,node_projectz toneRose
class node_operator,node_collector toneIndigo
```

## Components

### GNSS Configuration

- [GNSS fields (local)](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/add_update_gnss_fields.py): `CollectorUtils/scripts/add_update_gnss_fields.py`
- [GNSS fields (hosted)](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/add_update_gnss_fields_python_api.py): `CollectorUtils/scripts/add_update_gnss_fields_python_api.py`
- [GNSS popup setup](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/configure_gnss_popup_python_api.py): `CollectorUtils/scripts/configure_gnss_popup_python_api.py`

### Feature Data Utilities

- [Required-field reset](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/reset_required_fields_python_api.py): `CollectorUtils/scripts/reset_required_fields_python_api.py`
- [Attachment copying](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/maintain_attachments.py): `CollectorUtils/scripts/maintain_attachments.py`
- [Geometry recreation](https://github.com/esri/collector-tools/blob/master/CollectorUtils/scripts/recreate_geometry.py): `CollectorUtils/scripts/recreate_geometry.py`

### Web Map Workflows

- [Exclude web maps](https://github.com/esri/collector-tools/blob/master/notebooks/UseInCollector.ipynb): `notebooks/UseInCollector.ipynb`
- [Layer search setup](https://github.com/esri/collector-tools/blob/master/notebooks/LayerSearchConfig.ipynb): `notebooks/LayerSearchConfig.ipynb`
- [App-link generation](https://github.com/esri/collector-tools/blob/master/notebooks/GenerateCollectorAppLinks.ipynb): `notebooks/GenerateCollectorAppLinks.ipynb`

### User Interfaces

- [ArcGIS Pro toolbox](https://github.com/esri/collector-tools/blob/master/CollectorUtils/pro/CollectorUtils_Pro.tbx): `CollectorUtils/pro/CollectorUtils_Pro.tbx`
- [ArcMap toolbox](https://github.com/esri/collector-tools/blob/master/CollectorUtils/arcmap/CollectorUtils_ArcMap.tbx): `CollectorUtils/arcmap/CollectorUtils_ArcMap.tbx`
- [Project Z model](https://github.com/esri/collector-tools/blob/master/CollectorUtils/pro/project_z.md): `CollectorUtils/pro/project_z.md`

### Other components

- **GIS operator**
- **ArcGIS services**
- **Local feature data**
- **Collector / Field Maps**

## Connections

- GIS operator → GNSS fields (local): runs script (evidence: `README.md`)
- GIS operator → GNSS fields (hosted): runs script (evidence: `README.md`)
- GIS operator → GNSS popup setup: runs script (evidence: `README.md`)
- GIS operator → Required-field reset: runs script (evidence: `README.md`)
- GIS operator → Attachment copying: runs script
- GIS operator → Geometry recreation: runs script
- GIS operator → Exclude web maps: uses notebook (evidence: `README.md`)
- GIS operator → Layer search setup: uses notebook (evidence: `README.md`)
- GIS operator → App-link generation: uses notebook (evidence: `README.md`)
- GIS operator → ArcGIS Pro toolbox: runs tools (evidence: `README.md`)
- GIS operator → ArcMap toolbox: runs tools (evidence: `README.md`)
- GIS operator → Project Z model: runs model (evidence: `README.md`)
- GNSS fields (local) → Local feature data: adds fields (evidence: `CollectorUtils/scripts/add_update_gnss_fields.py`)
- GNSS fields (hosted) → ArcGIS services: updates layer schema (evidence: `CollectorUtils/scripts/add_update_gnss_fields_python_api.py`)
- GNSS popup setup → ArcGIS services: updates web map (evidence: `CollectorUtils/scripts/configure_gnss_popup_python_api.py`)
- Required-field reset → ArcGIS services: updates templates (evidence: `CollectorUtils/scripts/reset_required_fields_python_api.py`)
- Attachment copying → Local feature data: copies attachments (evidence: `CollectorUtils/scripts/maintain_attachments.py`)
- Geometry recreation → Local feature data: rebuilds geometry (evidence: `CollectorUtils/scripts/recreate_geometry.py`)
- Exclude web maps → ArcGIS services: configures maps
- Layer search setup → ArcGIS services: configures search
- App-link generation → Collector / Field Maps: generates links
- ArcGIS Pro toolbox → GNSS fields (hosted): provides tool access
- ArcMap toolbox → GNSS fields (local): provides tool access
