{"id":37651977,"url":"https://github.com/stac-extensions/composite","last_synced_at":"2026-01-16T11:34:55.888Z","repository":{"id":104522946,"uuid":"362868942","full_name":"stac-extensions/composite","owner":"stac-extensions","description":"Defines how virtual assets can be composed from existing assets in STAC","archived":false,"fork":false,"pushed_at":"2023-09-28T19:00:55.000Z","size":124,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-01-27T16:45:31.945Z","etag":null,"topics":["stac"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stac-extensions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-04-29T15:47:50.000Z","updated_at":"2023-02-21T14:17:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"651af67e-d1ac-49ff-a80e-a1ba71235426","html_url":"https://github.com/stac-extensions/composite","commit_stats":{"total_commits":8,"total_committers":3,"mean_commits":"2.6666666666666665","dds":0.5,"last_synced_commit":"9059992d0840c81d9b9d8e76f327c3f29e72dfc4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"stac-extensions/template","purl":"pkg:github/stac-extensions/composite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Fcomposite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Fcomposite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Fcomposite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Fcomposite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stac-extensions","download_url":"https://codeload.github.com/stac-extensions/composite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Fcomposite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["stac"],"created_at":"2026-01-16T11:34:55.111Z","updated_at":"2026-01-16T11:34:55.882Z","avatar_url":"https://github.com/stac-extensions.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!CAUTION]\n\u003e **DEPRECATED**: This extension has been deprecated in favor of the [Render Extension](https://github.com/stac-extensions/render).\n\u003e Please use the Render Extension for all new implementations.\n\n# Composite Extension Specification\n\n- **Title:** Composite\n- **Identifier:** \u003chttps://stac-extensions.github.io/composite/v1.0.0/schema.json\u003e\n- **Field Name Prefix:** composite\n- **Scope:** Item\n- **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Proposal\n- **Owner**: @emmanuelmathot\n\nThis document explains the Composite Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification.\nThis defines new fields with the usage of muliple extensions to compose\nnew assets from ([virtual-assets](https://github.com/stac-extensions/virtual-assets)) and their rendering.\n\nThe main purpose is to provide users with the information required to create a virtual asset using item or collection assets. The virtual asset can be defined on the collection level if the virtual asset could be produced for a collection-level asset and / or all child item assets.\n\nFor example, a virtual asset could be an RGB combination. The virtual asset definition would be a composite of the `processing:expression` and `raster:bands` information. This information would be used to create on the fly visualisation with dynamic tilers.\n\n- Examples:\n  - [Landsat-8 example](examples/item-landsat8.json): Shows the basic usage of the extension in a landsat-8 STAC Item\n- [JSON Schema](json-schema/schema.json)\n- [Changelog](./CHANGELOG.md)\n\n## Fields\n\nThe fields in the table below can be used in these parts of STAC documents:\n\n- [ ] Catalogs\n- [ ] Collections\n- [ ] Item Properties (incl. Summaries in Collections)\n- [x] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections)\n- [ ] Links\n\n| Field Name            | Type         | Description                                                                                                                                  |\n| --------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| compose:rescale       | \\[\\[number]] | double array of delimited Min,Max range. 1 per band                                                                                          |\n| compose:colormap_name | string       | Color map identifier that must be applied for a raster band                                                                                  |\n| compose:colormap      | object       | [Color map JSON definition](https://developmentseed.org/titiler/advanced/rendering/#custom-colormaps) that must be applied for a raster band |\n| compose:color_formula | string       | [Color formula](https://developmentseed.org/titiler/advanced/rendering/#color-formula) that must be applied for a raster band                |\n\n## Raster Composition using `virtual:assets`\n\nThis use case describes how to specify possible raster bands composition. \nThis requires the usage of the [virtual-assets](https://github.com/stac-extensions/virtual-assets) extensions that allows to specify assets\ncomposition and repositioning of one or more [raster bands](https://github.com/stac-extensions/raster) in assets.\nAt least one virtual asset is required to make a raster composite.\nIt cross references in the desired order the assets containing the bands for the composition.\n\n### Simple RGB raster composition\n\nA very simple case would be the composition of a RGB natural color image of a\n[Sentinel-2 item](https://github.com/stac-extensions/raster/blob/main/examples/item-sentinel2.json).\n\n```json\n\"assets\": {\n  \"overview\": {\n    \"roles\": [ \"overview\", \"virtual\" ],\n    \"title\": \"Sentinel-2 Natural Color\",\n    \"type\": \"image/tiff; application=geotiff\",\n    \"href\": \"https://api.cogeo.xyz/stac/preview.png?url=https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json\u0026assets=B04,B03,B02\",\n    \"virtual:hrefs\": [ \n      \"https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#B04\",\n      \"https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#B03\",\n      \"https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#B02\"\n    ]\n  }\n}\n```\n\n### Single raster band index processing\n\nThe [processing:expression](https://github.com/stac-extensions/processing/pull/2) field can be used in combination with item\nto specify a processing formula to be applied to the pixel values in the bands.\nThe following example describes a virtual asset with the Normalized Difference Vegetation Index (NDVI) computed from 2 other bands.\nThe [`raster:band`](https://github.com/stac-extensions/raster) field is also used to specify the range of value produced (e.g. for rescaling).\n\n```json\n\"assets\":{\n  \"NDVI\": \n  {\n    \"virtual:hrefs\": [ \"#B04\", \"#B05\" ],\n    \"title\": \"Normalized Difference Vegetation Index\",\n    \"processing:expression\": {\n      \"format\": \"rio-calc\",\n      \"expression\": \"(B05–B04)/(B05+B04)\"\n    },\n    \"raster:bands\": [[-1,1]]\n  }\n}\n```\n\n## Dynamic tile servers integration\n\nDynamic tile servers could exploit the information in the `composite` extension to automatically produce RGB tiles\nfrom raster bands or composition using their parameters.\n\n### Titiler\n\n[titiler](https://github.com/developmentseed/titiler) offers a native\n[STAC reader](https://github.com/developmentseed/titiler/blob/main/docs/src/endpoints/stac.md).\nSome query parameters can be set with the information in the virtual asset from various extensions.\n\nThe following table describes the titiler query parameters that could be used and the corresponding extension fields.\n\nEither the client building titiler url can use the information in the virtual asset to build the query parameters or the dynamic tile server could use the information in the virtual asset to build the query parameters by simply specifying the `url` and `assets` query parameters.\n\n| Query key       | field                                  | Description                                                                                                                                                                                                                                                                             |\n| --------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `url`           | `href` in item self link               | STAC Item URL                                                                                                                                                                                                                                                                           |\n| `assets`        | `virtual:hrefs` or asset key           | For a local composition (asset in the same item), the assets key can be retrieved from the virtual:hrefs and joined with comma (e.g. `B04,B03,B02`. Titiler may support to specify directly the virtual asset key and set internally all the parameters according to the current table. |\n| `rescale`       | `compose:rescale`                      | Delimited Min,Max bounds defined in `compose:rescale` field                                                                                                                                                                                                                             |\n| `expression`    | `processing:expression`                | Band math formula as defined in field `processing:expression` if format is `rio-calc`                                                                                                                                                                                                   |\n| `nodata`        | `nodata` in `raster:bands`             | Nodata value defined in `nodata` field of the corresponding `raster:bands` item                                                                                                                                                                                                         |\n| `unscale`       | `scale` and `offset` in `raster:bands` | Scale and Offset value defined in `scale` and `offset` fields of the corresponding `raster:bands` item                                                                                                                                                                                  |\n| `colormap_name` | `compose:colormap_name`                | Color map name defined in `compose:colormap` field of the `asset`                                                                                                                                                                                                                       |\n| `colormap`      | `compose:colormap`                     | Color map JSON definition as defined in `compose:colormap` object of the `asset` (overrides `colormap_name` if present )                                                                                                                                                                |\n| `color_formula` | `compose:color_formula`                | Color formula as defined in `compose:color_formula` field of the `asset`                                                                                                                                                                                                                |\n| `resampling`    | `compose:resampling`                   | Resampling method to use when reprojecting the raster.                                                                                                                                                                                                                                  |\n\n\n#### Shortwave Infra-red visual thermal signature example\n\nFrom the [Sentinel-2 item](https://github.com/stac-extensions/raster/blob/main/examples/item-sentinel2.json):\n\n```json\n\"assets\":{\n  \"SIR\":\n  {\n    \"roles\": [ \"overview\", \"virtual\" ],\n    \"title\": \"Shortwave Infra-red\",\n    \"virtual:hrefs\": [ \n      \"https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#B12\",\n      \"https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#B8A\",\n      \"https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json#B04\"\n    ],\n    \"compose:rescale\": [[0,5000],[0,7000],[0,9000]]\n  }\n}\n```\n\n| Query key | value                                                             | Example value                                                                                |\n| --------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| url       | STAC Item URL                                                     | `https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json` |\n| assets    | Assets keys defined in the `bands` objects with field `asset_key` | `B12,B8A,B04`                                                                                |\n| rescale   | Delimited Min,Max bounds defined in `compose:rescale` field       | `0,5000,0,7000,0,9000`                                                                       |\n\nURL: `https://api.cogeo.xyz/stac/crop/14.869,37.682,15.113,37.862/256x256.png?url=https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-sentinel2.json\u0026assets=B12,B8A,B04\u0026resampling_method=average\u0026rescale=0,5000,0,7000,0,9000\u0026return_mask=true`\n\n**Result**: Lava thermal signature of Mount Etna eruption (February 2021)\n\n![etna](images/etna.png)\n\n#### Normalized Difference Vegetation Index (NDVI) example\n\nFrom the [Landsat-8 example](examples/item-landsat8.json) \\[[article](https://www.usgs.gov/core-science-systems/nli/landsat/landsat-normalized-difference-vegetation-index?qt-science_support_page_related_con=0#qt-science_support_page_related_con)]:\n\n```json\n\"**assets**\": {\n  \"NDVI\": \n  {\n    \"href\": [ \"#B4\", \"#B5\" ],\n    \"title\": \"Normalized Difference Vegetation Index\",\n    \"processing:expression\": {\n      \"format\": \"rio-calc\",\n      \"expression\": \"(B05–B04)/(B05+B04)\"\n    },\n    \"compose:color_map\" : \"ylgn\",\n    \"raster:bands\": [[-1,1]]\n  }\n}\n```\n\n| Query key  | value                                                         | Example value                                                                               |\n| ---------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |\n| url        | STAC Item URL                                                 | `https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-landsat8.json` |\n| rescale    | Delimited Min,Max bounds defined in `compose:rescale` field   | `-1,1`                                                                                      |\n| expression | Band math formula as defined in field `processing:expression` | `(B5–B4)/(B5+B4)`                                                                           |\n\nURL:\n\n`https://api.cogeo.xyz/stac/preview.png?url=https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-landsat8.json\u0026expression=(B5–B4)/(B5+B4)\u0026max_size=512\u0026width=512\u0026resampling_method=average\u0026rescale=-1,1\u0026color_map=ylgn\u0026return_mask=true`\n\nResult:  Landsat Surface Reflectance Normalized Difference Vegetation Index (NDVI) path 44 row 33.\n\n![sacramento](https://api.cogeo.xyz/stac/preview.png?url=https://raw.githubusercontent.com/stac-extensions/raster/main/examples/item-landsat8.json\u0026expression=(B5–B4)/(B5+B4)\u0026max_size=512\u0026width=512\u0026resampling_method=average\u0026rescale=-1,1\u0026color_map=ylgn\u0026return_mask=true)\n\n## Contributing\n\nAll contributions are subject to the\n[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md).\nFor contributions, please follow the\n[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions\nfor running tests are copied here for convenience.\n\n### Running tests\n\nThe 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. \nTo run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/).\n\nFirst you'll need to install everything with npm once. Just navigate to the root of this repository and on \nyour command line run:\n```bash\nnpm install\n```\n\nThen to check markdown formatting and test the examples against the JSON schema, you can run:\n```bash\nnpm test\n```\n\nThis will spit out the same texts that you see online, and you can then go and fix your markdown or examples.\n\nIf the tests reveal formatting problems with the examples, you can fix them with:\n```bash\nnpm run format-examples\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-extensions%2Fcomposite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstac-extensions%2Fcomposite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-extensions%2Fcomposite/lists"}