1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// SPDX-License-Identifier: BSD-3-Clause
//! `ndslive-math` — coordinate math, packed tile IDs, and Morton (Z-order)
//! codes for NDS.Live geographic tiling.
//!
//! This crate is a faithful Rust port of the Python reference implementation
//! (`ndslive.math`). It provides:
//!
//! - [`Wgs84`] — a WGS84 lon/lat/alt point with NDS coordinate conversion,
//! distance and bearing helpers.
//! - [`MortonCode`] — a standalone Z-order encoder/decoder.
//! - [`PackedTileId`] — an NDS.Live Packed Tile ID with geometry accessors and
//! neighbour traversal.
//! - [`NdsBoundingBox`] — a rectangle in NDS coordinate space.
//! - [`get_tile_ids_for_bounding_box`] / [`bounding_box_from_tile_ids`] — bulk
//! tile enumeration helpers.
//!
//! # Example
//!
//! ```
//! use ndslive_math::{Wgs84, MortonCode, PackedTileId};
//!
//! // WGS84 -> NDS coordinates (uses floor, per the NDS recommendation).
//! let point = Wgs84::new(11.585, 48.137); // Munich
//! let (nds_x, nds_y) = point.to_nds_coordinates();
//!
//! // Find the level-13 tile containing the point.
//! let morton = MortonCode::from_nds_coordinates(nds_x, nds_y);
//! let tile = PackedTileId::from_morton_and_level(morton, 13).unwrap();
//!
//! let sw = tile.south_west_corner();
//! let east = tile.east_neighbour();
//! ```
pub use NdsBoundingBox;
pub use MortonCode;
pub use ;
pub use PolygonTriangulation;
pub use ;
pub use Vec2;
pub use ;
pub use Wgs84Aabb;
pub use Wgs84Polygon;