Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ogr] Read field domains from datasets #43013

Merged
merged 4 commits into from Apr 30, 2021

Conversation

nyalldawson
Copy link
Collaborator

and auto translate to equivalent value map editor config or range config.

Requires GDAL 3.3+

For formats which support embedded definition of field domains (currently Geopackage and GDB), this change automatically converts the embedded field domain over to the equivalent QGIS editor configuration for the field.

Practically it means that GPKG/GDB with coded field domains will automatically load into QGIS with their correct Value Map widget configuration intact, so that users see immediately the nice descriptions for field values instead of the raw codes. If the field has a range type domain (i.e. a min/max value allowed in the dataset) this will also be translated to the range widget for the field.

Additional details on the gdal changeset: OSGeo/gdal#3638

Sponsored by: North Road

@nyalldawson nyalldawson added Feature Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Apr 29, 2021
@github-actions github-actions bot added this to the 3.20.0 milestone Apr 29, 2021
@nyalldawson
Copy link
Collaborator Author

@rouault do you mind reviewing this one?

editor config or range config

Requires GDAL 3.3+
src/core/providers/ogr/qgsogrprovider.cpp Show resolved Hide resolved
src/core/providers/ogr/qgsogrprovider.cpp Outdated Show resolved Hide resolved
src/core/qgsogrutils.cpp Outdated Show resolved Hide resolved
@nyalldawson
Copy link
Collaborator Author

@rouault can you approve this so I can merge?

@rouault rouault self-requested a review April 30, 2021 00:00
@nyalldawson nyalldawson merged commit 54d50c6 into qgis:master Apr 30, 2021
@nyalldawson nyalldawson deleted the field_domain branch April 30, 2021 00:43
@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants