| zarr_conv_spatial | R Documentation |
This class implements the GeoZarr "spatial" convention. In particular, the following convention is implemented here:
{
"schema_url": "https://raw.githubusercontent.com/zarr-conventions/spatial/refs/tags/v1/schema.json",
"spec_url": "https://github.com/zarr-conventions/spatial/blob/v1/README.md",
"uuid": "689b58e2-cf7b-45e0-9fff-9cfc0883d6b4",
"name": "spatial",
"description": "Spatial coordinate information"
}
zarr::zarr_convention -> zarr_conv_spatial
dimensionsThe "spatial:dimensions" attribute, a character vector of dimension names for the Y and X axes, in that order. These names must correspond to the names in the "dimension_names" attribute of the array that this convention relates to.
bboxThe "spatial:bbox" attribute, a numeric vector of 4 values in
order xmin, ymin, xmax, ymax giving the boundary coordinates of the
data array.
transform_type(read-only) The "spatial:transform_type" attribute, a character string giving the type of coordinate transformation. The only valid value (currently) is "affine".
transformThe "spatial:transform" attribute, a numeric vector of 6 values (1) X resolution; (2) 0; (3) X coordinate of UL corner; (4) 0; (5) Y resolution; (6) Y coordinate of UL corner, giving the transformation coefficients of the coordinates of the data array.
shapeThe "spatial:shape" attribute, an integer vector of length 2 giving the length of the X and Y dimensions.
registrationThe "spatial:registration" attribute, a string with value "node" or "pixel". "pixel" (the default) means that the coordinates of the UL corner of each grid cell are recorded; "node" means that the coordinates of the center of each grid cell are recorded.
zarr_conv_spatial$new()Create a new instance of a "spatial" convention agent.
zarr_conv_spatial$new()
A new instance of a "spatial" convention agent.
zarr_conv_spatial$set_coordinates()Set the coordinate system for this instance. This method sets the affine transform coefficients, as well as the grid cell registration and the bounding box.
zarr_conv_spatial$set_coordinates(x, y, shape, registration = "pixel")
x, yCoordinates for the X and Y axes, as a numeric vector of
two values: the top-left coordinate of the top-left grid cell and the
resolution along the axis, respectively. Note that for y the
resolution must be negative.
shapeThe length of each axis x and y.
registrationGrid cell registration. "pixel" (the default) means
that the coordinates in x and y are interpreted as the UL corner of
each grid cell; "node" means that the coordinates are interpreted as
the center of each grid cell.
Self, invisibly.
zarr_conv_spatial$write()Write the data of this instance in the attributes of a Zarr object.
zarr_conv_spatial$write(attributes)
attributesA list with Zarr attributes for a group or array. The
properties will be written at the root level of attributes.
The updated attributes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.