geolith 0.1.6

Shared library of the geolith builders: source readers, conflation, admin areas, tile encoding and the PMTiles and MBTiles writers
Documentation
//! GERS-based conflation for deduplicating OSM and Overture features.
//!
//! Overture Maps maintains a Global Entity Reference System (GERS) that
//! links Overture features to their source OSM elements via bridge files.
//! This module reads those bridge files and uses them to deduplicate
//! features that appear in both OSM and Overture datasets.
//!
//! # Architecture
//!
//! - [`bridge::BridgeIndex`] — in-memory index loaded from a GERS bridge
//!   Parquet file, mapping OSM element IDs to GERS UUIDs.
//! - [`dedup::GersDedup`] — thread-safe deduplication filter that checks
//!   OSM features against the bridge index and tracks statistics.
//! - [`changelog::read_changelog`] — reads Overture changelog Parquet files
//!   to identify changed GERS IDs for incremental processing.
//! - `spatial::SpatialDedup` — R-tree/H3 spatial dedup fallback for themes
//!   without GERS bridge files (places, POIs, landcover, water).
pub mod bridge;
pub mod changelog;
pub mod dedup;
pub mod spatial;

pub use bridge::{BridgeIndex, OsmElementType, OsmRecordId};
pub use changelog::{ChangeType, ChangelogEntry, read_changelog};
pub use dedup::GersDedup;
pub use spatial::{SpatialCandidate, SpatialDedupConfig, haversine_distance_m};

/// Test helper: create a [`GersDedup`] from raw entries without a Parquet file.
///
/// Only available in test builds. Used by integration tests in `tests/conflation.rs`.
#[cfg(test)]
pub fn test_dedup_from_entries(entries: Vec<(u64, String)>) -> GersDedup {
    let bridge = bridge::BridgeIndex::from_entries(entries);
    GersDedup::new(bridge)
}