-
Notifications
You must be signed in to change notification settings - Fork 6
Configuration refactoring #28
Comments
I'm -1 on this because it prevents from using the abstraction ability of QGIS, for instance if you want to:
Not sure to see where there is merged plots in the example. And I think it may have a problem of closing brackets I'm ok with all the other points. |
Agree with this guess! EDIT: Oops no, I understand. The formatting is quite confusing. The closing brackets is for the |
I don't see why it prevent any of this, we keep qgis layers, it's just that they don't need to be in the project layers and duplication layers is not really a burden memory-wise.
Well, it's more to get and idea of the structure, and yes, there is no example in this of more than one plot in the array, but you get the idea... |
Actually, @troopa81 is right, thanks for pointing this. Layers don't need to be in the project, but it is better if you can reuse them. In case you want to reuse a layer that has for instance a filter defined or a virtual field defined (I forgot I am actually using this filtering on a specific imported dataset). But at the same time, I would really like to be able to "copy / paste" a given configuration to another project. So ... maybe we should keep the current internal configuration with layer ids and add import / export functions that translate layer IDs to their (name, uri, provider) definitions |
Seems a good option! Just to be sure to understand, it will be possible to store in you project QGeoloGIS configuration either:
In the second scenario, what happen if the user made a modification on the layer (add new virtual field for instance)? When we serialize, do we keep the (name, provider, uri) or do we store the layer id resulting in loading the tuple. |
I understand the merged plot are in series array, am I right? |
No, I propose to keep the current configuration format in the project file (only layer IDs). Two new functions would allow the user to export the configuration stored in the project to a "configuration file" which is exactly the same as the one stored inside the project except layer IDs are replaced by (name, uri, provider). We may add here a warning that says filters and virtual fields will be lost during exports. An import function would take a "configuration file", load layers from their (name, uri, provider) and store the configuration (based on the new layer IDs) inside the project file.
Yes |
No, I propose to keep the current configuration format in the project file (only layer IDs).
Two new functions would allow the user to export the configuration stored in the project to a "configuration file" which is exactly the same as the one stored inside the project except layer IDs are replaced by (name, uri, provider). We may add here a warning that says filters and virtual fields will be lost during exports.
An import function would take a "configuration file", load layers from their (name, uri, provider) and store the configuration (based on the new layer IDs) inside the project file.
Looks nice this way
|
Thanks for your feedback, I've changed the description correspondingly. I've also changed a bit the json example. "unit of measure", "min" and "max" values should be common to the merged sub plots |
Summary of a small design sprint with @vmora and me, on possible evolutions to the configuration part of QGeoloGIS.
Here are some propositions to resolve some needs:
Save the ordering of columns (resp. rows for timeseries)
Current situation
Columns are stored in different arrays:
stratigraphy_config
log_measures
imagery_data
So it is not very clear how to order logs vs. stratigraphy or vs. imagery
Proposed change
Have two objects of high-level
logs
andtimeseries
that store source definitions as JSON arrays.It will merge
stratigraphy
,log_measures
andimagery_data
into the same common arraylogs
A new key
type
allows the distinction between stratigraphy, logs, imagery and so on.Store the symbology
Add a configuration key
symbology
that stores the raw QGIS QML symbology of each column / rowRemove the concept of "sub-selection"
The current code is designed to work with some data sources that have multiple measures stored in the same table (e.g. chemical analysis).
It is based on a logic of filtering and grouping on data:
It was initially thought to allow flexibility in the configuration of data sources when the list of distinct values cannot be defined a priori.
However it adds too much complexity to the code base and does not fit very well with the simple idea of "1 measure = 1 data source".
Proposed change
Remove the concept of "sub selection".
Each single measure should be configured as a separate data source, with the possibility to add a QGIS filter (with the configuration key
filter
)Replace layer IDs by (uri, name, provider)
Current situation
The configuration uses layer IDs to reference data sources.
Problem: it makes the configuration tied to a specific QGIS project file.
Proposed change
Change layer IDs to a triple (name, URI, provider)
This will also allow a trivial import / export function to have a separate configuration file (that can be put on git easier)
Merged plots
In order to merge different plots on the same column (or row), the configuration will allow to specify for each column an array of data sources.
See the complete example.
Additional metadata on graphs
Configuration example
Tasks
The text was updated successfully, but these errors were encountered: