Skip to content

Archive extension that deals with cases when files are not directly accessible on their respective storage, but are part of an archive file, such as ZIP or TAR archives.

License

Notifications You must be signed in to change notification settings

stac-extensions/archive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template Extension Specification

This extension deals with cases when files are not directly accessible on their respective storage, but are part of an archive file, such as ZIP or TAR archives. This extension deals with the details of referencing the archive file and the file inside, relative to the archives root.

Asset / Link Object fields

The fields in the table below can be used in these parts of STAC documents:

  • Catalogs
  • Collections
  • Item Properties (incl. Summaries in Collections)
  • Assets (for both Collections and Items, incl. Item Asset Definitions in Collections)
  • Links
Field Name Type Description
archive:href string The location of the file within the archive specified by the href field
archive:format string The mimetype of the archive format
archive:type string The mimetype of the file within the archive specified by the href field
archive:start integer The offset of the first byte of the file within the archive
archive:end integer The offset of the last byte of the file within the archive

Additional Field Information

archive:href

This is a relative or absolute path to locate the assets or linked file within the archive.

archive:format

This defines the canonical format of the archive. This can be different as the asset/links type, as this may only refer to the outermost compression used. For example, TAR files are uncompressed by themselves, so they are usually wrapped in a compressed file format like gzip (.gz) resulting in a filename myarchive.tar.gz. In that example the type would be application/gz whereas the archive:format would be application/x-tar.

archive:type

This describes the mimetype of the file within the archive. The same rules and semantics as with the type property apply here as well.

archive:start and archive:end

These properties would describe the byte-location of the file within the archive. This would only be useful if the archive is uncompressed and the files are stored in a single continuous block. A reader could make use of that information to directly read this portion of the archive to have direct access to the file.

Roles

The following roles should be used as applicable roles types in the Asset Object.

Role Description
archive This role is to be used when referencing files that are used as an archive.

Contributing

All contributions are subject to the STAC Specification Code of Conduct. For contributions, please follow the STAC specification contributing guide Instructions for running tests are copied here for convenience.

Running tests

The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid. To run tests locally, you'll need npm, which is a standard part of any node.js installation.

First you'll need to install everything with npm once. Just navigate to the root of this repository and on your command line run:

npm install

Then to check markdown formatting and test the examples against the JSON schema, you can run:

npm test

This will spit out the same texts that you see online, and you can then go and fix your markdown or examples.

If the tests reveal formatting problems with the examples, you can fix them with:

npm run format-examples

About

Archive extension that deals with cases when files are not directly accessible on their respective storage, but are part of an archive file, such as ZIP or TAR archives.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published