Export an overview file to a PMTiles archive, one zoom per level.

Args:
    input: Overview file from `overview()`.
    output: PMTiles archive to write.
    layer_name: MVT layer name.
    tile_buffer: Tile edge buffer in pixels, default {default:tile_buffer}, from zero to {const:MAX_TILE_BUFFER_PX}.
    preset: `"tippecanoe"` starts from tippecanoe's tile buffer, max-zoom
        simplification, size limits, size valve and one valve threshold per
        zoom (`valve_scope="zoom"`) instead of tylertoo's; an option you pass
        still applies. See
        [the tippecanoe preset](https://geoparquet-io.github.io/tylertoo/guides/tippecanoe/#the-tippecanoe-preset).
    extent: Tile resolution in MVT units.
    tile_size_limit: Maximum raw (uncompressed) tile size in
        bytes, a backstop behind `max_compressed_tile_size`;
        `"auto"` is {const:DEFAULT_TILE_SIZE_LIMIT}, and `0` or `None` is no limit.
    simple_clip_fastpath: Use faster clipping for simple polygons.
        `False` gives byte-stable output.
    partition_wave: [Partitions in memory](https://geoparquet-io.github.io/tylertoo/reference/tuning/#memory)
        at once, or `0` to size from CPUs and RAM.
    feature_order: Paint order within a tile: `"input"`, or a
        property name with an optional `:asc` or `:desc`.
    min_zoom: Coarsest zoom to declare when the coarsest levels are
        empty.
    include_properties: Keep only these properties in the tiles.
        The overview file keeps every column, and the
        `feature_order` column must stay. `[]` keeps none.
    exclude_properties: Drop these properties from the tiles.
        `include_properties` overrides it.
    exclude_all_properties: Drop every property, writing
        geometry-only tiles. `include_properties` overrides it.
    feature_id: Integer column to use as the MVT feature ID. By default,
        features have no ID.
    spill_dir: [Spill directory](https://geoparquet-io.github.io/tylertoo/reference/tuning/#memory)
        used when memory runs short.
    profile: [Memory profile](https://geoparquet-io.github.io/tylertoo/reference/tuning/#memory):
        `"speed"` holds everything in RAM, `"bounded"` uses disk and
        holds the least, and `"auto"` sizes to the machine's memory.
        Wheels use mimalloc. Under `"bounded"`, it purges freed pages
        immediately to reduce peak memory at a speed cost. The setting
        applies for the duration of each `"bounded"` call and is then
        restored; overlapping calls on other threads share it while any
        `"bounded"` call runs. A non-musl source build uses the system allocator with
        `maturin build --no-default-features` (musl always uses mimalloc).
        Output is identical across profiles.
    workers: [Worker threads](https://geoparquet-io.github.io/tylertoo/reference/tuning/#memory)
        for the whole run. `None` (default) uses `RAYON_NUM_THREADS`
        when set, else every core under `"auto"` and `"speed"` and at
        most {const:WORKER_THREADS_MAX} under `"bounded"`. `0` is an error. The pool is
        process-wide, so the first call in a process sets it and later
        calls keep it.
    memory_limit: [Memory limit](https://geoparquet-io.github.io/tylertoo/reference/tuning/#memory)
        in bytes, used in place of the detected
        available memory (cgroup limit or `MemAvailable`). It overrides
        `TYLERTOO_AUTO_MEM_LIMIT_BYTES`. `0` is an error. The limit is
        process-wide: it stays in force for later calls in the process
        until another call sets one.
    name: Human-readable tileset name, stored in the metadata.
    description: Description of the tileset, stored in the metadata.
    attribution: Attribution text or HTML stored in the archive
        metadata; MapLibre shows it in its attribution control.
        Each value is stored as given, and `""` is kept as `""`.
    size_valve: How to reduce a tile that exceeds its limit:
        `"merge"` merges the densest lines and polygons into a
        neighbor, which keeps its own attributes. If still over, drop
        unmerged features, halve the tile extent to its floor, then drop whole
        features if needed. Merged features are never split into their
        sources. In a tile of lines or polygons, only a lone feature
        still over the cap at the extent floor is written over it, with
        a warning.
        `"drop"` removes
        features, leaving holes. Point tiles use feature dropping in
        both modes.
    valve_scope: How far the size valve's thinning reaches past the
        tile that needs it. `"smooth"` predicts each tile's threshold from
        the export scan and fades it over the tiles around, so neighbouring
        tiles differ by at most `valve_max_step` (in point
        tiles, in the share of points they keep) and the
        density steps down over several tiles instead of jumping at a tile
        edge; tiles near a dense one are thinned too. `"tile"` thins each
        tile only as much as it needs on its own: the most detail, with
        visible steps at tile edges. `"zoom"` starts every tile from the
        largest threshold predicted at its zoom, like tippecanoe's one
        threshold per zoom: no edges, the least detail; `preset="tippecanoe"`
        sets it; not with `tile_range`.
    valve_max_step: Under `valve_scope="smooth"`, the largest density
        step allowed between neighbouring tiles: a tile keeps at most this
        many times more points (or merges at most this many times less
        hard) than its neighbour. The fade reaches a bounded number of tiles out. Must be above 1, and only applies under
        `valve_scope="smooth"`. Smaller values
        spread the thinning further; the default is {default:valve_max_step}; larger values
        come closer to `valve_scope="tile"`.
    max_compressed_tile_size: Maximum gzip-compressed tile size
        in bytes, like tippecanoe's `-M`; `"auto"` is {const:DEFAULT_COMPRESSED_TILE_SIZE_LIMIT}, and
        `0` or `None` is no limit.
    max_zoom_simplify_factor: Simplify each feature of the finest
        (canonical) level once, before clipping, with tolerance factor ×
        GSD at that level's zoom, like `simplify_factor` for coarser
        levels. Only vertices are removed: features, individual
        MultiLineString or MultiPolygon parts, and polygon rings
        (including holes) that would collapse or be dropped under the
        tolerance keep their original geometry.
        Defaults to `None`: lines use factor {const:DEFAULT_LINE_MAX_ZOOM_SIMPLIFY_FACTOR} and polygons
        are not simplified. An explicit factor applies to both; `0`
        disables it. Explicit `None` selects the command's default,
        like `"auto"` for size caps: no max-zoom simplification under
        verbatim or for pyramid bands, and {const:DEFAULT_LINE_MAX_ZOOM_SIMPLIFY_FACTOR} for both kinds under
        the tippecanoe preset. Changes the output; leaves
        coarser levels unchanged, except that variable-depth stop tiles
        carry the simplified finest-level features. Leaves the overview
        file unchanged. Comparable to
        tippecanoe's `-S`, which uses tile units at every zoom:
        `-S 10` is about factor 2.5.
    no_simplification_of_shared_nodes: Set `True` to rebuild and keep
        shared-border pins at the finest zoom. Acts only when you set
        `max_zoom_simplify_factor` above 0 or use `preset="tippecanoe"`,
        which sets it to {const:DEFAULT_LINE_MAX_ZOOM_SIMPLIFY_FACTOR}. Defaults to `False`.
    coverage_fill: Experimental: under each tile's features, draw
        the area its child tiles cover, so a polygon coverage shows
        no holes at coarse zooms. Holds the finest level's geometry
        in memory. See [tile size](https://geoparquet-io.github.io/tylertoo/reference/tuning/#tile-size).
    variable_depth: End each branch of the tile pyramid at the
        coarsest zoom whose tile holds all of that area's finest-level
        features within both size caps, like tippecanoe's
        `--generate-variable-depth-tile-pyramid`. The server must serve
        the nearest ancestor for a missing tile. See
        [tile size](https://geoparquet-io.github.io/tylertoo/reference/tuning/#tile-size).
    tile_range: Export only the tiles in this tile-id range,
        `"LO..HI"`: one shard of a sharded build.
    zoom_ceiling: Export only the tiles at or below this zoom: the
        coarse job of a sharded build.
    tile_format: Tile encoding, `"mvt"` (default) or `"mlt"`. MLT needs
        MapLibre GL JS 5.12 or later, or MapLibre Native. Each finished
        MVT tile is converted with mlt-core before gzip and both size
        caps, so the caps measure MLT bytes. MLT stores each attribute
        of a layer as one typed column, following mlt-core's MVT
        conversion: integers mixed with floats become f64 (doubles),
        and other mixes become strings. Attribute order within a
        feature becomes column order. MLT archives use PMTiles tile
        type 6 and metadata format `"mlt"`. Merge refuses to combine
        MVT and MLT archives.
    mlt_profile: MLT profile. Non-default profiles need
        `tile_format="mlt"`.
        `"web"` (default) supports web renderers.
        It omits FastPFOR, FSST, and shared
        dictionaries, and stores integer columns wider than {const:U32_BITS} bits
        as doubles when every value is exact (absolute value at most
        {const:MAX_EXACT_DOUBLE_INTEGER}): GL JS reads {const:U64_BITS}-bit integers as BigInt, and style
        expressions do not compare BigInt with numbers. The others
        are mlt-core's profiles: `"native"` for MapLibre Native with
        every codec and stored polygon triangles; `"min-size"` for
        smallest tiles; `"diffable"` for small binary diffs between
        releases; `"fast-encoding"` for quickest encoding.

Returns:
    Tile counts for each zoom written, with encoding diagnostics.

Raises:
    ConfigError: An option out of range or refused, such as
        `tile_buffer` past {const:MAX_TILE_BUFFER_PX}, `extent=0`, a missing `spill_dir`,
        or metadata too large for the 16 MiB archive metadata.
    ValueError: A property selection the overview file cannot
        satisfy.
    RuntimeError: Not an overview file, or reading or writing
        failed.

Example:
    >>> report = export_pmtiles("overview.parquet", "out.pmtiles")
    >>> report["max_zoom"]
    10
    >>> credited = export_pmtiles(
    ...     "overview.parquet",
    ...     "credited.pmtiles",
    ...     attribution="© Example contributors",
    ... )
    >>> credited["zooms"] == report["zooms"]
    True
