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

content_info.attributes for vector datasets do not appear in 19139 xml docs #3

Closed
davemfish opened this issue Dec 14, 2023 · 2 comments

Comments

@davemfish
Copy link
Collaborator

An MCF section like this:

content_info:
  attributes:
  - abstract: ''
    name: ws_id
    title: ''
    type: integer
    units: ''
  - abstract: ''
    name: subws_id
    title: ''
    type: integer
    units: ''
  - abstract: ''
    name: ws_name
    title: ''
    type: string
    units: ''

The data does not appear to translate through to an xml doc created using pygeometa:

iso_schema = ISO19139OutputSchema()
xml_string = iso_schema.write(self.mcf)

Inspecting the jinja2 template (pygeometa\schemas\iso19139\main.j2) I find this section,

  {% if record['content_info'] %}
  <gmd:contentInfo>
    {% if record['content_info']['type'] == 'image' %}
    <gmd:MD_ImageDescription>
      <gmd:attributeDescription>

And no other content_info['type'] besides 'image' seems to be supported by the template. But the core MCF schema allows for:

    content_info:
        type: object
        properties:
            type:
                type: string
                description: Content type
                enum:
                    - coverage
                    - image
                    - feature_catalogue

I've been using "image" for rasters and "coverage" for vectors.

@davemfish
Copy link
Collaborator Author

In addition to content_info['attributes'] MCF also has an attributes section. I'm not certain which of those sections is meant for use with vector attribute tables. Neither section is written out to the XML. See geopython/pygeometa#197

@davemfish
Copy link
Collaborator Author

not relevant after #24

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

No branches or pull requests

1 participant