Skip to main content

detectCRS()

function detectCRS(
attrs,
arr,
xyLimits?): Promise<CRS>;

Detects the coordinate reference system (CRS) of a Zarr dataset based on metadata or coordinate range. Defaults to EPSG:4326 (WGS84) if uncertain.

Parameters

ParameterTypeDescription
attrsRecord<string, any>Zarr array or group attributes.
arrArray<any, Readable> | nullZarr array (may be null).
xyLimits?XYLimitsPropsOptional geographic coordinate limits. See XYLimitsProps.

Returns

Promise<CRS>

Detected CRS as a string (e.g., 'EPSG:4326' or 'EPSG:3857'. See CRS).