"""Core utilities for nereus."""

from nereus.core.coordinates import (
    EARTH_RADIUS,
    cartesian_to_lonlat,
    chord_to_meters,
    compute_element_centers,
    great_circle_distance,
    great_circle_path,
    lonlat_to_cartesian,
    meters_to_chord,
)
from nereus.core.grids import (
    create_regular_grid,
    expand_bounds_for_polar,
    extract_coordinates,
    flatten_spatial,
    grid_cell_area,
    prepare_coordinates,
    prepare_input_arrays,
)
from nereus.core.mesh import (
    DASK_THRESHOLD_POINTS,
    add_mesh_metadata,
    create_lonlat_mesh,
    ensure_lon_pm180,
    get_mesh_type,
    is_nereus_mesh,
    mesh_from_arrays,
    normalize_lon,
    should_use_dask,
    validate_mesh,
)
from nereus.core.spatial import (
    find_nearest,
    haversine_distance,
    points_in_polygon,
    subset_by_bbox,
)
from nereus.core.types import (
    ArrayLike,
    BoolArray,
    FloatArray,
    HasArea,
    HasCoordinates,
    IntArray,
    LonConvention,
    MeshProtocol,
    MeshType,
    get_array_data,
    is_dask_array,
)

__all__ = [
    "DASK_THRESHOLD_POINTS",
    "EARTH_RADIUS",
    "ArrayLike",
    "BoolArray",
    "FloatArray",
    "HasArea",
    "HasCoordinates",
    "IntArray",
    "LonConvention",
    "MeshProtocol",
    "MeshType",
    "add_mesh_metadata",
    "cartesian_to_lonlat",
    "chord_to_meters",
    "compute_element_centers",
    "create_lonlat_mesh",
    "create_regular_grid",
    "ensure_lon_pm180",
    "expand_bounds_for_polar",
    "extract_coordinates",
    "flatten_spatial",
    "find_nearest",
    "get_array_data",
    "get_mesh_type",
    "great_circle_distance",
    "great_circle_path",
    "grid_cell_area",
    "haversine_distance",
    "is_dask_array",
    "is_nereus_mesh",
    "lonlat_to_cartesian",
    "mesh_from_arrays",
    "meters_to_chord",
    "normalize_lon",
    "points_in_polygon",
    "prepare_coordinates",
    "prepare_input_arrays",
    "should_use_dask",
    "subset_by_bbox",
    "validate_mesh",
]
