This repository contains the code of the sampling method proposed in the paper:
Zhang, L., Zhu, A.-X., Liu, J., Ma, T., Yang, L., Zhou, C., 2022. An adaptive uncertainty-guided sampling method for geospatial prediction and its application in digital soil mapping. International Journal of Geographical Information Science
DOI: https://doi.org/10.1080/13658816.2022.2125973
- Python3 (>=3.7)
- Numpy
- GDAL
- data (directory): The environmental covariate data folder.
- config.py: The configuration file for setting the log file path.
- pygp.py: For generating the evironmental layers.
- geoprocessing.py: The class for calculating the environmental similarity and prediction uncertainty.
- uncertainty_sampling.py: The core function for generating the uncertainty-guided sampling method.
- utils.py: It contains functions for the data loading and storing the result.
- run.py: The file that the program start to run.
All data (environmental covariate maps) need to be placed in the folder namely "data" under the root directory. You can add your data or use the raster example data that we provided.
The results of the sampling would be stored in the folder namely "results" under the root directory. This folder can be automatically created when starting the program.
The directories of data and results can also be customized in config.py file.
The parameters of the sampling method can be set when using the function of sampling in uncertainty_sampling.py file. The detailed explanation of parameters can be found in the description of this function.
python run.py
The sample locations and the process information would be saved in the result files.
For questions and supports please contact the author: Lei Zhang 张磊 (lei.zhang.geo@outlook.com)
Lei Zhang's Homepage