Expose OGR feature styles via a new "Embedded styling" renderer - #41957
Conversation
|
Big tak to QGIS Denmark user-group :) |
|
This is an incredible UX win! |
|
@nyalldawson A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
nirvn
left a comment
There was a problem hiding this comment.
Great stuff, some dox comments, but otherwise looking good.
I remember you mentioning this also supported a GDAL side file to style other dataset types. Should you add a test for that?
|
Thanks for the review!
I honestly think it's an extremely niche case, and it's on GDAL's side to maintain this sidecar support, not us. |
124d164 to
1ceda1c
Compare
Allows for storing per-feature symbology, e.g. for symbols which are an innate part of features from a dataset which supports feature level symbology.
If present, the provider is able to retrieve embedded symbology associated with individual features.
…e level symbology should be fetched
Should return true for feature renderers which require embedded feature symbology. The corresponding feature request flag will be set on the iterator used for the renderer will rendering vector layers.
…y of the embedded symbol when identifying features
This renderer will draw features using their embedded feature symbology
Used as a fallback symbol for features without embedded symbology
Supports line symbols only for now
Allows symbology embedded in TAB files to be read
Allows users to control the default symbol used for features without embedded styles
1ceda1c to
320ec79
Compare
|
@nyalldawson |
This PR implements the proposal described at qgis/QGIS-Enhancement-Proposals#209, and adds a new "Embedded Symbology" renderer which shows features using their associated symbology from a datasource where features can have "baked in" symbols (such as KML or TAB files).
Currently only supports line symbol conversion, but point and polygon symbol support will come in a follow-up PR.
Tested so far on MapInfo tab files and KML files, but support should extend automatically to all GDAL drivers which implement the OGR feature style API!
Also supports direct conversion of embedded symbols renderers to categorized or rule based renderers, creating categories/rules which define symbology based on the feature IDs:
Sponsored by QGIS Denmark user-group