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

Feature Request: Import of CSV + New metadata profiles #184

Open
KoalaGeo opened this issue Oct 3, 2022 · 2 comments
Open

Feature Request: Import of CSV + New metadata profiles #184

KoalaGeo opened this issue Oct 3, 2022 · 2 comments

Comments

@KoalaGeo
Copy link

KoalaGeo commented Oct 3, 2022

We're considering the potential to merge the functionality of a couple of other projects into pygeometa

Namely the ability to submit CSV files as - https://github.com/AstunTechnology/gemini_csv_import

We'd also need to add profiles for two further metadata standards (based on ISO 19139) to allow validation / creation of XML/JSON:

The ability of pygeometa to use the existing .sch files instead of writing .j2 might be worth investigating?

What are the groups thoughts?

@tomkralidis
Copy link
Member

@KoalaGeo

  • adding Gemini and MEDIN would entail putting forth the Jinja2 templates as desired
  • for working off CSV as input, the easiest approach would be to parse the CSV into a pygeometa MCF object in memory and generate the resulting metadata in your format of choice, as supported by pygeometa. We could consider a mapping of CSV columns to MCF fields, but that may be lossy given the nested nature of MCF/YAML. In addition, before long this may lead to leaky abstractions, at which point it may be just easier with a Python script that uses pygeometa as a library/package

cc @pvgenuchten @kalxas for any additional comments/suggestions

@pvgenuchten
Copy link
Contributor

pvgenuchten commented Nov 27, 2022

Interesting @KoalaGeo, thanx for sharing. I happened to work on a similar workflow last week at https://github.com/pvgenuchten/pyGeoDataCrawler. I use a jinja2 template approach to populate mcf with csv fields, before using pygeometa to transform it to iso19139, see https://github.com/pvgenuchten/pyGeoDataCrawler/blob/main/geodatacrawler/templates/csv.j2

Sure would be interesting to have some of this functionality as part of pygeometa, i hadn't considered it yet.
I'll give a look to your approach.

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

3 participants