> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Client

<Badge color="purple">Private Preview</Badge>

## RasterflowClient

```python theme={"system"}
RasterflowClient(
    rasterflow_version: str = 'v2.12.2',
    rasterflow_domain: str | None = None,
    mosaics_version: str = 'v1.3.4',
    mosaics_domain: str | None = None,
    zarr_multiscales_version: str = 'v2.1.1',
    zarr_multiscales_domain: str | None = None,
    dry_run: bool = False,
    cache: bool = True
)
```

High-level client for executing RasterFlow workflows using Flyte remote.

First, obtain an API key for RasterFlow. Then create a YAML config file at the following location(s): 1. `export RASTERFLOW_CONFIG_FILE=/path/to/rasterflow.yaml` 2. or create at `~/.config/rasterflow.yaml`

### build\_and\_predict\_mosaic\_recipe()

Build a mosaic and run inference using a pre-configured recipe for a specific model.

This convenience method combines mosaic building and inference into a single workflow using a model recipe that defines the input datasets, model, and inference parameters.

```python theme={"system"}
def build_and_predict_mosaic_recipe(
    self,
    aoi: str,
    start: datetime.datetime,
    end: datetime.datetime,
    model_recipe: rasterflow_remote.data_models.ModelRecipes,
    crs_epsg: int | None = None,
    runtime: rasterflow_remote.data_models.RuntimeEnum =
        RuntimeEnum.SMALL,
    envs: dict[str, str] | None = None
) -> wherobots_rasterflow_helpers.domain.mosaics.MosaicResult
```

#### Parameters

<ParamField path="aoi" type="str" required>
  Remote URL path to the area of interest GeoDataFrame.
</ParamField>

<ParamField path="start" type="datetime" required>
  Start date for the temporal range of the mosaic.
</ParamField>

<ParamField path="end" type="datetime" required>
  End date for the temporal range of the mosaic.
</ParamField>

<ParamField path="model_recipe" type="ModelRecipes" required>
  Pre-configured recipe that defines the datasets, model, and inference parameters to use. Available recipes are defined in the ModelRecipes enum.
</ParamField>

<ParamField path="crs_epsg" type="int | None">
  EPSG code for the coordinate reference system of the output. Consider using a UTM-specific EPSG code (e.g., EPSG:32610 for UTM Zone 10N) to avoid reprojection/resampling if your AOI falls within a single UTM zone and the model recipe uses a UTM-projected dataset. If None, defaults to the native CRS of the underlying datasets for the model recipe, which are often UTM-projected. Default is None.
</ParamField>

<ParamField path="runtime" type="RuntimeEnum">
  Compute resources to allocate for the workflow execution. Options defined in RuntimeEnum (e.g., SMALL, MEDIUM, LARGE). Default is RuntimeEnum.SMALL.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

#### Response

<ResponseField name="return" type="MosaicResult">
  Result containing the output mosaics GeoDataFrame and the
  `first_row_mosaic` URI extracted from its `location` column.
</ResponseField>

### build\_gti\_mosaic()

Build a Zarr mosaic from a GDAL Tile Index (GTI) vector file.

See [https://gdal.org/en/latest/drivers/raster/gti.html](https://gdal.org/en/latest/drivers/raster/gti.html) for more information.

Note: The GTI tile index must: 1. Have a geometry column corresponding to the spatial extent of each tile 2. Have a column pointing to the remote URL of each GeoTIFF/COG 3. Contain homogeneous bands across all entries Additional recommended metadata as described in the GDAL docs will improve performance or quality of the mosaic.

```python theme={"system"}
def build_gti_mosaic(
    self,
    gti: str,
    aoi: str,
    bands: list[str],
    location_field: str,
    crs_epsg: int = 3857,
    time_column: str | None = None,
    skip_xy_coords: bool = False,
    xy_chunksize: int = 512,
    max_shard_size: float = 3500000000.0,
    query: str | None = None,
    requester_pays: bool = False,
    envs: dict[str, str] | None = None,
    sort_field: str | None = None,
    resampling: rasterflow_remote.data_models.ResamplingMethod =
        ResamplingMethod.NEAREST,
    resolution: float | None = None,
    nodata: float | None = None,
    id: str | None = None
) -> wherobots_rasterflow_helpers.domain.mosaics.MosaicResult
```

#### Parameters

<ParamField path="gti" type="str" required>
  Remote URL path to the tile index GeoDataFrame.
</ParamField>

<ParamField path="aoi" type="str" required>
  Remote URL path to the area of interest GeoDataFrame.
</ParamField>

<ParamField path="bands" type="list[str]" required>
  List of band names to include in the mosaic. Must exist in all tiles.
</ParamField>

<ParamField path="location_field" type="str" required>
  Column name in the GTI that contains the path/URL to each GeoTIFF/COG.
</ParamField>

<ParamField path="crs_epsg" type="int">
  EPSG code for the coordinate reference system to use for the output mosaic. Default is 3857 (Web Mercator).
</ParamField>

<ParamField path="time_column" type="str | None">
  GTI column used to group entries into mosaic time intervals. Defaults to `None`. If set to `None`, all rows are grouped into a single `NaT` time slice. For example, a year column with elements from {2012, 2013} would lead to time dimension of length 2. This enables the user to specify any time resolution based on properties of the underlying raster data. Be sure that the cardinality of the time column is not too high.
</ParamField>

<ParamField path="skip_xy_coords" type="bool">
  Whether to skip the XY coordinates when building the mosaic. This is useful for very very large mosaics. Defaults to False.
</ParamField>

<ParamField path="xy_chunksize" type="int">
  Chunk size in pixels to use for the X and Y dimensions when building the mosaic. Default is 512.
</ParamField>

<ParamField path="max_shard_size" type="float">
  The size in bytes that determines the shard size for the Zarr store and the partition size for each task. Default is 3.5GB in bytes.
</ParamField>

<ParamField path="query" type="str | None">
  Pandas query string to filter the GTI before processing. Uses DataFrame.query() syntax. See [https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html). Default is None.
</ParamField>

<ParamField path="requester_pays" type="bool">
  If True, enables requester pays for accessing cloud-stored tiles. The requester's account will be charged for data transfer. Default is False.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

<ParamField path="sort_field" type="str | None">
  Column name in the GTI to sort entries by before building the mosaic. Sorting can affect which tiles take precedence in overlapping areas. Default is None.
</ParamField>

<ParamField path="resampling" type="ResamplingMethod" default="ResamplingMethod">
  Resampling method to use when building the mosaic, by default ResamplingMethod.NEAREST.
</ParamField>

<ParamField path="resolution" type="float | None">
  Spatial resolution for the output mosaic in the units of the target CRS. If None, uses the native resolution of the input tiles. Default is None.
</ParamField>

<ParamField path="nodata" type="float | None">
  Nodata value to assign to the output mosaic. If None, attempts to use the nodata value from the source tiles. Will raise an error if tiles lack a nodata value. Default is None.
</ParamField>

<ParamField path="id" type="str | None" default="None">
  Optional identifier used to create a deterministic output prefix under the configured storage URI. If None, the remote workflow execution id is used.
</ParamField>

#### Response

<ResponseField name="return" type="MosaicResult">
  Result containing the output mosaics GeoDataFrame and the
  `first_row_mosaic` URI extracted from its `location` column.
</ResponseField>

### build\_mosaic()

Execute the mosaic building workflow.

```python theme={"system"}
def build_mosaic(
    self,
    datasets: list[rasterflow_remote.data_models.DatasetEnum],
    aoi: str,
    start: datetime.datetime,
    end: datetime.datetime,
    crs_epsg: int = 3857,
    xy_chunksize: int = 512,
    max_shard_size: float = 3500000000.0,
    envs: dict[str, str] | None = None,
    resolution: float | None = None,
    skip_xy_coords: bool = False
) -> wherobots_rasterflow_helpers.domain.mosaics.MosaicResult
```

#### Parameters

<ParamField path="datasets" type="list[DatasetEnum]" required>
  List of datasets to include in the mosaic. Available datasets are defined in DatasetEnum.
</ParamField>

<ParamField path="aoi" type="str" required>
  Area of interest as any file format supported by GeoPandas read\_file or read\_parquet (e.g., GeoJSON, GeoParquet, Shapefile) via remote URL.
</ParamField>

<ParamField path="start" type="datetime" required>
  Start date for the temporal range of the mosaic.
</ParamField>

<ParamField path="end" type="datetime" required>
  End date for the temporal range of the mosaic.
</ParamField>

<ParamField path="crs_epsg" type="int">
  EPSG code for the coordinate reference system to use for the output mosaic. Default is 3857 (Web Mercator).
</ParamField>

<ParamField path="xy_chunksize" type="int">
  Chunk size in pixels to use for the X and Y dimensions when building the mosaic. Larger values use more memory but may be faster. Default is 512.
</ParamField>

<ParamField path="max_shard_size" type="float">
  The size in bytes that determines the shard size for the Zarr store and the partition size for each task. Default is 3.5GB in bytes.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

<ParamField path="resolution" type="float | None">
  Spatial resolution for the output mosaic in the units of the target CRS. If None, uses the native resolution of the input datasets. Default is None.
</ParamField>

<ParamField path="skip_xy_coords" type="bool">
  Whether to skip the XY coordinates when building the mosaic. This is useful for very very large mosaics. Defaults to False.
</ParamField>

#### Response

<ResponseField name="return" type="MosaicResult">
  Result containing the output mosaics GeoDataFrame and the
  `first_row_mosaic` URI extracted from its `location` column.
</ResponseField>

### build\_zarr\_multiscales()

Build an optimized multiscale Zarr store from an unoptimized Zarr store.

This workflow creates a new Zarr store with multiple resolution levels (overviews) and optional histogram statistics, suitable for efficient visualization and analysis.

```python theme={"system"}
def build_zarr_multiscales(
    self,
    source_store: str,
    nodata: float | None = None,
    histogram_dims: list[str] | None = None,
    envs: dict[str, str] | None = None
) -> rasterflow_remote.data_models.MosaicOutput
```

#### Parameters

<ParamField path="source_store" type="str" required>
  URI of the input Zarr store to process (e.g., an S3 path like `s3://bucket/path/store.zarr`).
</ParamField>

<ParamField path="nodata" type="float | None">
  Fill value to use for target arrays. If None, uses source array fill\_value when available, otherwise falls back to NaN for floating types and 0 for non-floating types. Default is None.
</ParamField>

<ParamField path="histogram_dims" type="list[str] | None">
  Dimensions to create separate histograms for (e.g., `["band"]`). If None, auto-detects: uses `["band"]` if a "band" dimension exists, otherwise creates a single global histogram. Default is None.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

#### Response

<ResponseField name="return" type="MosaicOutput">
  Output URI to the generated multiscale Zarr store.
</ResponseField>

### predict\_mosaic()

Run inference on a single mosaic zarr store using a specified model.

```python theme={"system"}
def predict_mosaic(
    self,
    store: str,
    model_path: str,
    patch_size: int,
    clip_size: int,
    device: str,
    features: list[str],
    labels: list[str],
    actor: rasterflow_remote.data_models.MosaicToMosaicActorEnum,
    max_batch_size: int,
    merge_mode: rasterflow_remote.data_models.MergeModeEnum,
    selected_labels: list[str] | None = None,
    xy_block_multiplier: int = 4,
    target_xy_chunksize: int | None = None,
    runtime: rasterflow_remote.data_models.RuntimeEnum =
        RuntimeEnum.SMALL,
    envs: dict[str, str] | None = None
) -> wherobots_rasterflow_helpers.domain.mosaics.MosaicResult
```

#### Parameters

<ParamField path="store" type="str" required>
  URI of the input mosaic Zarr store to run inference on.
</ParamField>

<ParamField path="model_path" type="str" required>
  Path (local or remote URL) to the model file. Should be compatible with the specified inference actor.
</ParamField>

<ParamField path="patch_size" type="int" required>
  Size of the patches to be used during inference.
</ParamField>

<ParamField path="clip_size" type="int" required>
  Size in pixels to clip from patch edges before merging predictions. Helps reduce edge artifacts in overlapping regions. Must be less than patch\_size.
</ParamField>

<ParamField path="device" type="str" required>
  Device to run the model on. Options: "cuda" for GPU, "cpu" for CPU.
</ParamField>

<ParamField path="features" type="list[str]" required>
  List of feature (band) names from the mosaic to use as model inputs. Must exist in the input Zarr store.
</ParamField>

<ParamField path="labels" type="list[str]" required>
  List of output label names that the model produces. These will be the band names in the output store.
</ParamField>

<ParamField path="actor" type="MosaicToMosaicActorEnum" required>
  The inference actor to use for running the model. Available options are defined in MosaicToMosaicActorEnum.
</ParamField>

<ParamField path="max_batch_size" type="int" required>
  Maximum number of patches to process in a single batch during inference.
</ParamField>

<ParamField path="merge_mode" type="MergeModeEnum" required>
  Method for merging predictions from overlapping patches. Options defined in MergeModeEnum.
</ParamField>

<ParamField path="selected_labels" type="list[str] | None">
  Subset of labels to extract from model output. If None, all labels produced by the model are saved. Default is None.
</ParamField>

<ParamField path="xy_block_multiplier" type="int">
  Multiplier on Zarr chunks. Larger values process bigger blocks (groups of chunks) at once. Default is 4.
</ParamField>

<ParamField path="target_xy_chunksize" type="int | None" default="None">
  Optional chunk size for output mosaics. If None, the workflow default is used.
</ParamField>

<ParamField path="runtime" type="RuntimeEnum">
  Compute resources to allocate for the workflow execution. Options defined in RuntimeEnum (e.g., SMALL, MEDIUM, LARGE). Default is RuntimeEnum.SMALL.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

#### Response

<ResponseField name="return" type="MosaicResult">
  Result containing the output mosaics GeoDataFrame and the
  `first_row_mosaic` URI extracted from its `location` column.
</ResponseField>

### predict\_mosaic\_geometries()

Run geometry inference on a single mosaic zarr store using a specified model.

Produces georeferenced vector geometries from model predictions on an existing mosaic, unlike :meth:`run_geometry_inference_recipe` which also builds the mosaic from a configured data source.

```python theme={"system"}
def predict_mosaic_geometries(
    self,
    store: str,
    model_path: str,
    patch_size: int,
    clip_size: int,
    device: str,
    features: list[str],
    labels: list[str],
    actor: rasterflow_remote.data_models.GeometryActorEnum,
    max_batch_size: int,
    confidence_threshold: float,
    merge_mode: rasterflow_remote.data_models.MergeModeEnum =
        MergeModeEnum.CLIP,
    selected_labels: list[str] | None = None,
    xy_block_multiplier: int = 4,
    dst_crs: str = 'EPSG:4326',
    runtime: rasterflow_remote.data_models.RuntimeEnum =
        RuntimeEnum.SMALL,
    envs: dict[str, str] | None = None
) -> rasterflow_remote.data_models.GeometryOutput
```

#### Parameters

<ParamField path="store" type="str" required>
  URI of the input mosaic Zarr store to run inference on.
</ParamField>

<ParamField path="model_path" type="str" required>
  Path (local or remote URL) to the model file. Should be compatible with the specified inference actor.
</ParamField>

<ParamField path="patch_size" type="int" required>
  Size of the patches to be used during inference.
</ParamField>

<ParamField path="clip_size" type="int" required>
  Size in pixels to clip from patch edges before merging predictions. Helps reduce edge artifacts in overlapping regions. Must be less than patch\_size.
</ParamField>

<ParamField path="device" type="str" required>
  Device to run the model on. Options: "cuda" for GPU, "cpu" for CPU.
</ParamField>

<ParamField path="features" type="list[str]" required>
  List of feature (band) names from the mosaic to use as model inputs. Must exist in the input Zarr store.
</ParamField>

<ParamField path="labels" type="list[str]" required>
  List of output label names that the model produces.
</ParamField>

<ParamField path="actor" type="GeometryActorEnum" required>
  The inference actor to use for running the model. Available options are defined in GeometryActorEnum.
</ParamField>

<ParamField path="max_batch_size" type="int" required>
  Maximum number of patches to process in a single batch during inference.
</ParamField>

<ParamField path="confidence_threshold" type="float" required>
  Minimum confidence score in `[0.0, 1.0]` to retain a geometry detection. Lower values yield more detections at the cost of more false positives.
</ParamField>

<ParamField path="merge_mode" type="MergeModeEnum">
  Method for merging predictions from overlapping patches. Options defined in MergeModeEnum. Default is MergeModeEnum.CLIP.
</ParamField>

<ParamField path="selected_labels" type="list[str] | None">
  Subset of labels to extract from model output. If None, all labels produced by the model are saved. Default is None.
</ParamField>

<ParamField path="xy_block_multiplier" type="int">
  Multiplier on Zarr chunks. Larger values process bigger blocks (groups of chunks) at once. Default is 4.
</ParamField>

<ParamField path="dst_crs" type="str">
  EPSG code string for the output coordinate reference system of the geometries (e.g., `"EPSG:4326"`). Default is `"EPSG:4326"`.
</ParamField>

<ParamField path="runtime" type="RuntimeEnum">
  Compute resources to allocate for the workflow execution. Options defined in RuntimeEnum (e.g., SMALL, MEDIUM, LARGE). Default is RuntimeEnum.SMALL.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

#### Response

<ResponseField name="return" type="GeometryOutput">
  Output URI to a parquet directory containing georeferenced vector geometries.
  The URI is `None` if no geometries were detected.
</ResponseField>

### run\_geometry\_inference\_recipe()

Run geometry inference using a pre-configured recipe for a specific model.

This convenience method builds a mosaic from the configured data source and runs inference to produce georeferenced vector geometries from a text prompt.

```python theme={"system"}
def run_geometry_inference_recipe(
    self,
    aoi: str,
    start: datetime.datetime,
    end: datetime.datetime,
    model_recipe:
        rasterflow_remote.data_models.GeometryModelRecipes,
    text_prompt: str | list[str],
    confidence_threshold: float,
    crs_epsg: int | None = None,
    runtime: rasterflow_remote.data_models.RuntimeEnum =
        RuntimeEnum.SMALL,
    envs: dict[str, str] | None = None
) -> rasterflow_remote.data_models.GeometryOutput
```

#### Parameters

<ParamField path="aoi" type="str" required>
  Remote URL path to the area of interest GeoDataFrame.
</ParamField>

<ParamField path="start" type="datetime" required>
  Start date for the temporal range of the mosaic.
</ParamField>

<ParamField path="end" type="datetime" required>
  End date for the temporal range of the mosaic.
</ParamField>

<ParamField path="model_recipe" type="GeometryModelRecipes" required>
  Pre-configured recipe that defines the datasets, model, and inference parameters to use. Available recipes are defined in the GeometryModelRecipes enum.
</ParamField>

<ParamField path="text_prompt" type="str | list[str]" required>
  One or more noun phrases describing the objects to detect (e.g., `"building"`, `["tree", "shrub"]`). A bare string is treated as a single-element list. All listed categories are detected and included in the output.
</ParamField>

<ParamField path="confidence_threshold" type="float" required>
  Minimum confidence score in `[0.0, 1.0]` to retain a geometry detection. Lower values yield more detections at the cost of more false positives.
</ParamField>

<ParamField path="crs_epsg" type="int | None">
  EPSG code for the coordinate reference system of the output. Consider using a UTM-specific EPSG code (e.g., EPSG:32610 for UTM Zone 10N) to avoid reprojection/resampling if your AOI falls within a single UTM zone and the model recipe uses a UTM-projected dataset. If None, defaults to the native CRS of the underlying datasets for the model recipe, which are often UTM-projected. Default is None.
</ParamField>

<ParamField path="runtime" type="RuntimeEnum">
  Compute resources to allocate for the workflow execution. Options defined in RuntimeEnum (e.g., SMALL, MEDIUM, LARGE). Default is RuntimeEnum.SMALL.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

#### Response

<ResponseField name="return" type="GeometryOutput">
  Output URI to a parquet directory containing georeferenced vector geometries.
  The URI is `None` if no geometries were detected.
</ResponseField>

### run\_mosaics\_change()

Run temporal change detection on a mosaic zarr store.

```python theme={"system"}
def run_mosaics_change(
    self,
    store: str,
    score_methods:
        list[rasterflow_remote.data_models.TemporalScoreMethodEnum],
    distance_metric:
        rasterflow_remote.data_models.DistanceMetricEnum,
    xy_block_multiplier: int = 4,
    sharded: bool = False,
    target_xy_chunksize: int | None = None,
    selector: dict[str, tuple[int, int]] | None = None,
    data_var: str = 'variables',
    fill_value: float | None = None,
    robust_time_zscore: bool = True,
    runtime: rasterflow_remote.data_models.RuntimeEnum =
        RuntimeEnum.SMALL,
    envs: dict[str, str] | None = None
) -> wherobots_rasterflow_helpers.domain.mosaics.MosaicResult
```

#### Parameters

<ParamField path="store" type="str" required>
  URI of the input mosaic Zarr store to score over time.
</ParamField>

<ParamField path="score_methods" type="list[TemporalScoreMethodEnum]" required>
  Temporal scoring methods to compute. Each method is written as a separate output band.
</ParamField>

<ParamField path="distance_metric" type="DistanceMetricEnum" required>
  Distance metric used when comparing embeddings across time.
</ParamField>

<ParamField path="xy_block_multiplier" type="int">
  Multiplier on Zarr chunks. Larger values process bigger blocks at once. Default is 4.
</ParamField>

<ParamField path="sharded" type="bool">
  Whether to write sharded output chunks. Default is False.
</ParamField>

<ParamField path="target_xy_chunksize" type="int | None" default="None">
  Optional chunk size for output mosaics. If None, the workflow default is used.
</ParamField>

<ParamField path="selector" type="dict[str, tuple[int, int]] | None">
  Per-dimension integer index selection to subset the mosaic before processing. A mapping from dimension name (e.g. `"x"`, `"y"`, `"time"`) to a `(start, stop)` pair of **chunk-aligned** integer indices. Only integer index selection is supported for now. Default is None (process the full mosaic).
</ParamField>

<ParamField path="data_var" type="str">
  Name of the source array variable to read and the output array variable to write. Default is `"variables"`.
</ParamField>

<ParamField path="fill_value" type="float | None" default="None">
  Optional nodata/fill value to replace with `NaN` before scoring.
</ParamField>

<ParamField path="robust_time_zscore" type="bool">
  Whether to post-process raw distance scores as a robust z-score along the time dimension. Default is True.
</ParamField>

<ParamField path="runtime" type="RuntimeEnum">
  Compute resources to allocate for the workflow execution. Options defined in RuntimeEnum (e.g., SMALL, MEDIUM, LARGE). Default is RuntimeEnum.SMALL.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

#### Response

<ResponseField name="return" type="MosaicResult">
  Result containing the output mosaics GeoDataFrame and the
  `first_row_mosaic` URI extracted from its `location` column.
</ResponseField>

### vectorize\_mosaic()

Convert raster predictions to vector geometries through polygonization.

Supports thresholding and then vectorizing float values. Typically these are confidence scores from semantic segmentation workflows.

```python theme={"system"}
def vectorize_mosaic(
    self,
    store: str,
    features: list[str],
    threshold: float,
    vectorize_method:
        rasterflow_remote.data_models.VectorizeMethodEnum,
    vectorize_config:
        rasterflow_remote.data_models.SemSegRasterioConfig | None,
    xy_block_multiplier: int = 4,
    dst_crs: str | None = 'EPSG:4326',
    runtime: rasterflow_remote.data_models.RuntimeEnum =
        RuntimeEnum.SMALL,
    envs: dict[str, str] | None = None
) -> rasterflow_remote.data_models.VectorizeOutput
```

#### Parameters

<ParamField path="store" type="str" required>
  URI of the input mosaic Zarr store to vectorize.
</ParamField>

<ParamField path="features" type="list[str]" required>
  List of features (band) names from the mosaic to vectorize. Typically these represent the model predictions from predict\_mosaic. Each feature is vectorized separately.
</ParamField>

<ParamField path="threshold" type="float" required>
  Threshold value for binarizing continuous predictions before vectorization. Pixels with values greater than or equal to this threshold are considered foreground (1), while values below are background (0).
</ParamField>

<ParamField path="vectorize_method" type="VectorizeMethodEnum" required>
  Vectorization method to use. Available methods are defined in VectorizeMethodEnum.
</ParamField>

<ParamField path="vectorize_config" type="VECTOR_CONFIG_TYPES" required>
  The configuration for the vectorize\_method.
</ParamField>

<ParamField path="xy_block_multiplier" type="int">
  Multiplier on Zarr chunks. Larger values process bigger blocks (groups of chunks) at once. Default is 4.
</ParamField>

<ParamField path="dst_crs" type="str | None">
  Target coordinate reference system for the output geometries in EPSG format (e.g., "EPSG:4326"). If None, geometries remain in the CRS of the input mosaic. Default is "EPSG:4326" (WGS84 lat/lon).
</ParamField>

<ParamField path="runtime" type="RuntimeEnum">
  Compute resources to allocate for the workflow execution. Options defined in RuntimeEnum (e.g., SMALL, MEDIUM, LARGE). Default is RuntimeEnum.SMALL.
</ParamField>

<ParamField path="envs" type="dict[str, str] | None">
  Additional environment variables to pass to the workflow execution. Default is None.
</ParamField>

#### Response

<ResponseField name="return" type="VectorizeOutput">
  Output URI to the merged parquet directory containing vectorization
  results, or `None` when no vector features were produced.
</ResponseField>
