Google Earth Engine(GEE)——chart超限问题: Response size exceeds limit of 268435456 bytes.

上次我们我计算了山西省的生物量,但是又有新的问题出现了,问题在于有很多feature上组成的featurecollection,大概又8000多个,这就导致无法进行下一步的计算,直接超限额了。

方法1:

当我们面对这个问题,有两个解决方案,一个是在Arcgis中进行融合这些面,融合成为一个面,这样就成为一个融合众多不同面的巨大的featurecollection

方法2: 我们在GEE中适用一个函数即可:

union(maxError)

Merges all geometries in a given collection into one and returns a collection containing a single feature with only an ID of 'union_result' and a geometry.

将给定集合中的所有几何体合并成一个集合,并返回一个只包含一个ID为'union_result'的单一特征和一个几何体的集合。 

Arguments:

this:collection (FeatureCollection):

The collection being merged.被合并的集合。

maxError (ErrorMargin, default: null):

扫描二维码关注公众号,回复: 13737546 查看本文章

The maximum error allowed when performing any necessary reprojections. If not specified, defaults to the error margin requested from the output.

Returns: FeatureCollection

代码:

//这是原始的众多矢量图
 var shanxi = ee.FeatureCollection('projects/ee-shiyan/assets/WXrh').geometry();
 print("shanxi",shanxi)
//这是合并后的矢量集合
 var shanxi1 = ee.FeatureCollection('projects/ee-shiyan/assets/WXrh').union();
 print("shanxi1",shanxi1)

 第一个的矢量结果:

 第二个是合成后的集合

 当然还是矢量太多了,这样远远超过了GEE的运算,虽然可以计算,但是计算series的时序分析计算依旧超时了,所以建议不要使用超过5000个小的矢量来进行在线运算。

猜你喜欢

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