geoenrich 0.7.1

Enrich longitude/latitude points with coast distance, bathymetric depth, sea name, and nearest country/municipality
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use clap::Parser;
use geoenrich::cli::Cli;

fn main() {
    // Rayon and Polars spawn worker threads with a small default stack that can
    // overflow inside Polars' parquet writer on large frames. Raise the default
    // for every thread std spawns, before any pool initializes, and only when the
    // user has not chosen their own value. (Same reasoning as ctddump.)
    if std::env::var_os("RUST_MIN_STACK").is_none() {
        std::env::set_var("RUST_MIN_STACK", (16 * 1024 * 1024).to_string());
    }

    let cli = Cli::parse();
    if let Err(e) = geoenrich::run(cli) {
        eprintln!("Error: {}", e);
        std::process::exit(1);
    }
}