Read ROIs from a GeoJSON file
Usage
at_read_geojson(
path,
layer_name = NULL,
level = 0L,
flip_y = FALSE,
height = NULL,
call = rlang::caller_env(),
coordinate_level = NULL,
legacy_levels = c("error", "recorded")
)Arguments
- path
Path to a GeoJSON file.
- layer_name
Layer name for the imported ROIs; taken from the features'
layerproperty whenNULL.- level
Integer level to record when a feature has no
levelproperty.- flip_y
Logical; invert the y-axis on read. Default
FALSE.- height
Image height in pixels, required when
flip_y = TRUE.- call
The calling environment, for error reporting.
- coordinate_level
Optional integer overriding every recorded
levelwithout scaling coordinates. Use only when the actual coordinate level is known, for example0Lfor legacy hyperannotatR exports that wrote level-0 coordinates beside a nonzero source level.NULL(default) uses the schema andlegacy_levelspolicy. Coordinates are never automatically repaired.- legacy_levels
How to interpret files without the coordinate schema marker:
"error"(default) rejects ambiguous nonzero recorded levels;"recorded"explicitly trusts those levels. Level-0 files remain unambiguous.
Value
A named list of annot_layer objects (one per distinct layer
property), or a single annot_layer when layer_name is supplied.