Skip to content

Analysis: spatial index for Kriging/IDW, antimeridian handling in warp Aggregate, and interpolation skip notices #2918

Backlog

Description

@giswqs

Summary

Three related improvements in crates/analysis:

  1. Brute-force k-NN in kriging_on and idw_on (crates/analysis/src/kriging.rs:375-397, crates/analysis/src/rasterops.rs:842-877): Both scan all input points per output cell with no spatial index, and their public functions pass partial_cmp().unwrap_or(Equal) without filtering non-finite coordinates. Building a static k-d tree or grid index once before the parallel row loop and using f64::total_cmp / filtering non-finite points will both speed up large point sets and prevent driftsort panics on direct API calls.
  2. Antimeridian seam cells in warp::Aggregate::row (crates/analysis/src/warp.rs:927-999): When reprojecting a global geographic raster across +/-180 degrees with Average or Mode, output cells straddling the seam produce c0..c1 spanning almost the full raster width, aggregating pixels from the wrong hemisphere in an O(W * H) inner loop without control::check().
  3. Silent feature skips in idw_interpolation and kriging_interpolation (crates/analysis/src/tools.rs:5035-5137): Features with missing geometries, null/non-numeric values, or non-finite coordinates are skipped without a notice in ToolResult::messages, and idw_interpolation omits periodic control::check()? in its input loop.

Activity

  1. added
    enhancement
    on Nov 25, 2026
  2. choupeanut commented on Nov 28, 2026

    @choupeanut
    Contributor

    I'd like to take parts 2 and 3: the IDW and Kriging tools will report the features they skip (with Cancel checks in IDW's input loop), and Aggregate will take a cell that crosses ±180° from the right side of a global source. Part 1 (the spatial index) I'll leave for after #2927, which changes the same sort lines. I'll open a pull request shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions