Nadir Elbouanani, Ahmed Laamrani, Jamal-Eddine Ouzemou, Adam Bouhnidira, Hamd Ait Abdelali, Mohamed Bourriz, François Bourzeix, Khalil Misbah, Ayoub Lazaar, Abdelghani Chehbouni
Soil Total Nitrogen (TN) is a critical nutrient for plant growth, and its monitoring in agricultural soils is essential for sustainable nutrient management. Conventional laboratory-based TN analyses are accurate but remain laborious, costly, and limited for spatially continuous large-scale applications. Spaceborne hyperspectral remote sensing provides a promising alternative for mapping soil TN at different scales. However, its use is limited by spectral gaps caused by strong atmospheric water-vapor absorption, particularly in nitrogen-sensitive near-infrared (NIR) and shortwave infrared (SWIR) regions. This study evaluates the contribution of reconstructing these missing spectral domains for improving soil TN estimation from PRISMA (PRecursore IperSpettrale della Missione Applicativa) hyperspectral imagery. A spectral gap-filling framework based on a conditional generative adversarial network (cGAN) coupled with a self-supervised masked autoencoder-inspiredstrategy, pretrained using hyperspectral data acquired over the Meknes region (Saïs Plateau) was developed to reconstruct continuous reflectance spectra, including the water-vapor absorption intervals (1320–1500 nm and 1780–2050 nm) and the NIR–SWIR overlap region (950–990 nm). The reconstruction model achieved high accuracy, with coefficients of determination of R² = 0.95 on PRISMA spectra and R² = 0.91 when validated against laboratory spectroradiometer (ASD FieldSpec III) measurements. The reconstructed spectra were subsequently used for soil TN estimation using open-access ISDA soil TN map product at 30 m resolution. A total of 1037 samples were analyzed over three bare-soil croplands agricultural regions (i.e., Al Haouz, Doukkala plain, and Khouribga) in Morocco. Our results show that incorporating reconstructed bands improves TN prediction performance. In Al Haouz, R² increased from 0.83 to 0.89, with RMSE decreasing from 0.14 to 0.11 g·kg⁻¹ (RPIQ: 3.1–3.65; RPD: 2.49–2.91). In Sidi Bennour–Doukkala, R² improved from 0.73 to 0.79 and RMSE from 0.11 to 0.08 g·kg⁻¹ (RPIQ: 2.52–2.87; RPD: 2.06–2.14) using LASSO regression. In Khouribga, the best performance was obtained with Random Forest (R² = 0.73; RMSE = 0.11 g·kg⁻¹; RPIQ = 2.52; RPD = 1.98). Performance metrics were evaluated against ISDA-derived soil TN reference data and therefore reflect agreement with map-based predictions rather than direct laboratory measurements. Feature-selection analyses further revealed that the most informative wavelengths for TN estimation are predominantly concentrated in the NIR–SWIR regions of 1050–1450 nm, 1800–2100 nm, and 2300–2400 nm, including several reconstructed bands within water-vapor absorption intervals. These findings demonstrate that spectral gap filling enhances the coherence and usability of spaceborne hyperspectral data for soil TN monitoring, supporting more robust digital soil mapping and precision agriculture applications.