APbase

APbase turns irregular field data, such as yield-monitor logs, soil samples, and sensor readings, into validated maps. It filters the source points, handles geographic coordinates when needed, builds the target grid, fits the variogram, compares interpolation methods, and keeps the one with the lower cross-validation RMSE. You get a ready-to-use map without choosing a mathematical model by hand.

Note

The numerical work runs in compiled kernels. With a fixed seed, repeated runs on the same data produce the same map.

The Python package exposes the high-level mapping pipeline through apbase.Map and apbase.create_map:

import apbase

result = apbase.Map(resolution=10.0)(x, y, z)

result.method                  # "idw" or "kriging", whichever has the lower leave-one-out RMSE
result.x, result.y, result.z   # grid points inside the boundary

What the pipeline handles

  • Automatic model selection. The pipeline compares IDW with ordinary kriging and uses the method with the lower leave-one-out cross-validation RMSE for the current dataset.
  • Efficient numerical work. A fitted variogram is reused for radius selection, cross-validation, and final kriging, avoiding repeated work.
  • Ready for services and batch jobs. The same call runs unchanged in a script, a service, or a batch job, with no extra runtime to set up. See Production and cloud deployment.
  • Works with irregular, noisy points. Invalid rows, global outliers, and local spatial outliers are removed before interpolation runs.
  • Useful defaults. The search radius is derived from the fitted variogram's range (see Variogram fitting).

See Quickstart for a full worked example. Use User guide and Methodology when you need advanced control or want to audit the mathematics behind the automatic choice.

Contents