ee.Filter.withinDistance
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo một bộ lọc đơn nguyên hoặc nhị phân sẽ truyền nếu hình học bên trái nằm trong khoảng cách đã chỉ định của hình học bên phải. Nếu được dùng làm điều kiện kết hợp, khoảng cách này sẽ được dùng làm chỉ số kết hợp.
Cách sử dụng | Giá trị trả về |
---|
ee.Filter.withinDistance(distance, leftField, rightValue, rightField, leftValue, maxError) | Lọc |
Đối số | Loại | Thông tin chi tiết |
---|
distance | Số thực dấu phẩy động | Khoảng cách tối đa mà bộ lọc sẽ trả về giá trị true. |
leftField | Chuỗi, mặc định: null | Bộ chọn cho toán hạng bên trái. Không được chỉ định nếu bạn chỉ định leftValue. |
rightValue | Đối tượng, mặc định: null | Giá trị của toán hạng bên phải. Không nên chỉ định nếu bạn chỉ định rightField. |
rightField | Chuỗi, mặc định: null | Bộ chọn cho toán hạng bên phải. Không được chỉ định nếu bạn chỉ định rightValue. |
leftValue | Đối tượng, mặc định: null | Giá trị của toán hạng bên trái. Không được chỉ định nếu bạn chỉ định leftField. |
maxError | ErrorMargin (không bắt buộc) | Lỗi chiếu lại tối đa được phép trong quá trình áp dụng bộ lọc. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eDetermines if one geometry lies within a specified distance of another, useful for filtering and spatial joins.\u003c/p\u003e\n"],["\u003cp\u003eOperates on two geometries, allowing specification by field or direct value for both.\u003c/p\u003e\n"],["\u003cp\u003eDistance is a crucial parameter defining the maximum allowable separation for the filter to pass.\u003c/p\u003e\n"],["\u003cp\u003eOffers flexibility with optional error margin control during reprojection.\u003c/p\u003e\n"]]],["This functionality generates a filter based on the proximity of two geometries. It verifies if a left geometry falls within a designated `distance` of a right geometry. The `distance` parameter dictates the threshold for a true result. It accepts parameters such as `leftField`, `rightValue`, `rightField`, `leftValue`, and `maxError`. The filter's operation can be defined via fields or direct values for each geometry. When used in a join, it measures join proximity by the specified `distance`.\n"],null,["# ee.Filter.withinDistance\n\nCreates 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.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------------------------------------------------------------------------|---------|\n| `ee.Filter.withinDistance(distance, `*leftField* `, `*rightValue* `, `*rightField* `, `*leftValue* `, `*maxError*`)` | Filter |\n\n| Argument | Type | Details |\n|--------------|-----------------------|---------------------------------------------------------------------------------------|\n| `distance` | Float | The maximum distance for which the filter will return true. |\n| `leftField` | String, default: null | A selector for the left operand. Should not be specified if leftValue is specified. |\n| `rightValue` | Object, default: null | The value of the right operand. Should not be specified if rightField is specified. |\n| `rightField` | String, default: null | A selector for the right operand. Should not be specified if rightValue is specified. |\n| `leftValue` | Object, default: null | The value of the left operand. Should not be specified if leftField is specified. |\n| `maxError` | ErrorMargin, optional | The maximum reprojection error allowed during filter application. |"]]