Skip to content
English
  • There are no suggestions because the search field is empty.

How to Stratify using 'K-Means'

K-means clustering is a popular technique used to combine multiple layers into a strata map that helps improve sampling accuracy. Here's how to use it in GXLab...

  1. Select boundaries

    • In the Map or Boundaries list, select one or more boundary polygons to stratify.
  2. Choose the number of strata (zones)

    • Enter the total zones you want to create (e.g., 3–6).
    • Start small to validate results, then iterate.
  3. Select the stratification method

    • K‑Means (clustering): Groups pixels/cells by similarity across chosen numeric layers.
      • Best for data with natural clusters or when using multiple layers.
    • Range (thresholds): Splits values by defined ranges or quantiles on a primary numeric layer.
      • Best when you need interpretable thresholds (e.g., low/medium/high).
  4. Select the layers to use

    • Pick one or more numeric layers that represent the variation you want to capture.
    • For K‑Means, prefer layers on similar scales or pre‑normalised to avoid one layer dominating.
  5. Run

    • Click Go. GXLab generates strata within each selected boundary and renders them on the map.

Validation checklist

After processing, confirm:

  • Strata polygons are visible and listed under the boundary’s strata panel.
  • Legend shows distinct classes for each stratum.
  • Optional: Export the strata or open in Analytics to verify they exist beyond the map view.

Good practice

  • Naming: If prompted, use a consistent scheme that reflects how you intend to use the strata (e.g., Contamination_Zone_01…Contamination_Zone_N or Low/Med/High Carbon).
  • Iterate: Test with 3–4 zones first, inspect results, then adjust zone count or layer selection.
  • Document inputs: Record chosen layers, method, and zone count for reproducibility.

Troubleshooting

  • Strata not visible but present in exports: Perform a hard refresh (Ctrl+F5 / Cmd+Shift+R).
  • Nothing generated: Check that selected layers are numeric and have coverage within the boundary.
  • Unexpected patterns with K‑Means: Reduce the number of layers or normalise their scales.
  • Filters hiding strata: Clear layer and attribute filters in the map.
  • Known UI-only display issue: If strata exist but don’t render, sign out/in or clear cached workspace data. Upgrading to the latest build resolves persistent display issues.

FAQs

Q: Can I stratify multiple boundaries at once?
A: Yes. Selections are applied to all selected boundaries; each gets its own set of strata.

Q: Which method should I choose?
A: Use K‑Means for multi-layer clustering and emergent groups; use Range when you need interpretable thresholds tied to a single key layer.

Q: How many zones should I use?
A: Commonly 5–6 zones and 5-6 samples is ideal for getting a broad average of soil properties or pollutant levels across an area of up to 500ha of moderately variable soil (or up to 1,000 acres). More zones increase detail but can reduce interpretability and sampling efficiency.