Skip to content
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

Adding Metadata schema for WP1 for QEP-91 #4330

Merged
merged 13 commits into from May 3, 2017

Conversation

kalxas
Copy link
Contributor

@kalxas kalxas commented Apr 4, 2017

Description

This PR introduces a QGIS metadata schema as part of WP1 of QEP-91.

Checklist

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • Commits which add new features are tagged with [FEATURE] in the commit message
  • Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and containt sufficient information in the commit message to be documented
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit

<keyword>kw2</keyword>
</keywords>
<fees>None</fees>
<accessconstraints>None<accessconstraints>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accessconstraints isn't included in the .xsd

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@nyalldawson
Copy link
Collaborator

Thinking out loud... could we add a travis check to run xmllint to validate the sample xml against the xsd?

@nyalldawson
Copy link
Collaborator

Can we also get documentation tags added to the xsd please?

<xs:element name="keywords" type="rm:keywordsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="fees" type="xs:string" minOccurs="0"/>
<xs:element name="constraints" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="rights" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get an example rights and constraints added to the sample .xml file please?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see any rights in there yet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added.

<xs:element name="name" type="xs:string"/>
<xs:element name="organization" type="xs:string" minOccurs="0"/>
<xs:element name="position" type="xs:string" minOccurs="0"/>
<xs:element name="address" type="rm:addressType" minOccurs="0"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we allow multiple addresses for each contact? Eg postal address + street address?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. Made address 1..n cardinality.

</xs:element>
<xs:element name="parentidentifier" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>A Refernece, URI, URL or some other mechanism that that a given resource is a part of (child).</xs:documentation>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refernece -> reference

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed thanks.

@tomkralidis
Copy link
Contributor

@nyalldawson good idea! First pass docs/annotations added to XML Schema inline as discussed, for review/comment.

<xs:attribute name="dimensions" type="xs:integer" default="2"/>
<xs:attribute name="crs" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Coordinate refernece system.</xs:documentation>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refernece -> reference

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

* description: abstract text about link
* url: endpoint. If the URL is an OWS server, specify the *base* URL only without parameters like service=xxx.....
* format: format specification of online resource. Strongly suggested to use GDAL/OGR format values
* mimeType: MIME type represenative of the online resource response (image/png, application/json, etc.)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

representative

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@nyalldawson
Copy link
Collaborator

nyalldawson commented Apr 12, 2017

What do you think about adding an element:

<xs:element name="history" type="xs:string" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
    	<xs:documentation>Freeform description of the history or lineage of the resource.</xs:documentation>
</xs:annotation>
</xs:element>

This would allow users and processes to embed information about the history of a particular resource. I'd love to have something like this which could be used by processing to automatically append a history element to the existing metadata of a layer when an algorithm is performed. E.g. reprojecting a layer would add a "Reprojected to EPSG:4326 on 2017-04-11".

Then it'd be trivial to see exactly how a particular layer was derived - e.g.

  • Downloaded from xxxx on ####-##-##
  • Clipped by qgis:clip using overlay 'xxxx.shp'
  • Reprojected from EPSG:28356 to EPSG:4326 using qgis:reprojectlayer

(Potentially layer edit operations could also append to this history, e.g. "54 features added"/"3 features edited using node tool")

@tomkralidis
Copy link
Contributor

Good idea @nyalldawson; added.

@kalxas
Copy link
Contributor Author

kalxas commented Apr 14, 2017

Should I rebase to master head?

@nyalldawson
Copy link
Collaborator

In the interest of moving this forward, I propose:

  • we put a deadline of end of this week (21/4) for comments
  • put a final reminder out on the mailing lists notifying re the deadline
  • if no outstanding issues remain on the 21st, merge this and lock in the schema

@nyalldawson
Copy link
Collaborator

@timlinux @kalxas @tomkralidis what's the status here? Should we lock this in now?

@gioman
Copy link
Contributor

gioman commented Apr 27, 2017

This would allow users and processes to embed information about the history of a particular resource. I'd love to have something like this which could be used by processing to automatically append a history element to the existing metadata of a layer when an algorithm is performed. E.g. reprojecting a layer would add a "Reprojected to EPSG:4326 on 2017-04-11".

Then it'd be trivial to see exactly how a particular layer was derived - e.g.

Downloaded from xxxx on ####-##-##
Clipped by qgis:clip using overlay 'xxxx.shp'
Reprojected from EPSG:28356 to EPSG:4326 using qgis:reprojectlayer

(Potentially layer edit operations could also append to this history, e.g. "54 features added"/"3 features edited using node tool")

wow! this is really super cool. Thanks!

@nyalldawson nyalldawson merged commit 9e662a7 into qgis:master May 3, 2017
@nyalldawson
Copy link
Collaborator

Feedback has slowed here - I think we're safe to merge

@kalxas
Copy link
Contributor Author

kalxas commented May 11, 2017

Thanks @nyalldawson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants