Open nyalldawson opened 3 years ago
I find it interesting and useful for some scenarios. My main concern would be the extra line in an already big layers' context menu. For that reason I would prefer to have it as a plugin or as a non default option.
I think we could make metadata more friendly and more adequated for this use case, but support for layer notes is already there. Can you provide more details about what do you think is missing in the layer's metadata?
Access to layer notes through the context menu could be optional, with primary access through a tab in the layer properties dialog. Layer notes would be very handy to register how a layer is applied in a project, or even just a reminder of editing that remains to be done etc. Metadata is about the origin and nature of the data, which is important but not the same as the layer notes feature as described above.
This seems separate from Metadata because it wouldn't been about the data necessarily but about the particular project layer. One use case I would be excited about would be for when I have the same dataset added multiple times to a QGIS project. Initially I try to keep track of why in the layer name but inevitably I need to make the layer name simple so I can use it in a legend and then I start to forget which layer is for what purpose.
Hi @nyalldawson . While I'm a big fan of the Qnote plugin, allowing to put project wide notes, I'm a bit afraid as a GIS administrator that users will use layer notes as data storage, and then ask us to export it to a data format. You know, the "I store data as color background in Spreadseet cells" syndroma . I would better vote for a QNote ported as a core feature, and improved to be able to display expressions, project levelmetadata and some rich text / html formatting. my2cents
@jgrocha
Can you provide more details about what do you think is missing in the layer's metadata?
I've added a FAQ answer to this question in the proposal text
@haubourg
While I'm a big fan of the Qnote plugin, allowing to put project wide notes, I'm a bit afraid as a GIS administrator that users will use layer notes as data storage, and then ask us to export it to a data format. You know, the "I store data as color background in Spreadseet cells" syndroma .
Would a "Export Layer Notes" processing algorithm help alleviate this concern? It could create a non-spatial table with layer name/data source uri/notes in rows.
I would better vote for a QNote ported as a core feature, and improved to be able to display expressions, project levelmetadata and some rich text / html formatting.
QNote is addressing a slightly different use case though -- it's for project wide notes. I totally agree that project wide notes are also useful, but that doesn't negate the desire for layer-specific notes too.
I feel like the need is quite niche. I agree with Régis. I feel like if people want documentation for specific layers in a specific project, having all the information in a single place like qnote would be the better option.
Heck we don't even set layer metadata and the barest whif on the project as the other elements already present (name, style, etc) are sufficient clues to know about the data source and intent.
If this feature is easy to implement fine, but I feel like it might be a 'nice to have' for a small subset of users in the long term.
I resonate strongly with the need to sometimes annotate a layer in context of a QGIS project, without editing metadata of layers that can have a life outside the QGIS project context. I think the way Nyall proposes to do it is quite elegant: makes it easily accessible to the user who wants it, without cluttering up the UX of the user who is not interested in it. Such elegant integration in the UI may not be possible via plugin, i am guessing (as mere user, not dev), but however it gets done, i will certainly use the heck out of this feature. +1!
I'd like to move forward with this, unless there's any remaining strong objections?
QGIS Enhancement: Layer notes
Date 2021/02/01
Author Nyall Dawson
Contact nyall dot dawson at gmail dot com
maintainer @nyalldawson
Version QGIS 3.20
Summary
This proposal covers support for adding user notes (such as a TODO list, warnings for other users working on the project, etc) to map layers in a project.
Notes would be stored per layer and per project, so that a user can manually create notes which apply to a particular layer within one project at a time.
Notes would take the form of a plain text string.
Proposed Solution
Affected Files
All logic will reside in the app library, and no changes are required to any of the core layer classes.
Performance Implications
None
Further Considerations/Improvements
While the functionality itself is very basic and straightforward to implement in QGIS, the open question is whether this should be implemented as a plugin or as a core feature (or as some mix between the two -- eg having support for creating and viewing notes in the core qgis install, but use a plugin to show the "has a note" indicator icon). Feedback is most welcome on how useful this functionality is and how widespread the use case is.
Why not just use layer metadata for this?
This is targeting a different use case vs layer metadata. Metadata is designed to reflect properties of the underlying layer's data source, and is generally a permanent property attached to the underlying source. The proposed functionality instead is target to user created notes which apply to a specific project -- eg things like "remember to check the label placement before supply to client" / "client has asked to make this layer red" / "need to check if a new version of this data is available" / "ND: I only managed to digitize the northern part of the layer this week. EH when you pick up this project again can you please finish digitizing this layer?". Those kind of project specific notes should never be part of a layer's metadata.