傻瓜做网站软件,公司网站开发费摊销,关键词优化公司前十排名,研磨 东莞网站建设物种分布模型 1. 数据点准备1.1 数据加载1.2 去除指定距离内的重复点1.3 定义研究区范围1.4 选择预测因子 1. 数据点准备
1.1 数据加载 首先需要将CSV文件导入到GEE平台中#xff0c;同样也可以导入shp格式文件。 // 1.Loading and cleaning your species data *************… 物种分布模型 1. 数据点准备1.1 数据加载1.2 去除指定距离内的重复点1.3 定义研究区范围1.4 选择预测因子 1. 数据点准备
1.1 数据加载 首先需要将CSV文件导入到GEE平台中同样也可以导入shp格式文件。 // 1.Loading and cleaning your species data *********************************************************************
var Data ee.FeatureCollection(projects/ee-**********736/assets/Tree_sample).aside(print) // 导入本地上传的站点信息.map(function(fea){return ee.Feature(ee.Geometry.Point([fea.get(Longitude),fea.get(Latitude)]))//设置经纬度.copyProperties(fea) // 拷贝原有属性信息}).aside(print)
1.2 去除指定距离内的重复点 物种分布建模的一个重要步骤是限制地理采样偏差对模型输出的潜在影响这种影响是由于多个附近观测结果导致的数据聚集。在选定的空间分辨率下将位置数据细化为每像素随机选择的一个事件记录。所以需要将相隔在一定距离之内的点删除如去掉在10km以内的重复点
// Define spatial resolution to work with (m)
var GrainSize 10000; // e.g. 10 kmMap.addLayer(Data.style({color:red,pointSize:4}),{},randomPoints)function RemoveDuplicates(data){// 生成一个随机栅格图像使用随机值填充然后重新投影到经纬度坐标系EPSG:4326var randomraster ee.Image.random().reproject(EPSG:4326, null, GrainSize);// 从随机栅格图像中获取样本点的值样本点来自于输入数据集data// scale为: 缩放因子控制样本点的间隔var randpointvals randomraster.sampleRegions({collection:ee.FeatureCollection(data), scale: 10, geometries: true});// 返回去重后的样本点通过 random 字段进行去重return randpointvals.distinct(random);
}var Data RemoveDuplicates(Data);
Map.addLayer(Data.style({color:blue,pointSize:4}),{},randomPoints)print(ee.FeatureCollection(projects/ee-**********736/assets/Tree_sample).size())
print(Data.size())
1.3 定义研究区范围 // 2.Define your area of interest for modeling *********************************************************************
// Load region boundary from data catalog if working at a larger scale
var AOI ee.FeatureCollection(USDOS/LSIB_SIMPLE/2017).filter(ee.Filter.eq(country_co, CH));
// Define the area of interest
// select a bounding box around your species location data
var AOI Data.geometry().bounds().buffer(50000);// Add AOI to the map
Map.addLayer(AOI, {color:yellow}, AOI);
Map.centerObject(AOI, 3);
1.4 选择预测因子
// 3.Selecting predictor variables *********************************************************************
// Example of code to import the SRTM Digital Elevation Data 30m
var Elev ee.Image(USGS/SRTMGL1_003);