3liz / qgis-pgmetadata-plugin

QGIS Plugin to manage some metadata from PostgreSQL layer
GNU General Public License v2.0
12 stars 10 forks source link

Add “licence attribution” for source reference, licence number etc. #85

Closed effjot closed 8 months ago

effjot commented 2 years ago

New field for license numbers, ODC-BY and German Data Licence attributions etc.

Implements #71

mdouchin commented 2 years ago

Thanks a lot for your contribution.

I wonder if we should add also the new fiels in the DCAT view. See: https://github.com/3liz/qgis-pgmetadata-plugin/blob/master/pg_metadata/install/sql/pgmetadata/30_VIEW.sql#L170

At present, this will return something like

<dct:license>Licence Ouverte Version 2.0</dct:license>

We should probably add the license URI in the XML, such as

    <dct:license rdf:resource="http://creativecommons.org/licenses/by-nc/3.0/"/> 

Could you also add a COMMENT on the new column, to explain what is expected ? See comments for other fields visible here: https://docs.3liz.org/qgis-pgmetadata-plugin/database/tables/dataset.html

See source: https://github.com/3liz/qgis-pgmetadata-plugin/blob/master/pg_metadata/install/sql/pgmetadata/70_COMMENT.sql#L158

mdouchin commented 2 years ago

After some thinking, I am not very fond of adding a new field in the dataset table: it increases complexity and does not bring much advantage compared to the existing situation.

I see two ways to address your need:

wkt_geom id field code label_en description_en item_order label_fr description_fr label_it description_it label_es description_es label_de description_de
NULL 128 dataset.license LO-2.0 Licence Ouverte Version 2.0   0                
NULL 129 dataset.license LO-2.1 Licence Ouverte Version 2.1   0                

We have one line per license and version. We could improve the views (DCAT, HTML, etc.) by adding the code close to the license, for example Licence Ouverte Version 2.1 (LO-2.1).

You could add these lines in your own database, or propose a PR to add them in the source code for all German users (the latter is my preferred solution of course)

effjot commented 2 years ago

I’m not sure adding to the glossary would be a good solution, because it would fill the glossary table with a lot of custom entries and make upgrading a nightmare.

My use case is this: for any given license, there might be an attribution which we need to show on published maps, and we have to check if we could use the data in a given project. Data could be licensed under ODC-BY or the German Data Licence, however, the “by” part of those licences requires the attribution to be shown, and could be any text (although some attributions would appear more frequently). For example:

So my suggested database field would be some ugly mixed bag. Moving the whole license stuff to a separate table might be cleaner, but bigger effort and change for the users, as @mdouchin remarked.

I don’t have a deeper knowledege of metadata standards. Maybe this problem has already been adressed somewhere?

mdouchin commented 2 years ago

Thanks for your examples which help to understand.

The real questions is : do you need to adapt the license for each dataset, meaning the same license can have different text attribution for different datasets, or are the complementary information only depends on the license (and version) ? It will determine if we need to add a new field in the dataset table or not.

I think the new "License" table won't be too hard to implement, as it will be with a simple foreign key.

effjot commented 2 years ago

The real questions is : do you need to adapt the license for each dataset, meaning the same license can have different text attribution for different datasets, or are the complementary information only depends on the license (and version) ? It will determine if we need to add a new field in the dataset table or not.

It is the first case. Not many different licenses (license types, e.g. “Licence Ouverte Version 2.1” or “Data licence Germany – attribution – version 2.0”), but for any license many different attributions (for CC-by licenses) / sources / license numbers (for governmental/commercial data) can exist, depending on the dataset. So I think the licenses (license types) definitions could be kept in the glossary or a new “License” table. But the attributions belong in the dataset table, in my opinion.