deriveRectangleAndScheme()
function deriveRectangleAndScheme(
crs,
xyLimits,
levelMetadata,
zarrArray,
dimIndices
): object;
Computes a Cesium Rectangle and TilingScheme for a Zarr dataset.
Parameters
| Parameter | Type | Description |
|---|---|---|
crs | string | A CRS identifier registered with proj4. See CRS. |
xyLimits | XYLimitsProps | Min/max X/Y values in the dataset's CRS. See XYLimitsProps. |
levelMetadata | Map<number, ZarrLevelMetadata> | Per-resolution metadata (width/height). |
zarrArray | Array<any> | The Zarr array containing the data. |
dimIndices | DimIndicesProps | Mapping of dimension keys to their array indices. See DimIndicesProps. |
Returns
object
{ rectangle, tilingScheme }
rectangle
rectangle: Rectangle;
tilingScheme
tilingScheme: TilingScheme;
Remarks
Behavior notes:
- The rectangle is expanded by half a pixel in all directions to avoid edge clipping.
- Pixel resolution is estimated from either
levelMetadata.get(0)or the Zarr array shape. - Source bounds are densified and transformed through the shared proj4 resolver.
- If any computation fails, the function falls back to a full-world geographic scheme.
- If latitude limits are reversed, they are swapped automatically.