Geometry types¶
Zarr Vectors defines seven geometry types. A store lists its types in
geometry_types in the root attributes. Each
writer on these pages creates a store with one geometry type, and the
dataset API (zarr_vectors.open) decodes a store as the first type listed.
zarr_vectors.composite can add further types to one store, but the
readers on these pages do not support such stores; use one store per type.
Type constants¶
from zarr_vectors.constants import (
GEOM_POINT_CLOUD, # "point_cloud"
GEOM_LINE, # "line"
GEOM_POLYLINE, # "polyline"
GEOM_STREAMLINE, # "streamline"
GEOM_GRAPH, # "graph"
GEOM_SKELETON, # "skeleton"
GEOM_MESH, # "mesh"
)
Writers and readers¶
Type |
Writer |
Reader |
Dataset API |
|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The writers are in zarr_vectors.types.<module> and re-exported from
zarr_vectors.building; the streaming skeleton writer is on
Skeleton.
Comparison matrix¶
What each type’s writer stores at level 0. “Optional” means the writer stores it when the caller passes the matching argument.
Property |
|
|
|
|
|
|
|
|---|---|---|---|---|---|---|---|
|
not written |
|
|
|
|
|
|
|
— |
when a line crosses a chunk |
when a polyline crosses a chunk |
when a streamline crosses a chunk |
✓ |
✓ |
✓ |
|
— |
2 |
2 |
2 |
2 |
2 |
face size, ≥ 3 |
Intra-chunk links ( |
— |
— |
— |
— |
✓ |
branch records |
✓ (raw encoding) |
Family |
— |
false |
false |
false |
false |
see Skeleton |
false |
|
optional |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
|
optional |
optional |
optional |
optional |
optional |
optional |
optional |
|
optional |
— |
optional |
optional |
— |
— |
— |
|
optional |
optional |
optional |
optional |
optional |
optional |
optional |
|
— |
— |
— |
— |
optional |
optional |
— |
Draco encoding |
— |
— |
— |
— |
— |
— |
optional |
In the implicit_sequential types, vertex order within a fragment gives
the connectivity, so only links that cross a chunk boundary are stored. A
store whose objects each sit in one chunk has no links/ group. See
Links.
Common to every type¶
The type pages state only what differs from this section.
Arrays. Every writer creates
vertices/andvertex_fragments/at level 0 (see Chunk arrays).vertex_attributes/<name>/holds one row per vertex,object_attributes/<name>/one row per object, andfragment_attributes/<name>/one row per fragment.Root attributes. No type has type-specific root keys. Besides
geometry_typesandlinks_convention, the writers setobject_index_convention"standard"andcross_chunk_strategy"explicit_links"(the streaming skeleton writer omitscross_chunk_strategy). The other keys are on Root metadata.Links. Every type with links, except the streaming skeleton writer, writes one
links/0/family that is undirected withstore: "canonical": each link is stored once, under the lexicographically positive offset. See Links.Reading. Each reader takes
level=and filters that combine with AND.bbox=is a(min_corner, max_corner)pair of arrays.Reader
Module
Filters
read_pointszarr_vectors.types.pointsbbox,object_ids,group_ids,chunks,attribute_filterread_lineszarr_vectors.types.linesbbox,object_ids,attribute_filterread_polylineszarr_vectors.types.polylinesbbox,object_ids,group_ids,chunks,attribute_filterread_graphzarr_vectors.types.graphsbbox,object_ids,chunks,attribute_filterread_meshzarr_vectors.types.meshesbbox,object_ids,chunks,attribute_filterCoarser levels. See Pyramid construction.
Validation¶
These checks apply to every type; the type pages list only their own. See Validation overview.
Level |
Check |
|---|---|
L1 |
|
L3 |
Each manifest entry names a chunk present at the level and a fragment below that chunk’s fragment count |
L3 |
Each |
L3 |
In an undirected canonical family, no offset is lexicographically negative and the offsets are non-decreasing |
L4 |
|
No level checks that a link’s vertex index exists within its chunk.
Type selection guide¶
Data |
Type |
|---|---|
Lidar, synchrotron point scan, single-molecule localisation |
|
Pairs of connected points (short segments, contact sites) |
|
Ordered vertex sequences |
|
Tractography streamlines |
|
General graph, possibly with cycles |
|
Neuronal morphology, vascular tree (SWC-compatible) |
|
3-D surface mesh (cell boundary, brain surface, organelle hull) |
|