Skip to main content

datasetPositionFormat()

const datasetPositionFormat: (obj) => "XYZ" | "XY" | undefined

Extract the position format directly from a dataset.

Parameters

obj

AnyDataset

Returns

"XYZ" | "XY" | undefined

'XY' | 'XYZ' | undefined

Remarks

Composed lens that navigates: dataset → metadata → positionFormat

Example

const format = datasetPositionFormat(dataset);
const accessors = format === 'XYZ' ? xyzAccessors : xyAccessors;