Skip to content

stac-extensions/sentinel-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentinel-2 Extension Specification

This document explains the Sentinel-2 Extension to the SpatioTemporal Asset Catalog (STAC) specification.

The intention of the first version of the specification is to define the existing behavior of the properties prefixed with s2 as created by the stactools-sentinel2 package and used by Earth Search and Microsoft Planetary Computer. Future versions will aspire to standardize fields such as the numerous coverage calculations into separate extensions that are not specific to Sentinel-2.

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
s2:tile_id string Tile Identifier
s2:datatake_id string Datatake Identifier
s2:product_uri string Product URI
s2:datastrip_id string Datastrip Identifier
s2:product_type string Product Type
s2:datatake_type string Datatake Type
s2:generation_time datetime Generation Time
s2:processing_baseline string Processing Baseline
s2:reflectance_conversion_factor number Reflectance Conversion Factor
s2:water_percentage number Water Percentage
s2:snow_ice_percentage number Snow and Ice Percentage
s2:vegetation_percentage number Vegetation Percentage
s2:thin_cirrus_percentage number Thin Cirrus Percentage
s2:cloud_shadow_percentage number Cloud Shadow Percentage
s2:nodata_pixel_percentage number No Data Pixel Percentage
s2:unclassified_percentage number Unclassified Percentage
s2:dark_features_percentage number Dark Features Percentage
s2:not_vegetated_percentage number Not Vegetated Percentage
s2:degraded_msi_data_percentage number Degraded MSI Data Percentage
s2:high_proba_clouds_percentage number High Probability Clouds Percentage
s2:medium_proba_clouds_percentage number Medium Probability Clouds Percentage
s2:saturated_defective_pixel_percentage number Saturated Defective Pixel Percentage
s2:granule_id string DEPRECATED Granule Identifier
s2:mgrs_tile string DEPRECATED Sentinel-2 MGRS Tile Identifier
s2:mean_solar_zenith number DEPRECATED Mean Solar Zenith
s2:mean_solar_azimuth number DEPRECATED Mean Solar Azimuth

Additional Field Information

s2:granule_id is deprecated in favor of s2:tile_id

s2:mean_solar_zenith is deprecated in favor of the View Extension field view:sun_elevation

s2:mean_solar_azimuth is deprecated in favor of the View Extension field view:sun_azimuth

s2:mgrs_tile is deprecated in favor the MGRS Extension fields

Relation types

None

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