使用 MultiPolygon 输入几何时覆盖网格的奇怪行为。似乎输出 FeatureCollection 没有返回所有矩形,而只返回 1 个。奇怪的是,函数 Map.addLayer 正确显示了所有矩形,但是我不能使用返回的网格化 FC,因为它只包含 1 个矩形。
代码:
- var table = ee.FeatureCollection("FAO/GAUL/2015/level1"),
- geometry = /* color: #ffc82d */ee.Geometry.Point([-121.97964122160268, 39.44108808325399]),
- geometry2 = /* color: #00ffff */ee.Geometry.Point([-116.65127208097768, 39.65287749046759]),
- geometry3 = /* color: #bf04c2 */ee.Geometry.Point([-120.76566668683697, 47.66834147869218]);
-
- var ca = table.filterBounds(geometry)
- Map.addLayer(ca)
- var geom = ca.first().geometry()
- print(geom, 'geometry')
- var proj = geom.projection()
- print(proj, 'proj')
- var covGrid = geom.coveringGrid(proj, 4000)
- print(covGrid, 'Covering Grid')
- Map.addLayer(covGrid)
-
-
- var nv = table.filterBounds(geometry2)
- Map.addLayer(nv)
- var geom = nv.first().ge