Google Earth Engine(GEE)——使用随机森林方法进行土地分类(农作物)

在我们进行样本点分类首先就是选择样本点,和影像,然后进行随机样本点分类,这里除了随机样本点分类之外,其技术难点就是如何对原有样本点的添加以及一些分类参数的设定。这里我们首先建立一个影像,然后分别给与影像赋予不同值,最终返回就是一个单波段影像,但是这个分类影像中就包含了很多影像原始值信息,而随后利用直接样本点获取,就可以根据class分类的影像进行分层设定样本点,很是方便。先看以下函数。这里最主要的就是选取研究区的随机样本点,这里可以设定样本点数量,参与分类的样本点波段,分类属性值和分类点等等。

stratifiedSample(numPoints, classBandregionscaleprojectionseedclassValuesclassPointsdropNullstileScalegeometries)

Extracts a stratified random sample of points from an image. Extracts the specified number of samples for each distinct value discovered within the 'classBand'. Returns a FeatureCollection of 1 Feature per extracted point, with each feature having 1 property per band in the input image. If there are less than the specified number of samples available for

猜你喜欢

转载自blog.csdn.net/qq_31988139/article/details/130354467