集合可以通过空间位置以及属性值进行连接。要基于空间位置进行连接,请使用指定withinDistance()
了.geo
连接字段的过滤器。该.geo
字段指示项目的几何图形将用于计算距离度量。例如,考虑查找美国优胜美地国家公园 100 公里范围内的所有 发电厂的任务 。为此,在几何字段上使用过滤器,使用distance
参数将最大距离设置为 100 公里:
先看函数:
ee.Filter.withinDistance(distance, leftField, rightValue, rightField, leftValue, maxError)
创建一个一元或二元过滤器,如果左侧几何图形在右侧几何图形的指定距离内,则该过滤器通过。如果用作连接条件,则此距离用作连接度量。
Creates a unary or binary filter that passes if the left geometry is within a specified distance of the right geometry. If used as a join condition, this distance is used as a join measure.
Arguments:
距离(浮动):
过滤器将返回 tr