From a381855e5d03da2e5fbc002740c4b696ff867a06 Mon Sep 17 00:00:00 2001 From: selmaVH1 Date: Thu, 26 Sep 2024 20:34:24 +0200 Subject: [PATCH 1/5] GeoPackage - Field domain added to Browser --- docs/user_manual/introduction/browser.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/user_manual/introduction/browser.rst b/docs/user_manual/introduction/browser.rst index 3c8fcc87948..b9742bf8398 100644 --- a/docs/user_manual/introduction/browser.rst +++ b/docs/user_manual/introduction/browser.rst @@ -235,6 +235,15 @@ each level of the dataset tree. | +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ | | :guilabel:`Remove Connection` | |checkbox| | |checkbox| | |checkbox| | |checkbox| | |checkbox| | | | +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ +| | :menuselection:`New Field Domain --> | | | | | | | +| | New Range Domain` | |checkbox| | | | | | | +| +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ +| | :menuselection:`New Field Domain --> | | | | | | | +| | New Coded Values Domain` | |checkbox| | | | | | | +| +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ +| | :menuselection:`New Field Domain --> | | | | | | | +| | New Glob Domain` | |checkbox| | | | | | | +| +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ | | :guilabel:`Delete ` | |checkbox| | |checkbox| | | | | | | +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ | | :guilabel:`Compact Database (VACUUM)` | |checkbox| | | | | | | From bc3a5d3db64002affc07772d2d83c562ae2ab561 Mon Sep 17 00:00:00 2001 From: selmaVH1 Date: Tue, 8 Oct 2024 16:47:06 +0200 Subject: [PATCH 2/5] Notes with details about field domains --- .../managing_data_source/opening_data.rst | 15 +++++++++++++++ .../working_with_vector/vector_properties.rst | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/docs/user_manual/managing_data_source/opening_data.rst b/docs/user_manual/managing_data_source/opening_data.rst index a07667ba18a..330c9cadd72 100644 --- a/docs/user_manual/managing_data_source/opening_data.rst +++ b/docs/user_manual/managing_data_source/opening_data.rst @@ -413,6 +413,19 @@ To load a layer from a file: .. index:: ArcInfo Binary Coverage, Tiger Format, UK National Transfer Format .. index:: US Census Bureau +.. note:: + + When loading vector layers into QGIS, fields with |sourceFields| :guilabel:`Field Domains` + (such as those defined in a GeoPackage or ESRI File Geodatabase) are automatically + detected. These domains are database-level constraints, meaning they are enforced + by the database itself and apply across different applications, not just QGIS. + This differs from the QGIS-only **Value Maps** widget, which is saved within QGIS project styles + and is not enforced outside QGIS. + For coded domains, which are similar to **Value Maps**, there is a set of + predefined valid values. QGIS also supports range domains, enforcing minimum and maximum + value constraints, and glob domains (specific to GeoPackage), which apply different constraints + on the values acceptable in the associated fields. + The |addOgrLayer| :sup:`Add Vector Layer` and |addRasterLayer| :sup:`Add Raster Layer` tabs allow loading of layers from source types other than :guilabel:`File`: @@ -1690,6 +1703,8 @@ to your map. :width: 1.5em .. |setProjection| image:: /static/common/mActionSetProjection.png :width: 1.5em +.. |sourceFields| image:: /static/common/mSourceFields.png + :width: 1.5em .. |spatialite| image:: /static/common/mIconSpatialite.png :width: 1.5em .. |symbologyAdd| image:: /static/common/symbologyAdd.png diff --git a/docs/user_manual/working_with_vector/vector_properties.rst b/docs/user_manual/working_with_vector/vector_properties.rst index 9ac4cace461..6181210db86 100644 --- a/docs/user_manual/working_with_vector/vector_properties.rst +++ b/docs/user_manual/working_with_vector/vector_properties.rst @@ -2592,6 +2592,12 @@ with the field type. The available widgets are: * **Value Map**: A combo box with predefined items. The value is stored in the attribute, the description is shown in the combo box. You can define values manually or load them from a layer or a CSV file. + + .. note:: + + GeoPackage and ESRI File Geodatabase layers with predefined coded **Field Domains** + will be automatically recognized by QGIS and assigned a **Value Map** widget for the relevant fields. + * **Value Relation**: Offers values from a related table in a combobox. You can select layer, key column and value column. Several options are available to change the standard behaviors: allow null value, order by value, allow From 6b477b02f60a9a59821ed9f04022614b8ccd6d6b Mon Sep 17 00:00:00 2001 From: selmaVH1 Date: Thu, 17 Oct 2024 14:33:35 +0200 Subject: [PATCH 3/5] Field-Set field domain and Rename field --- docs/user_manual/introduction/browser.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/user_manual/introduction/browser.rst b/docs/user_manual/introduction/browser.rst index b9742bf8398..83ea1b7c212 100644 --- a/docs/user_manual/introduction/browser.rst +++ b/docs/user_manual/introduction/browser.rst @@ -297,7 +297,11 @@ each level of the dataset tree. +---------------+--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ | Fields | :guilabel:`Add New Field…` | |checkbox| | |checkbox| | |checkbox| | |checkbox| | | | +---------------+--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ -| Field | :guilabel:`Set Alias…` | |checkbox| | | | | | | +| Field | :guilabel:`Set Field Domain` | |checkbox| | | | | | | ++ +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ +| | :guilabel:`Rename Field` | |checkbox| | | | | | | ++ +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ +| | :guilabel:`Set Alias…` | |checkbox| | | | | | | | +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ | | :guilabel:`Set Comment…` | |checkbox| | | |checkbox| | | | | | +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+ From 84f5012bef23004d42c4d8c8bf261c19697a336e Mon Sep 17 00:00:00 2001 From: selmaVH1 Date: Thu, 17 Oct 2024 15:50:18 +0200 Subject: [PATCH 4/5] Move note from opening_data to browser --- docs/user_manual/introduction/browser.rst | 8 ++++++++ .../managing_data_source/opening_data.rst | 13 ------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docs/user_manual/introduction/browser.rst b/docs/user_manual/introduction/browser.rst index 83ea1b7c212..667a2e0b46d 100644 --- a/docs/user_manual/introduction/browser.rst +++ b/docs/user_manual/introduction/browser.rst @@ -312,6 +312,12 @@ each level of the dataset tree. .. [1] The different entries may also be available for some GDAL supported `vector file formats `_ such as ESRI File Geodatabase, FlatGeobuf, GeoParquet, NetCDF, ... when compatible. +.. note:: + + When loading vector layers into QGIS, fields with |sourceFields| :guilabel:`Field Domains` + (such as those defined in a GeoPackage or ESRI File Geodatabase) are automatically + detected. These domains are database-level constraints, meaning they are enforced + by the database itself and apply across different applications, not just QGIS. Tiles and Web Services ...................... @@ -451,6 +457,8 @@ Resources :width: 1.5em .. |postgis| image:: /static/common/mIconPostgis.png :width: 1.5em +.. |sourceFields| image:: /static/common/mSourceFields.png + :width: 1.5em .. |spatialite| image:: /static/common/mIconSpatialite.png :width: 1.5em .. |tiledSceneLayer| image:: /static/common/mIconTiledSceneLayer.png diff --git a/docs/user_manual/managing_data_source/opening_data.rst b/docs/user_manual/managing_data_source/opening_data.rst index 330c9cadd72..e5981c928da 100644 --- a/docs/user_manual/managing_data_source/opening_data.rst +++ b/docs/user_manual/managing_data_source/opening_data.rst @@ -413,19 +413,6 @@ To load a layer from a file: .. index:: ArcInfo Binary Coverage, Tiger Format, UK National Transfer Format .. index:: US Census Bureau -.. note:: - - When loading vector layers into QGIS, fields with |sourceFields| :guilabel:`Field Domains` - (such as those defined in a GeoPackage or ESRI File Geodatabase) are automatically - detected. These domains are database-level constraints, meaning they are enforced - by the database itself and apply across different applications, not just QGIS. - This differs from the QGIS-only **Value Maps** widget, which is saved within QGIS project styles - and is not enforced outside QGIS. - For coded domains, which are similar to **Value Maps**, there is a set of - predefined valid values. QGIS also supports range domains, enforcing minimum and maximum - value constraints, and glob domains (specific to GeoPackage), which apply different constraints - on the values acceptable in the associated fields. - The |addOgrLayer| :sup:`Add Vector Layer` and |addRasterLayer| :sup:`Add Raster Layer` tabs allow loading of layers from source types other than :guilabel:`File`: From 0978c2557a2197358ba3d05648ca1d2c48f72323 Mon Sep 17 00:00:00 2001 From: selmaVH1 Date: Thu, 17 Oct 2024 16:57:54 +0200 Subject: [PATCH 5/5] Note for range widget plus suggestion --- .../working_with_vector/vector_properties.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/user_manual/working_with_vector/vector_properties.rst b/docs/user_manual/working_with_vector/vector_properties.rst index 6181210db86..2caa2456519 100644 --- a/docs/user_manual/working_with_vector/vector_properties.rst +++ b/docs/user_manual/working_with_vector/vector_properties.rst @@ -2577,6 +2577,13 @@ with the field type. The available widgets are: for fields of ``array`` type. * **Range**: Allows you to set numeric values from a specific range. The edit widget can be either a slider or a spin box. + + .. note:: + + Some layers, such as GeoPackage or ESRI File Geodatabase, with predefined **range Field Domains** + will be automatically recognized by QGIS and assigned a **Range** widget for the relevant fields. + The widget will be prefilled with the minimum and maximum values specified in the domain. + * **Relation Reference**: This is the default widget assigned to the referencing field (i.e., the foreign key in the child layer) when a :ref:`relation ` is set. It provides direct access to the parent feature's form which in turn @@ -2595,7 +2602,7 @@ with the field type. The available widgets are: .. note:: - GeoPackage and ESRI File Geodatabase layers with predefined coded **Field Domains** + Some layers, such as GeoPackage or ESRI File Geodatabase, with predefined **coded Field Domains** will be automatically recognized by QGIS and assigned a **Value Map** widget for the relevant fields. * **Value Relation**: Offers values from a related table in a combobox. You can