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.

ប៉ារ៉ាម៉ែត្រ

Parameters for Apply Domain Library
ឈ្មោះប្រភេទតម្លៃលំនាំដើមការពិពណ៌នា
Domain library (JSON)File (.json)The library to import, as exported by the Domain & Schema Manager.
Target GeoPackageFile (.gpkg)The container the domains are written into.
ModeEnumMerge — add and update, keep the restMerge 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 nameBooleanTrueGives 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)BooleanTrueOn by default. Read the report before turning it off.
Change reportFile destination (HTML), optionalnot createdThe report as a file.

របៀបប្រើ

  1. Build or export a domain library with the Domain & Schema Manager.
  2. Open KGA Schema Tools > Apply Domain Library.
  3. Point Domain library at the JSON and Target GeoPackage at the container to update.
  4. Choose the Mode. Start with Merge; Replace deletes domains the library does not mention.
  5. 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.
  6. 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.
  • Replace deletes. It makes the target match the library exactly, so a domain that exists only in the target is removed. Use Merge unless you specifically want that.
  • Only GeoPackage targets. The parameter accepts .gpkg only.
  • 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.

មើលផងដែរ

ត្រឡប់ទៅឯកសារណែនាំ