Converting files¶
zvtools convert INPUT OUTPUT moves data between a file and a Zarr Vectors
store. If INPUT is a file, a directory or a URL, it is ingested into a new
store at OUTPUT. If INPUT is a store (a directory holding zarr.json), it is
exported to the file at OUTPUT. The format comes from the file’s extension,
or from --format.
zvtools convert points.csv points.zv --chunk-shape 250,250,250 # ingest
zvtools convert points.zv points.ply # export
Warning
table, lines and edgelist have no extension: name them with --format.
Without it, a .csv file is read as csv points, with no error.
Formats¶
Format |
Input |
In / out |
Extra |
Page |
|---|---|---|---|---|
|
|
in, out |
— |
|
|
|
in, out |
|
|
|
|
in |
|
|
|
|
in, out |
|
|
|
none |
in |
— |
|
|
|
in, out |
|
|
|
|
in, out |
|
|
|
|
in |
|
|
|
|
in, out |
— |
|
|
a URL, or a directory with |
in, out |
|
|
|
|
in, out |
— |
|
|
|
in |
— |
|
|
|
in, out |
|
|
|
a subject directory |
in |
|
|
|
|
in |
|
|
|
none |
in |
— |
|
|
none |
in |
— |
Install an extra with pip install "zarr-vectors-tools[las]" ([all] for
every one). A missing extra stops the command with an error that names it.
From Python, ingest functions live in
zarr_vectors_tools.convert.ingest.<format> and export functions in
zarr_vectors_tools.convert.export.<format>; the packages re-export nothing.
The modules for csv and table are csv_points and cell_table. The
functions are ingest_<format> and export_<format>, except
trk_parallel.ingest_trk_parallel and lines.ingest_lines_csv.
Ingest options¶
Option |
Effect |
|---|---|
|
Level-0 chunk edge per axis, in the input’s units. Required except for trk ( |
|
Bin edge inside a chunk; must divide the chunk shape. Default: the chunk shape. See Bin shape. |
|
Stored position dtype. Default |
|
Delete the store at OUTPUT first. Refuses a directory that is not a store. |
|
Build coarser levels after the ingest. See Pyramids. |
|
Pack chunks into shard files. See Sharding. |
|
Parallel processes for trk and precomputed ingest and the pyramid build. See Large data. |
An option that does not apply to the format is refused:
$ zvtools convert points.csv points.zv --chunk-shape 250,250,250 --compressor zstd
error: --compressor applies to trk input — not 'csv'
Export options¶
Option |
Effect |
Formats |
|---|---|---|
|
Pyramid level to export. Default 0, the finest. |
all |
|
Only these objects (repeatable). |
all but |
|
Only what falls in the box (min corner, max corner). |
|
|
Vertex attributes to write (repeatable). |
all but |
|
Only these streamline groups (repeatable). |
|
|
Object attributes to write (repeatable). |
|
|
|
|
|
Surfaces to write, and a file-name prefix. |
|
|
Segments to write; unit when the store records none. |
|
Export replaces an existing OUTPUT file. gifti and precomputed write a
directory, so pass --format (or a URL for precomputed). Every flag is in
the CLI reference.