TL;DR: How can I most easily map iNat metadata <–> DwC properites for arbitrary observations?
I’m interested in storing some iNaturalist metadata for my own observations with the corresponding photos on my local machine, probably in the form of XMP sidecar files. I’m mainly interested in the taxonomic ranks, so I can more easily sort/search my local photos by taxon the way I can on iNaturalist, among many other possible uses.
I was just about to start making a custom XMP namespace for this until I found out about the DarwinCore spec (DwC), which looks like just want I wanted and much more. I then found that iNat was a few steps ahead of me and already had a system for exporting observations into a GBIF DarwinCore Archive.
I see that this is built into the Rails app to export the entire collection of RG observations, but what I would like to be able to do is take metdata from an arbitrary subset of observations and translate that into DwC properties in XMP format.
My first attempt at this would look something like:
- Query observations from
- Query taxon and its ancestors (higher ranks) from
- Translate response info into DwC properties (
- Write properties to XMP sidecar file
Alternatively I could grab the entire GBIF archive and get my own observations out of that, but that would be pretty inefficient, especially if I regularly wanted to fetch recently updated observation info.
Any suggestions on how I could do this more easily? Is there any portion of the DarwinCore functionality in the Rails app that is exposed in one of the REST endpoints? Or is there a summary somewhere of mappings between iNat metadata and DwC properties?
Also, if there is a better forum or category in which to post development-related questions, let me know.