PySNM: an open-source python package for automated Spatial interpolation and soil nutrient mapping for sustainable agriculture— a case study

The growing global population and increasing food demand require monitoring soil health and ensuring sustainable agriculture. Generating soil nutrient maps with traditional GIS methods is often a lengthy process, causing delays in decisions. This study introduces PySNM, a new, Python-based, free, and open-source tool designed to fully automate spatial interpolation (IDW) and generate soil nutrient maps. PySNM, a Python-based tool for Soil Nutrient Mapping was evaluated through a case study in which 430 soil samples, including available potassium (Kᵃᵐᵖ), phosphorus (Pᵃᵐᵖ), nitrogen (Nᵃᵐᵖ), pHᵃᵐᵖ, soil organic carbon (OCᵃᵐᵖ), electrical conductivity (ECᵃᵐᵖ), iron (Feᵃᵐᵖ), zinc (Znᵃᵐᵖ), copper (Cuᵃᵐᵖ), boron (Bᵃᵐᵖ), manganese (Mnᵃᵐᵖ), and sulfur (Sᵃᵐᵖ), were collected from agricultural fields in Amarapura Village, India. PySNM completed the automated spatial interpolation and map generation of the study area data in just 22 s on a computer with an i9 processor and 32GB of RAM. PySNM was tested on different system configurations to identify the optimal setup. The tool also outperformed the automation features of Model Builder and ArcPy in ArcMap. Spatial variability analysis identified severe deficiencies in several nutrients: Bᵃᵐᵖ (100%), Mnᵃᵐᵖ (99.88%), Feᵃᵐᵖ (99.66%), Sᵃᵐᵖ (98.53%), Nᵃᵐᵖ (96.37%), OCᵃᵐᵖ (97.46%), and Znᵃᵐᵖ (91.7%). These results indicate that urgent action is required to maintain soil health. PySNM is cost-effective, cross-platform compatible, optimizes resources, and does not require specialized skills. It may be an alternative to traditional GIS software, especially suitable for least-developed and developing countries.

Authors

Institutions

Publication Details

Journal
Discover Soil.
Published
2025-11-07
DOI
https://doi.org/10.1007/s44378-025-00132-6
Primary Topic
Soil Geostatistics and Mapping
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

PySNM: an open-source python package for automated Spatial interpolation and soil nutrient mapping for sustainable agriculture— a case study

Ranga Rao Velamala, Pawan Kumar Pant
Discover Soil.
Soil Geostatistics and Mapping
article

PySNM: an open-source python package for automated Spatial interpolation and soil nutrient mapping for sustainable agriculture— a case study

Ranga Rao Velamala, Pawan Kumar Pant
article en

Abstract

The growing global population and increasing food demand require monitoring soil health and ensuring sustainable agriculture. Generating soil nutrient maps with traditional GIS methods is often a lengthy process, causing delays in decisions. This study introduces PySNM, a new, Python-based, free, and open-source tool designed to fully automate spatial interpolation (IDW) and generate soil nutrient maps. PySNM, a Python-based tool for Soil Nutrient Mapping was evaluated through a case study in which 430 soil samples, including available potassium (Kᵃᵐᵖ), phosphorus (Pᵃᵐᵖ), nitrogen (Nᵃᵐᵖ), pHᵃᵐᵖ, soil organic carbon (OCᵃᵐᵖ), electrical conductivity (ECᵃᵐᵖ), iron (Feᵃᵐᵖ), zinc (Znᵃᵐᵖ), copper (Cuᵃᵐᵖ), boron (Bᵃᵐᵖ), manganese (Mnᵃᵐᵖ), and sulfur (Sᵃᵐᵖ), were collected from agricultural fields in Amarapura Village, India. PySNM completed the automated spatial interpolation and map generation of the study area data in just 22 s on a computer with an i9 processor and 32GB of RAM. PySNM was tested on different system configurations to identify the optimal setup. The tool also outperformed the automation features of Model Builder and ArcPy in ArcMap. Spatial variability analysis identified severe deficiencies in several nutrients: Bᵃᵐᵖ (100%), Mnᵃᵐᵖ (99.88%), Feᵃᵐᵖ (99.66%), Sᵃᵐᵖ (98.53%), Nᵃᵐᵖ (96.37%), OCᵃᵐᵖ (97.46%), and Znᵃᵐᵖ (91.7%). These results indicate that urgent action is required to maintain soil health. PySNM is cost-effective, cross-platform compatible, optimizes resources, and does not require specialized skills. It may be an alternative to traditional GIS software, especially suitable for least-developed and developing countries.

Discover Soil.Vol. 2(1)
Ministry of Agriculture & Farmers Welfare (IN), ICAR-National Bureau of Soil Survey and Land Use Planning (IN)
Openalex Percentile: Top 69%
Soil Geostatistics and Mapping
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.