-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Set the main owner for the attribution credits in layer properties #55
base: master
Are you sure you want to change the base?
Conversation
b27d5cb
to
75f9bdd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to convert all data into QGIS metadata in this PR, or only title and abstract ? If the whole QGIS metadata data must be changed, I am wondering wether we should use pygeometa or not to convert PgMetadata into QMD ? This would need to have a view converting PgMetadata to YML, which could be done easily IMHO
return | ||
|
||
# QGIS Server panel | ||
layer.setAttribution(data[0][0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add title and abstract to the QGIS Server corresponding properties ? Related to Lizmap plugin too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which code can we use to add title and abstract to the QGIS server corresponding properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mwekezi I think you should raise your topic in an issue, but not in a pull request. This one was a WIP, work in progress.
You need to use some Python to make it automatic for now. (semi-automatic to synchronize database metadata into the layer properties)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I tried running this code in the python console of QGIS but it didn't work. It mentioned an indentation error. Could you help with how I could successfully run the code above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
"Indentation error" is the most common Python error. Before digging in this project, I suggest you to read about programming with Python, follow a tutorial about Python, you will be able to understand why you couldn't run the code.
|
||
# Metadata panel | ||
metadata = layer.metadata() | ||
metadata.setRights([data[0][0]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we always override existing metadata, or only if a new checkbox is checked in options ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you successfully run the code above?
Thank you very much for the response. Any advise on how I can go about
achieving this? It's for an undergraduate project and I would appreciate
your help.
…On Thu, Sep 23, 2021, 10:26 Étienne Trimaille ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pg_metadata/dock.py
<#55 (comment)>
:
> + "WHEN contact_role_code = 'DI' then 2 "
+ "WHEN contact_role_code = 'CU' then 3 "
+ "ELSE 10 "
+ "END ASC "
+ "LIMIT 1;"
+ )
+
+ data = connection.executeSql(sql)
+ if not data:
+ return
+
+ if data[0] == NULL or data[0][0] == NULL:
+ return
+
+ # QGIS Server panel
+ layer.setAttribution(data[0][0])
@Mwekezi <https://github.com/Mwekezi> I think you should raise your topic
in an issue, but not in a pull request. This one was a WIP, work in
progress.
You need to use some Python to make it automatic for now. (semi-automatic
to synchronize database metadata into the layer properties)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVYCBJXYRQKNOJ3I7T65L73UDLQBXANCNFSM4WHKYZAQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
6e727be
to
54127c8
Compare
WIP for now :