From d890946d254926da27f302f13dcf407a2e2efbae 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 260e18f066b..c25a7f8c25c 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 7ea8a3871cd231604e75100f7c1f33aa5b9ad72e 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 c8cec27eee3..d52645441b4 100644 --- a/docs/user_manual/managing_data_source/opening_data.rst +++ b/docs/user_manual/managing_data_source/opening_data.rst @@ -421,6 +421,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`: @@ -1715,6 +1728,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 7f3f1fe32bf..c68b17a9bea 100644 --- a/docs/user_manual/working_with_vector/vector_properties.rst +++ b/docs/user_manual/working_with_vector/vector_properties.rst @@ -2608,6 +2608,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 de103c259409145e098c788290475a2da37c80c8 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 c25a7f8c25c..e0026f85702 100644 --- a/docs/user_manual/introduction/browser.rst +++ b/docs/user_manual/introduction/browser.rst @@ -299,7 +299,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 1126cb02e2567efe193f22fdff0c9bf63f2882da 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 e0026f85702..19ecd6bc4a1 100644 --- a/docs/user_manual/introduction/browser.rst +++ b/docs/user_manual/introduction/browser.rst @@ -314,6 +314,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 ...................... @@ -453,6 +459,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 d52645441b4..e2f7ebda033 100644 --- a/docs/user_manual/managing_data_source/opening_data.rst +++ b/docs/user_manual/managing_data_source/opening_data.rst @@ -421,19 +421,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 99ef8b0bd00629188fcc80288e51a4f3e2b703a8 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 c68b17a9bea..801f8130dcb 100644 --- a/docs/user_manual/working_with_vector/vector_properties.rst +++ b/docs/user_manual/working_with_vector/vector_properties.rst @@ -2592,6 +2592,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 @@ -2611,7 +2618,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