Skip to content

Commit

Permalink
GeoPackage - Field domain added to Browser (#9276)
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored Oct 18, 2024
2 parents 8f9497b + 99ef8b0 commit 1491e88
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs/user_manual/introduction/browser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <database_name>` | |checkbox| | |checkbox| | | | | |
| +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+
| | :guilabel:`Compact Database (VACUUM)` | |checkbox| | | | | | |
Expand Down Expand Up @@ -290,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| | | | |
| +--------------------------------------------+--------------+--------------+------------+------------+---------------+------------+
Expand All @@ -301,6 +314,12 @@ each level of the dataset tree.
.. [1] The different entries may also be available for some GDAL supported `vector file formats <https://gdal.org/drivers/vector/index.html>`_
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
......................
Expand Down Expand Up @@ -440,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
Expand Down
2 changes: 2 additions & 0 deletions docs/user_manual/managing_data_source/opening_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,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
Expand Down
13 changes: 13 additions & 0 deletions docs/user_manual/working_with_vector/vector_properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <vector_relations>`
is set. It provides direct access to the parent feature's form which in turn
Expand All @@ -2608,6 +2615,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::

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
select layer, key column and value column. Several options are available to
change the standard behaviors: allow null value, order by value, allow
Expand Down

0 comments on commit 1491e88

Please sign in to comment.