https://github.com/asfhyp3/hyp3-metadata-templates

Package for generating HyP3 products' metadata

https://github.com/asfhyp3/hyp3-metadata-templates

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 7 committers (57.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Package for generating HyP3 products' metadata

Basic Info
  • Host: GitHub
  • Owner: ASFHyP3
  • License: bsd-3-clause
  • Language: Jinja
  • Default Branch: develop
  • Homepage:
  • Size: 1020 KB
Statistics
  • Stars: 0
  • Watchers: 19
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Archived
Created over 6 years ago · Last pushed almost 5 years ago
Metadata Files
Readme Changelog License Code of conduct Codeowners

README.md

HyP3 Metadata Templates


NOTICE: This repository is archived!

We've archived this repository and merged it into the hyp3-gamma plugin. Currently, only the hyp3-gamma plugin is leveraging this package and updating metadata for GAMMA based products is needlessly slowed down. If and when we have non-GAMMA based plugins that could leverage this package, we may revive this package, or a core subset therein.


Package for generating HyP3 products' metadata.

The goal is for each process to have a README text file, which gives an overview of the product, including a list of all the files contained in the product zip file with brief summaries for each file. In addition, some processes have individual xml files for each of the raster files contained in the product archive. They have been designed and formatted to display correctly in the ArcGIS metadata environment (Item Description in ArcGIS Desktop, and Metadata tab in ArcGIS Pro). See the "ArcGIS-Compatible Metadata" section below for formatting tips.

Generating An Example Set

Because we use jinja2 templates to generate the product metadata files, it's not possible to preview your changes live, especially in an ArcGIS environment. To preview your changes, you can generate an example set of metadata for an RTC or InSAR product by running either:

python -m hyp3_metadata rtc python -m hyp3_metadata insar which will generate an RTC or InSAR example product containing all of its supported metadata files. You can use a number of options to tune the example product (e.g., the DEM used) or where the product files are generated; see either python -m hyp3_metadata rtc --help python -m hyp3_metadata insar --help for usage details.

Note: This will generate an entire product with pseduo data files (e.g., GeoTIFFs and Browse images), so you don't need to have a HyP3 product on hand.

Generating Data For a HyP3 Product

If you have a current HyP3 product and would like re-generate the metadata for the product, you can do so using the create_metadata_file_set_* functions in hyp3_metadata.create. For example, in a python interpreter, you can create the metadata for an RTC product:

```python from datetime import datetime from pathlib import Path

from hyp3metadata.create import createmetadatafileset_rtc

PRODUCTDIR = Path('./S1AIW20150621T120220DVPRTC10GsaufemF8E2') SOURCEGRANULE = 'S1AIWSLC1SSV20150621T12022020150621T12023200647100893472D8'

createmetadatafilesetrtc( productdir=PRODUCTDIR, granulename=SOURCEGRANULE, demname='GLO-30', processingdate=datetime.now(), looks=1, # Typically 6 for GRDH or (resolution / 10) for SLC pluginname='hyp3gamma', pluginversion='X.Y.Z', processorname='GAMMA', processor_version='YYYYMMDD', ) ```

Warning! This will overwrite existing product metadata; we recommend creating a copy of your product before doing this.

ArcGIS-Compatible Metadata

When editing the xml templates in PyCharm, care must be taken to keep them in a format that can be properly parsed by ArcGIS. Most importantly, the hard wrap options must be disabled. There are also some adjustments that can be made to the default settings to improve the display of the xml elements while editing the content.

Use Ctrl+Alt+S to open the settings window, or select Settings from the File menu.

Change the hard wrap settings:

In Editor > Code Style > XML > Other: 1. Check the boxes for Keep line breaks and Keep line breaks in text
2. Set the "Keep blank lines" option to 0
3. Set the Wrap attributes to "Do not wrap" and remove checks from wrapping and spaces settings

Change the soft wrap settings:

For ease of viewing when editing, in the Editor > General settings, scroll down to Soft Wraps, and make the following changes:
1. Check the soft wrap files option, and add ; *.xml to the list of file types
2. Check the option to Use original line's indent for wrapped parts, and set the additional shift if desired



Note that if there are any new lines that are added directly in a text editor by using the return key, they will not render properly in ArcGIS if there are tabs/indentation applied to the code in PyCharm (or any other editor). One way to avoid these issues is to use html formatting tags instead. It's a bit tedious, but it will ensure that the code can be parsed just as well in ArcGIS as in PyCharm.

If you have text breaks that are NOT formatted in the html tags, another option is to change the tabs and indent settings in PyCharm, then reformat the code. To use this method:

  1. In Editor > Code Style > XML > Tabs and Indents, set the Indent and Continuation Indent values to 0 and click OK
  2. With the XML file open, select Reformat Code from the Code menu to remove the tab-based indentations.

If you use this approach frequently, you may want to create different schemes in the Editor > Code Style > XML settings. For example, save an Edit scheme, which keeps the indentation settings (i.e. Indent: 4, Continuation Indent: 8), and a Write scheme, which sets both to 0. Note that the line break settings in the hard wrap section become more important when using the return character approach.

Owner

  • Name: HyP3
  • Login: ASFHyP3
  • Kind: organization
  • Location: Fairbanks, AK

Alaska Satellite Facility's Hybrid Pluggable Processing Pipeline

GitHub Events

Total
Last Year

Committers

Last synced: about 3 years ago

All Time
  • Total Commits: 830
  • Total Committers: 7
  • Avg Commits per committer: 118.571
  • Development Distribution Score (DDS): 0.469
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Heidi Kristenson h****n@a****u 441
Joseph H Kennedy me@j****g 185
Andrew Johnston a****n@a****u 139
James Rine J****2@u****m 31
= j****2@a****u 26
Heidi Kristenson 6****n@u****m 6
jzhu4 j****4@a****u 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: almost 2 years ago

All Time
  • Total issues: 7
  • Total pull requests: 93
  • Average time to close issues: 5 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 2
  • Total pull request authors: 7
  • Average comments per issue: 0.86
  • Average comments per pull request: 0.13
  • Merged pull requests: 87
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • hjkristenson (4)
  • jhkennedy (3)
Pull Request Authors
  • asjohnston-asf (42)
  • hjkristenson (15)
  • Jlrine2 (15)
  • jhkennedy (14)
  • tools-bot (5)
  • cirrusasf (1)
  • washreve (1)
Top Labels
Issue Labels
documentation (4) question (1)
Pull Request Labels
bumpless (27) patch (16) documentation (12) minor (7) tools-bot (5) bug (2) CI/CD (1) major (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 30 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 36
  • Total maintainers: 1
pypi.org: hyp3-metadata

Package for generating HyP3 products' metadata

  • Versions: 19
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 30 Last month
Rankings
Dependent packages count: 10.0%
Downloads: 19.7%
Dependent repos count: 21.7%
Average: 22.6%
Forks count: 22.6%
Stargazers count: 38.8%
Maintainers (1)
Last synced: 10 months ago
conda-forge.org: hyp3_metadata
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Average: 51.3%
Forks count: 57.4%
Stargazers count: 62.4%
Last synced: 10 months ago

Dependencies

environment.yml pypi
  • s3pypi *
setup.py pypi
  • gdal *
  • importlib_metadata *
  • jinja2 *
  • pillow *
  • python-dateutil *