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/data-cube-quickstart.md
+86-6Lines changed: 86 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: brentharris
5
5
ms.author: brentharris
6
6
ms.service: planetary-computer-pro
7
7
ms.topic: quickstart
8
-
ms.date: 4/24/2025
8
+
ms.date: 11/5/2025
9
9
#customer intent: help customers understand the nuances of ingesting and rendering data cube assets in Microsoft Planetary Computer Pro.
10
10
ms.custom:
11
11
- build-2025
@@ -54,8 +54,6 @@ Remembering that a standard Render Configuration argument in JSON format looks l
54
54
55
55
The `options` field is where you'll want to utilize the cloud optimized, Kerchunk asset, as opposed to the original asset listed in the STAC Item. You'll also need to include the `subdataset_name` argument, which is the name of the variable you want to render.
56
56
57
-
More information about visualizing NetCDF and HDF5 data can be found in the [Visualizing assets in Microsoft Planetary Computer Pro](visualize-assets.md).
58
-
59
57
#### Render configuration for GRIB2 assets
60
58
61
59
The `options` field for the Render Configuration of GRIB2 assets look similar to the previous example, but you won't need to include the `subdataset_name` argument. This is because GRIB2 data is already optimally structured and referenced via their Index files. The `assets` argument, in this case, represents the band, or 2D raster layer, you want to render. Below is an example of a GRIB2 Render Configuration:
@@ -73,16 +71,98 @@ The `options` field for the Render Configuration of GRIB2 assets look similar to
73
71
]
74
72
```
75
73
76
-
More information about visualizing GRIB2 data can be found in the [Visualizing assets in Microsoft Planetary Computer Pro](visualize-assets.md).
74
+
#### Render configuration for Zarr assets
75
+
76
+
The `options` field for the Render Configuration of Zarr assets is also similar to that of NetCDF and HDF5, however within the `assets` argument you will have to include the parameter 'sel' which enables you to select a time, step, or other variable that enables 2D rendering of one variable at one time slice from a multi-variable Zarr store. You may also need to include a 'sel_method' parameter, to ensure the right variable is selected even if the value entered is slightly off. You can read more about this 'sel' parameter in the public documentation for the Python multidimensional data read library used in the Planetary Computer Pro backend, [Xarray](https://docs.xarray.dev/en/latest/generated/xarray.DataArray.sel.html) Below is an example of a Zarr Render Configuration:
Once your data cube assets are ingested and configured, you can visualize them in the Planetary Computer Pro Explorer. A step-by-step guide for using the Explorer can be followed in [Quickstart: Use the Explorer in Microsoft Planetary Computer Pro](use-explorer.md).
81
93
94
+
While Microsoft Planetary Computer Pro includes a tiler that can be used to visualize some data cube assets, there are some caveats to note when it comes to each supported data type.
95
+
96
+
#### NetCDF and HDF5 visualization
97
+
98
+
Not all NetCDF datasets that can be ingested into Microsoft Planetary Computer are compatible by the Planetary Computer Pro's visualization tiler. A dataset must have X and Y axes, latitude and longitude coordinates, and spatial dimensions and bounds to be visualized. For example, a dataset in which latitude and longitude are variables, but not coordinates, isn't compatible with Planetary Computer Pro's tiler.
99
+
100
+
Before attempting to visualize your NetCDF or HDF5 dataset, you can use the following to check whether it meets the requirements.
101
+
102
+
1. Install the required dependencies
103
+
104
+
```python
105
+
pip install xarray[io] rioxarray cf_xarray
106
+
```
107
+
108
+
2. Run the following function:
109
+
110
+
```python
111
+
import xarray as xr
112
+
import cf_xarray
113
+
import rioxarray
114
+
115
+
defis_dataset_visualizable(ds: xr.Dataset):
116
+
"""
117
+
Test if the dataset is compatible with the Planetary Computer tiler API.
118
+
Raises an informative error if the dataset is not compatible.
119
+
"""
120
+
ifnot ds.cf.axes:
121
+
raiseValueError("Dataset does not have CF axes")
122
+
ifnot ds.cf.coordinates:
123
+
raiseValueError("Dataset does not have CF coordinates")
124
+
ifnot {"X", "Y"} <= ds.cf.axes.keys():
125
+
raiseValueError(f"Dataset must have CF X and Y axes, found: {ds.cf.axes.keys()}")
raiseValueError("Dataset must have CF latitude and longitude coordinates, "
129
+
f"actual: {ds.cf.coordinates.keys()}")
130
+
131
+
if ds.rio.x_dim isNoneor ds.rio.y_dim isNone:
132
+
raiseValueError("Dataset does not have rioxarray spatial dimensions")
133
+
134
+
if ds.rio.bounds() isNone:
135
+
raiseValueError("Dataset does not have rioxarray bounds")
136
+
137
+
left, bottom, right, top = ds.rio.bounds()
138
+
if left <-180or right >180or bottom <-90or top >90:
139
+
raiseValueError("Dataset bounds are not valid; they must be within [-180, 180] and [-90, 90]")
140
+
141
+
if ds.rio.resolution() isNone:
142
+
raiseValueError("Dataset does not have rioxarray resolution")
143
+
144
+
if ds.rio.transform() isNone:
145
+
raiseValueError("Dataset does not have rioxarray transform")
146
+
147
+
print("✅ Dataset is compatible with the Planetary Computer tiler API.")
148
+
```
149
+
#### GRIB2 visualization
150
+
151
+
GRIB2 assets that have been ingested into Microsoft Planetary Computer Pro can be visualized in the Explorer aslongas they have an associated Index file (.idx) stored in the same Blob Storage container. The Index fileis generated during ingestion andis required for optimal access and rendering of GRIB2 data.
152
+
153
+
#### Zarr visualization
154
+
155
+
Zarr assets ingested into Microsoft Planetary Computer Pro can be visualized in the Explorer aslongas the Render Configuration specifies which variable and time slice to render using the `sel` parameter in the `options` field. Failure to do so will result in the Explorer attempting to render all variables and time slices of the Zarr store at once, which will cause the Explorer to crash.
156
+
157
+
The size of the Zarr store and spatial chunks will also impact performance. You should aim to keep the total size of a Zarr store under 2GB, and each chunk less than 100MBfor optimal performance of the tiler.
158
+
82
159
#### Time slider for data cube visualization
83
160
84
-
If your data cube assets have a temporal component, you can use the time slider in the Explorer to visualize changes over time. The time slider will appear automatically if your STAC Items contains assets with a `time` dimension with an `extent` and `step` field.
161
+
If your data cube assets have a temporal component, you can use the time slider in the Explorer to visualize changes over time. The time slider will appear automatically if your STAC Items contains assets with a `time` dimension with an `extent`and`step` field.
162
+
163
+
> [!NOTE]
164
+
> We do not currently offer time slider support for Zarr assets. Because of this, it is critical that you specify which time slices you want to visualize in the render configuration. Failure to do so will result in the Explorer attempting to render all time slices of the Zarr store at once, which will cause the Explorer to crash.
85
165
86
166
## Related content
87
167
88
-
-[Access STAC collection data cube assets with a collection-level SAS token](./get-collection-sas-token.md)
168
+
- [Access STAC collection data cube assets with a collection-level SAS token](./get-collection-sas-token.md)
Copy file name to clipboardExpand all lines: articles/planetary-computer/supported-data-types.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ It's important to understand which geospatial data formats are supported in Plan
36
36
* NetCDF
37
37
* HDF5
38
38
* GRIB2
39
+
* Zarr
39
40
40
41
### Other file formats and metadata files
41
42
Beyond this list of supported data types, you may ingest STAC items that point to other data types as assets. For example, it's common for STAC items to list other metadata files as assets in json, xml, csv, and other formats. When ingesting STAC items that include these other file types as assets the Planetary Computer Pro stores these files, but doesn't attempt to convert them to cloud optimized formats. After ingest, you'll be able to access these nonsupported asset types using the Planetary Computer Pro's STAC API, but you won't be able to visualize them within Planetary Computer Pro's Explorer.
@@ -45,6 +46,5 @@ Cloud-optimized assets such as cloud-optimized GeoTIFF (COG) and Cloud-optimized
45
46
## Related Content
46
47
47
48
- Learn more about STAC collections and items: [STAC Overview](./stac-overview.md)
48
-
- Learn more about visualizing these assets: [Visualize data cube Assets](./visualize-assets.md)
49
49
- Get started ingesting GeoTIFF STAC Items [Add STAC items to a Collection](./add-stac-item-to-collection.md)
50
50
- Get started with Data Cubes: [Data Cube Quickstart](./data-cube-quickstart.md)
0 commit comments