KGA Schema Toolsដំណើរការជាបាច់
Apply Domain Library
នាំចូលបណ្ណាល័យ domain — ឯកសារ JSON ដែល Domain & Schema Manager នាំចេញ — ទៅក្នុង GeoPackage ហើយភ្ជាប់ domain ទៅ fields ដែលត្រូវការ។
- រកឃើញនៅឯណា
- Processing ▸ Toolbox ▸ KGA Toolbox ▸ KGA Schema Tools ▸ Apply Domain Library
- លេខសម្គាល់ algorithm
- kga:apply_domain_library
- ប្រភេទឧបករណ៍
- Batch algorithm (runs on the GUI thread — it touches layers that may be open)
ទិដ្ឋភាពទូទៅ
A domain is the drop-down list behind a field: status can only be Planned, Under Construction or Complete. Building that list once and pushing it into every GeoPackage on a project is what this tool is for. Unlike the dialog, it is a plain parameter-driven algorithm, so it works in a model, in batch mode and from processing.run() — the dialog is for exploring, this is for repeating.
ប៉ារ៉ាម៉ែត្រ
| ឈ្មោះ | ប្រភេទ | តម្លៃលំនាំដើម | ការពិពណ៌នា |
|---|---|---|---|
| Domain library (JSON) | File (.json) | — | The library to import, as exported by the Domain & Schema Manager. |
| Target GeoPackage | File (.gpkg) | — | The container the domains are written into. |
| Mode | Enum | Merge — add and update, keep the rest | Merge adds and updates domains and leaves anything the library does not mention alone. Replace also deletes those, so the target ends up matching the library exactly. |
| Attach each domain to every field with a matching name | Boolean | True | Gives every field of the same name the same domain. The same column recurs across layers — status, owner, material — so this does the bulk of the work. |
| Dry run (report only, write nothing) | Boolean | True | On by default. Read the report before turning it off. |
| Change report | File destination (HTML), optional | not created | The report as a file. |
របៀបប្រើ
- Build or export a domain library with the Domain & Schema Manager.
- Open KGA Schema Tools > Apply Domain Library.
- Point Domain library at the JSON and Target GeoPackage at the container to update.
- Choose the Mode. Start with
Merge;Replacedeletes domains the library does not mention. - Leave the dry run on and press Run. The report lists every domain that would be added, updated or deleted, and every field it would be attached to.
- Untick Dry run and run again to write the changes.
លទ្ធផល
- The domains written into the target GeoPackage, and attached to the matching fields.
- A change report — in the Processing log, and as HTML when you ask for the file — naming every domain added, updated or deleted and every field attachment.
កំណត់សម្គាល់ និងដែនកំណត់
- The dry run is on by default. The first run writes nothing.
Replacedeletes. It makes the target match the library exactly, so a domain that exists only in the target is removed. UseMergeunless you specifically want that.- Only GeoPackage targets. The parameter accepts
.gpkgonly. - Close the target in ArcGIS or any other application first; a container held open elsewhere cannot be modified.
- Use Validate Against Domains afterwards: attaching a domain constrains new edits, but existing data is never re-checked, so old values that break the new rule stay in place until you go looking for them.