You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/planetary-computer/mosaic-configurations-for-collections.md
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,32 +13,46 @@ ms.custom:
13
13
14
14
# Mosaic configurations for collections in Microsoft Planetary Computer Pro
15
15
16
-
For any STAC (SpatioTemporal Asset Catalog) collection, you can define a configuration of multiple mosaics. Each **mosaic** specifies search criteria that return and visualize STAC items within the Explorer web interface. For example, a mosaic might be configured to only return items that are from a specified date range or have less than a particular percentage cloud cover.
16
+
Within each GeoCatalog STAC (SpatioTemporal Asset Catalog) collection, a **mosaic** specifies the search criteria used to retrieve and visualize STAC items within the Explorer web interface. For example, a mosaic might be configured to only return items that are from a specified date range or items that have less than a particular percentage cloud cover. One or more mosaics are created and managed by the user by editing the mosaic configuration for within each STAC collection.
17
+
18
+
## Prerequisites
19
+
20
+
Before you can configure a mosaic, ensure the following prerequisite steps are complete:
21
+
22
+
1.**STAC Collection Exists:** You created a [STAC collection in Planetary Computer Pro](./create-stac-collection.md).
23
+
2.**Data Ingested:** You [added STAC items](./add-stac-item-to-collection.md) containing the geospatial data assets you want to visualize into the collection.
17
24
18
25
## Components in a Mosaic
19
26
20
-
A STAC collection's mosaic configuration is a list of individual specific search criteria, each called a mosaic. Each individual mosaic includes:
27
+
A STAC collection's mosaic configuration is a list of individual mosaic objects each defining a specific search criteria. Each individual mosaic object includes the following properties:
21
28
22
-
-`id`: A unique identifier for the mosaic
23
-
-`name`: A human-readable title
24
-
-`description`: Info about the mosaic
25
-
-`cql`: A [CQL2](https://github.com/stac-api-extensions/filter) (Common Query Language) expression that defines the search parameters for STAC items to be found and visualized
|`id`| String | A unique, user-specified text identifier for the mosaic. This ID should not contain spaces. |
32
+
|`name`| String | A human-readable name for the Mosaic. This name will appear in the Explorer UI |
33
+
|`description`| String | A user-defined helpful description of the mosaic. |
34
+
|`cql`| Array | A [CQL2](https://github.com/stac-api-extensions/filter) (Common Query Language) expression defining search parameters for STAC items to be found and visualized |
26
35
27
36
## Configuring Mosaics from the Collection Page
28
37
29
38
On a collection's landing page, select the **Configuration** button to open the _Edit Collection Config_ pane.
30
39
31
40
Inside this pane, navigate to the **Mosaics** tab.
32
41
33
-
List individual mosaics to create a mosaic configuration. All items returned from a search are sorted such that most recent items appear first. For this reason, mosaics that don't specify a `datetime` range are best named 'most recent.'
42
+
[](media/mosaic-configuration-screenshot.png#lightbox)
43
+
44
+
The mosaic configurations for a collection are visible as a JSON object list, where each object represents a named mosaic configuration.
34
45
35
46
## Example Mosaic Configurations used in Open Planetary Computer
36
47
37
48
### From Sentinel-2 L2A Collection [View on Planetary Computer](https://planetarycomputer.microsoft.com/dataset/sentinel-2-l2a)
38
49
39
-
A mosaic configuration with these mosaics from the Sentinel-2 L2A colleciton would enable three different ways to visualize Sentinel-2 imagery in the Explorer interface: 1. most recent search results (any cloud cover), 2. most recent search results with low cloud cover, and 3. June - August 2022 search results with low cloud cover.
50
+
A mosaic configuration with these mosaics from the Sentinel-2 L2A collection would enable three different ways to visualize Sentinel-2 imagery in the Explorer interface:
51
+
-```id: "most_recent"```: Most recent STAC Items (any cloud cover),
52
+
-```id: "recent_low_cloud"```: Most recent STAC Items with low (less than or equal to 10%) cloud cover, and
53
+
-```id: "jun_aut2022_low_cloud"```: STAC Items from between June - August 2022 with low (less than or equal to 10%) cloud cover.
40
54
41
-
```python
55
+
```json
42
56
[
43
57
{
44
58
"id": "most_recent",
@@ -68,7 +82,7 @@ A mosaic configuration with these mosaics from the Sentinel-2 L2A colleciton wou
68
82
69
83
### USDA Cropland Data Layers Collection [View on Planetary Computer](https://planetarycomputer.microsoft.com/dataset/usda-cdl)
70
84
71
-
Each collection may have its own set of properties that can be used in the `cql` for a specific search criteria. This mosaic configuration has a mosaic with `cql` that selects items based on their `usda_cdl` property. In this case, the mosaic specifies a search filtering for cropland data. By default, the items returned from the search are sorted by recency.
85
+
Each collection may have its own set of properties that can be used in the `cql` for a specific search criteria. This mosaic configuration specifies a mosaic with `cql` that filters items based on their `usda_cdl:type` property. In this case, the mosaic specifies a filter for data of `usda_cdl:type:` equal to `cropland`. By default, the items returned from the search are sorted by recency.
Copy file name to clipboardExpand all lines: articles/planetary-computer/render-configuration.md
+14-15Lines changed: 14 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.custom:
12
12
13
13
# Configure render settings for visualizing data in Microsoft Planetary Computer Pro
14
14
15
-
To visualize geospatial data using the Microsoft Planetary Computer Pro data explorer or the Tiler API, you must define **render configurations** for your SpatioTemporal Asset Catalog (STAC) collections. A render configuration specifies how the data assets within your STAC items should be combined, processed, and styled to create map tiles.
15
+
To visualize geospatial data using the Microsoft Planetary Computer Pro data explorer or the Tiler API, you must define one or more **render configurations** for each of your SpatioTemporal Asset Catalog (STAC) collections. A render configuration specifies how the data assets within your STAC items are combined, processed, and styled to create map tiles.
16
16
17
17
This guide walks you through the process of creating render configurations, from understanding prerequisites to configuring advanced options. Planetary Computer Pro's rendering capabilities are built upon the open-source [TiTiler](https://developmentseed.org/titiler/) project.
18
18
@@ -22,12 +22,11 @@ Before you can configure rendering, ensure the following prerequisite steps are
22
22
23
23
1.**STAC Collection Exists:** You created a [STAC collection in Planetary Computer Pro](./create-stac-collection.md).
24
24
2.**Data Ingested:** You [added STAC items](./add-stac-item-to-collection.md) containing the geospatial data assets you want to visualize into the collection.
25
-
3.**`item_assets` Defined in Collection:** Your STAC collection's JSON definition *must* include a well-defined [`item_assets`](./stac-overview.md#item-assets) section. These properties inform the rendering engine about the common data assets (and their properties like data type or bands) available across the items in the collection. Render configurations reference the asset keys defined here.
| 1 |[Define `item_assets` in your Collection JSON](#step-1-define-item_assets-in-your-collection-json)| First, you need to ensure your STAC collection JSON includes a well-defined `item_assets` section that describes the common assets within your items. |
29
+
| 1 |[Define `item_assets` in your Collection JSON](#step-1-define-item_assets-in-your-collection-json)| First, you need to ensure your STAC collection JSON includes a well-defined [`item_assets`](./stac-overview.md#item-assets) section that describes the common assets within your items. |
31
30
| 2 |[Understand Your Data and Visualization Goal](#step-2-understand-your-data-and-visualization-goal)| Next, determine the type of data you're working with and decide how you want it to appear visually (single-band colormap, multi-band RGB). |
32
31
| 3 |[Construct the Render Configuration Object](#step-3-construct-the-render-configuration-object)| Now, create the basic JSON structure that holds one or more render configurations for the Explorer UI. |
33
32
| 4 |[Define the `options` String - Core Parameters](#step-4-define-the-options-string---core-parameters)| Configure the essential TiTiler parameters within the `options` string to select the correct assets or bands and apply basic styling like colormaps or rescaling. |
@@ -36,7 +35,7 @@ Before you can configure rendering, ensure the following prerequisite steps are
36
35
37
36
## Step 1: Define `item_assets` in your Collection JSON
38
37
39
-
The item_assets field in your collection JSON is essential for rendering because it provides a schema describing the assets contained within the collection's items. This schema allows the rendering engine and the Explorer web application to understand the available data for visualization without inspecting individual items. It declares the keys (names) of the assets, such as `image`, `red`, `NIR`, or `elevation`, which reference your render configurations. Additionally, item_assets can include metadata like `eo:bands` for multi-band assets, facilitating the selection of specific bands for rendering. The Explorer uses this information to populate menus and understand the overall data structure.
38
+
The item_assets field in your collection JSON is essential for rendering because it provides a consolidated description of the assets contained within the collection's items. The rendering engine and the Explorer web application use the item_assets field to understand the available data for visualization without inspecting individual items. It declares the keys (names) of the assets, such as `image`, `red`, `NIR`, or `elevation`, which are then referenced by the render configurations. Additionally, item_assets can include STAC extension metadata like `eo:bands` for multi-band assets, facilitating the selection of specific bands for rendering. The Explorer uses this information to populate menus and understand the overall data structure.
40
39
41
40
**Example `item_assets` for a 4-band NAIP asset:**
42
41
@@ -88,13 +87,13 @@ Before building the configuration, determine how you want to visualize your data
|**Single-Band Data**| Each pixel has one value. | elevation, temperature, land cover classification, calculated index | Map these single values to a color range or discrete colors using a **colormap**. |
90
89
|**Multi-Band Data**| Data has multiple bands per pixel. | RGB satellite imagery, multi-spectral data | Combine three specific bands to represent the Red, Green, and Blue channels of the output image. |
91
-
|**Derived Data (Expressions)**| Calculate a new value from one or more bands/assets. | NDVI from Red and NIR bands | Define a mathematical **expression** and visualize the result (single-band with colormap or multi-band directly). |
90
+
|**Derived Data (Expressions)**| Calculate a new value from one or more bands/assets. |Normalized Difference Vegetation Index (NDVI) from Red and NIR bands | Define a mathematical **expression** and visualize the result (single-band with colormap or multi-band directly). |
92
91
|**Derived Data (Algorithms)**| Calculate a new value across pixels. | Hillshade shows contours of elevation data | Use a mathematical **algorithm** to transform data into a visualization. |
93
92
|**Data Cubes (GRIB/NetCDF)**| Data stored in GRIB or NetCDF formats with multiple variables and dimensions. | time, pressure levels | Select a specific variable and potentially a slice through other dimensions (like time) for 2D visualization. |
94
93
95
94
## Step 3: Construct the Render Configuration Object
96
95
97
-
Render configurations are defined as a list of JSON objects (or Python dictionaries if using the API). Each object in the list represents one visualization option that will appear in the Explorer dropdown.
96
+
Render configurations are defined as a list of JSON objects (or Python dictionaries if using the API). Each object in the list represents one visualization option that will appear in the [Explorer dropdown](./use-explorer.md#select-a-different-render-configuration).
98
97
99
98
**Basic Structure:**
100
99
@@ -142,7 +141,7 @@ The `options` string is the heart of the render configuration. It uses a `key=va
142
141
143
142
| Parameter | Description | Example |
144
143
| :-------- | :---------- | :------ |
145
-
|`colormap_name={name}`| Applies a predefined named colormap. Common examples: `viridis`, `plasma`, `gray`, `rdylgn`. See available [named colormaps](media/colormaps.png). |`assets=elevation&colormap_name=viridis`|
144
+
|`colormap_name={name}`| Applies a predefined named colormap. Common examples: `viridis`, `plasma`, `gray`, `rdylgn`. See [supported colormaps](./supported-colormaps.md). |`assets=elevation&colormap_name=viridis`|
146
145
|`rescale={min_val},{max_val}`| Stretches or compresses the data values to fit the full range of the colormap. Values outside this range are clamped to the min/max colors. | Map elevation values from 100 m to 1500 m across the full colormap: `assets=elevation&colormap_name=viridis&rescale=100,1500`|
147
146
148
147
### 3. Styling Multi-Band (RGB) Data
@@ -164,7 +163,7 @@ Beyond the basics, TiTiler offers many advanced parameters via the `options` str
164
163
|`expression={formula}`| Define a mathematical formula using asset keys as variables | Standard operators (`+`, `-`, `*`, `/`) and parentheses |`expression=(B08-B04)/(B08+B04)`|
165
164
|`asset_as_band=true`| Required when expression uses multiple *single-band* assets |`true` or `false`|`expression=(B08-B04)/(B08+B04)&asset_as_band=true`|
166
165
167
-
Other details:
166
+
**Examples**
168
167
- Single-band result example: `expression=(B08-B04)/(B08+B04)&asset_as_band=true&colormap_name=rdylgn&rescale=-1,1`
169
168
- Multi-band expressions use semicolons: `expression=B04*1.5;B03*1.1;B02*1.3&asset_as_band=true`
170
169
- When using `expression`, you generally don't need `assets` or `asset_bidx`
@@ -177,9 +176,9 @@ Other details:
177
176
|`algorithm_params={json_string}`| Parameters for the algorithm (URL-encoded JSON) | Varies by algorithm |`algorithm_params=%7B%22azimuth%22%3A%20315%2C%20%22angle_altitude%22%3A%2045%7D`|
178
177
|`buffer={integer}`| Add pixel buffer around tiles (often needed for algorithms) | Integer value |`buffer=3`|
For details on specific algorithms, see the [TiTiler Algorithm documentation](https://developmentseed.org/titiler/examples/notebooks/Working_with_Algorithm/) and [Mapbox algorithms](https://docs.mapbox.com/data/tilesets/guides/access-elevation-data/)
181
+
For details on specific algorithms, see the [TiTiler Algorithm documentation](https://developmentseed.org/titiler/examples/notebooks/Working_with_Algorithm/) and [Mapbox Hillshade](https://docs.mapbox.com/style-spec/reference/layers/#hillshade)
183
182
184
183
### 3. Color Correction (for RGB / Three-band output)
185
184
@@ -192,7 +191,7 @@ For details on specific algorithms, see the [TiTiler Algorithm documentation](ht
192
191
-`Saturation {PROPORTION}` - Adjust color intensity
For more information about color correction, see the [TiTiler documentation](https://developmentseed.org/titiler/endpoints/cog/#color-correction).
194
+
For more information about color correction, see the [TiTiler documentation](https://developmentseed.org/titiler/user_guide/rendering/#color-formula).
196
195
197
196
### 4. Custom Colormaps (for single-band output)
198
197
@@ -237,16 +236,16 @@ Once you construct your render configuration list (one or more JSON objects), ad
237
236
1. Navigate to your collection in the Planetary Computer Pro portal.
238
237
2. Select the **Configuration** button.
239
238
3. Go to the **Render** tab.
240
-
4. Paste your JSON list into the editor or use the UI fields to build it.
241
-
5. Save the changes.
239
+
4. Paste your JSON list into the editor.
240
+
5. Save the changes by selecting **Update**.
242
241
243
242
[](media/render-configuration-web-interface.png#lightbox)
244
243
245
244
For more information on configuring collections, see [Configure a collection with the web interface](./configure-collection-web-interface.md).
246
245
247
246
**Using the API:**
248
247
249
-
Use an HTTP POST request to the collection's render options endpoint.
248
+
Define a collection render configuration using the [create stac collection render options](/rest/api/planetarycomputer/data-plane/stac-collection-render-options/create) endpoint. The following is an example of using this endpoint using the REST API with Python:
250
249
251
250
```python
252
251
import requests
@@ -291,7 +290,7 @@ Here are various examples of the `options` string and the full render configurat
291
290
"name": "Biomass Change from prior year (tonnes)",
292
291
"description": "Annual estimates of changes (gains and losses) in aboveground woody biomass.",
0 commit comments