Skip to contents

Write a project's ROIs to GeoJSON

Usage

at_write_geojson(
  project,
  path,
  layer = NULL,
  level = 0L,
  flip_y = FALSE,
  overwrite = FALSE,
  call = rlang::caller_env()
)

Arguments

project

An annot_project.

path

Output file path.

layer

Optional layer filter.

level

Integer pyramid level for the coordinates and the exported level property. Default 0. source_level separately records the stored ROI level, and coordinate_schema marks the file as recording the level of its coordinates, so at_read_geojson() restores ROIs at that level.

flip_y

Logical; invert the y-axis (for GIS-oriented consumers). Default FALSE (image orientation preserved). The consequence is documented in the interop vignette.

overwrite

Logical; overwrite an existing file. Default FALSE.

call

The calling environment, for error reporting.

Value

The output path, invisibly.

Examples

p <- tempfile(fileext = ".geojson")
at_write_geojson(at_example_project(), p)