View source: R/domain_geozarr.R
| set_convention | R Documentation |
This function will write the GeoZarr convention with all details into the metadata of a Zarr array.
set_convention(
metadata,
coord_sys,
crs = NULL,
external_group,
registration = "pixel"
)
metadata |
A |
coord_sys |
The CoordinateSystem instance of the GeoZarr array. |
crs |
Optional, a |
external_group |
Optional, the path to the group, relative to the location of the array, that stores any external arrays with coordinate values. |
registration |
Optional, the registration point of the array for use with the "spatial" convention. Defaults to "pixel". |
A list with the metadata updated with convention attributes.
ab <- zarr::array_builder$new()
ab$data_type <- "int32"
ab$shape <- c(1000L, 20L)
crd1 <- CoordinatesPacked$new("X_coordinates", "EAST", "m", c(0, 1000), 1000L)
ax1 <- CoordinateSystemAxis$new("Axis1", "X", crd1)
crd2 <- CoordinatesPacked$new("Y_coordinates", "NORTH", "m", c(0, 1000), 20L)
ax2 <- CoordinateSystemAxis$new("Axis2", "Y", crd2)
cs <- CoordinateSystem$new("CS", list(Axis1 = ax1, Axis2 = ax2))
crs <- list(spatial = list(code = "EPSG:4326"))
set_convention(ab$metadata(), cs, crs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.