参考资料:
1.Extract point value from a raster file with Python, Geopandas and Rasterio - Tutorial:https://hatarilabs.com/ih-en/extract-point-value-from-a-raster-file-with-python-geopandas-and-rasterio-tutorial
2.python快速实现shp点提取栅格值:https://blog.csdn.net/qq_41106093/article/details/122525017讲解了两种方法,其中一种利用rasterstats,可以加快处理速度。
需要安装rasterstats包,rasterstats作用:给定一个矢量层和一个光栅带,计算每个矢量几何图形的汇总统计信息。(rasterstats官网资料:https://pythonhosted.org/rasterstats/)
安装语句:conda install -c conda-forge rasterstats