- Title: Archive
- Identifier: https://stac-extensions.github.io/archive/v1.0.0/schema.json
- Field Name Prefix: archive
- Scope: Item, Collection
- Extension Maturity Classification: Proposal
- Owner: @m-mohr, @constantinius
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.
- Examples:
- Item example: Shows the basic usage of the extension in a STAC Item
- Collection example: Shows the basic usage of the extension in a STAC Collection
- JSON Schema
- Changelog
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 |
This is a relative or absolute path to locate the assets or linked file within the archive.
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
.
This describes the mimetype of the file within the archive. The same rules and
semantics as with the type
property apply here as well.
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.
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. |
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.
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