如果是 R 的话我会1.下载海岸线的 shp 文件2.用 sf::st_distance 来批量计算坐标到海岸线的最短距离
代码写的不好看,轻喷https://www.liujason.com/article/1128.html