Skip to main content

Crate apbase

Crate apbase 

Source
Expand description

APbase: high-performance automatic map generation.

The public top-level API is intentionally small: use Map or create_map to create maps, and config for process-wide runtime settings. Lower-level geostatistical building blocks remain available from their dedicated modules.

use apbase::{Map, MapOptions};

let (x, y, z) = load();
apbase::config.set("n_threads", 4)?;

let result = Map::new(MapOptions::new(10.0)).call(&x, &y, &z)?;
println!("{}", result.method); // "idw" or "kriging"
let (raster_x, raster_y, raster_z) = result.to_raster()?; // NaN outside the boundary

let result = apbase::create_map(&x, &y, &z, MapOptions::new(10.0))?;

Re-exports§

pub use config::config;
pub use mapping::Map;
pub use mapping::MapOptions;
pub use mapping::MapResult;
pub use mapping::create_map;

Modules§

cokriging
High-level cokriging API.
common
Shared building blocks: array coercion, coordinate handling, errors and validation.
config
Process-wide default overrides for apbase classes.
cross_validate
Leave-one-out cross-validation for IDW, ordinary kriging, and cokriging.
cross_variogram
Cross-variogram fitting and secondary-variable screening for cokriging.
filtering
High-level spatial filtering API.
grid
Regular target-grid generation, shared by IDW and kriging interpolation.
idw
High-level inverse distance weighting API.
kriging
High-level kriging API: local ordinary kriging. Target-grid generation lives in apbase::grid.
mapping
Automatic high-performance map generation.
variogram
Shared high-level variogram API.

Constants§

__version__
Package version.