Compute contiguous vertex ranges from a sorted list of vertex indices.
Used after loading segment data: each segment references two vertex
indices, and we batch the unique sorted indices into runs of consecutive
integers so zarr loading touches the minimum number of chunks.
Accepts any ArrayLike<number> (a plain number[] or the Uint32Array
returned by sortedUniqueVertexIndices); it only reads .length
and integer indices.
This is genuinely lines-specific (operates on per-segment vertex indices,
not on chunk bounds) and is therefore not in the canonical
loaders/spatial-query-builder API.
Compute contiguous vertex ranges from a sorted list of vertex indices.
Used after loading segment data: each segment references two vertex indices, and we batch the unique sorted indices into runs of consecutive integers so zarr loading touches the minimum number of chunks.
Accepts any
ArrayLike<number>(a plainnumber[]or theUint32Arrayreturned by sortedUniqueVertexIndices); it only reads.lengthand integer indices.This is genuinely lines-specific (operates on per-segment vertex indices, not on chunk bounds) and is therefore not in the canonical
loaders/spatial-query-builderAPI.