# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405

import builtins
import typing
__all__ = [
    "MltFeature",
    "MltLayer",
    "decode_mlt",
    "decode_mlt_to_geojson",
    "encode_geojson",
    "encode_mvt",
    "list_layers",
]

@typing.final
class MltFeature:
    r"""
    A decoded MLT feature with geometry, id, and properties.
    """
    @property
    def id(self) -> typing.Optional[builtins.int]: ...
    @property
    def geometry_type(self) -> builtins.str: ...
    @property
    def wkb(self) -> bytes: ...
    @property
    def properties(self) -> dict: ...
    def __repr__(self) -> builtins.str: ...

@typing.final
class MltLayer:
    r"""
    A decoded MLT layer containing features.
    """
    @property
    def name(self) -> builtins.str: ...
    @property
    def extent(self) -> builtins.int: ...
    @property
    def features(self) -> builtins.list[MltFeature]: ...
    def __repr__(self) -> builtins.str: ...

def decode_mlt(data: bytes, z: typing.Optional[builtins.int] = None, x: typing.Optional[builtins.int] = None, y: typing.Optional[builtins.int] = None, tms: builtins.bool = True) -> builtins.list[MltLayer]:
    r"""
    Decode an MLT binary blob into a list of `MltLayer` objects.

    If `z`, `x`, `y` are provided, tile-local coordinates are transformed
    to EPSG:3857 (Web Mercator) meters. Without them, raw tile coordinates
    are preserved.

    `tms`: when True (the default), treat `y` as TMS convention (y=0 at south,
    used by OpenMapTiles / MBTiles). Set to False for XYZ / slippy-map tiles
    (y=0 at north, e.g. OSM raster tiles).
    """

def decode_mlt_to_geojson(data: bytes) -> builtins.str:
    r"""
    Decode an MLT binary blob and return GeoJSON as a string.
    """

def encode_geojson(geojson: typing.Mapping[builtins.str, builtins.object], name: builtins.str, extent: builtins.int = 4096, *, tessellate: builtins.bool = False, sort: typing.Literal['all', 'auto', 'morton', 'hilbert', 'id', 'none'] = "auto", shared_dict: builtins.bool = True, fsst: builtins.bool = True, fastpfor: builtins.bool = True) -> bytes:
    r"""
    Encode a GeoJSON `FeatureCollection` into MLT bytes.

    `geojson` is an RFC 7946 `FeatureCollection`.
    `name` and `extent` set the MLT layer metadata, since a `FeatureCollection` has no slot for them.
    Geometry is in tile-local coordinate space (no projection).

    `tessellate` generates triangulation data for polygons and multi-polygons.
    `sort` chooses which feature ordering(s) the encoder trials: `all` tries all orderings, `auto` tries a subset with a good speed-size tradeoff, a named curve (`morton`/`hilbert`/`id`) tries just that one, and `none` keeps the input order.
    `shared_dict` allows grouping strings into shared dictionaries.
    `fsst` allows FSST string compression.
    `fastpfor` allows FastPFOR integer compression.
    See the module docs.
    """

def encode_mvt(data: bytes, *, tessellate: builtins.bool = False, sort: typing.Literal['all', 'auto', 'morton', 'hilbert', 'id', 'none'] = "auto", shared_dict: builtins.bool = True, fsst: builtins.bool = True, fastpfor: builtins.bool = True) -> bytes:
    r"""
    Encode an entire MVT tile to MLT using default encoding options.

    `data` is a raw Mapbox Vector Tile (protobuf).

    Options:
    `tessellate` generates triangulation data for polygons and multi-polygons.
    `sort` chooses which feature ordering(s) the encoder trials: `all` tries all orderings, `auto` tries a subset with a good speed-size tradeoff, a named curve (`morton`/`hilbert`/`id`) tries just that one, and `none` keeps the input order.
    `shared_dict` allows grouping strings into shared dictionaries.
    `fsst` allows FSST string compression.
    `fastpfor` allows FastPFOR integer compression.
    """

def list_layers(data: bytes) -> builtins.list[builtins.str]:
    r"""
    Return a list of layer names without fully decoding.
    """
