• Experimental

    Convert a bounded, contiguous row window of a columnar batch into a protocol-neutral Result of typed features.

    Features are emitted in batch row order, so the Result preserves the batch's declared ordering exactly. Geometry becomes GeoJSON, the batch's feature-id, timestamp, and dictionary columns become attributes under their declared names, and a null timestamp or dictionary value becomes an explicit null attribute rather than a missing key.

    This direction is complete: a normative GeoArrow batch carries exactly those four columns, so nothing on the batch is left behind and there is no loss to report. Use columnarBatchToResultPages to walk more of a batch than one window without raising the ceiling.

    Type Parameters

    • T extends Record<string, unknown> = Record<string, unknown>

    Returns ColumnarResult<T>

    HonuaGeoArrowError row-limit-exceeded when the window exceeds options.maxFeatures. The ceiling is checked before the batch is inspected, so nothing is read or allocated on that path.

    HonuaGeoArrowError unsupported-layout for xym/xyzm geometry, which GeoJSON cannot represent.

    const result = columnarBatchToResult(batch, { offset: 0, limit: 50, maxFeatures: 200 });
    for (const feature of result.features) console.log(feature.geometry, feature.attributes);