Skip to content

align dimension types to offset types #694

@jshook

Description

@jshook

What is the suggestion?
Make dimensions long[] by default.

Presently you get dimensions like this:

int[] dimensions= dataset.getDimensions()
dimensions[0]=1; // select one row slice

And then you might set offsets like this:

long[] offsets = new long[dimensions.length];
offsets[0]=myoffset;

It seems that the magnitude of offsets is bounded by the magnitude of the dimensions, and thus the data types appear misaligned.

Instead, dimensions should be provided as and stored as longs. It should at least be possible to describe and interact with datasets which have such dimensions.

It would align the scalar bounds between possible offsets and possible dimensions and allow users to address larger datasets.

Notes
The HDF5 spec allows the size of these dimension values to be set in the superblock header. The jhdf library already supports reading this, but if someone were to present a dataset which used 64-bit Size of Lengths, there would be an issue even seeing the dimensions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions