Thông báo: Tất cả dự án phi thương mại đã đăng ký sử dụng Earth Engine trước ngày 15 tháng 4 năm 2025 phải xác minh điều kiện sử dụng phi thương mại để duy trì quyền truy cập vào Earth Engine.
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.
Trả về kết quả của phép trừ hình học "bên phải" cho hình học "bên trái".
Cách sử dụng
Giá trị trả về
Geometry.difference(right, maxError, proj)
Hình học
Đối số
Loại
Thông tin chi tiết
this: left
Hình học
Hình học được dùng làm toán hạng bên trái của phép toán.
right
Hình học
Hình học được dùng làm toán hạng bên phải của thao tác.
maxError
ErrorMargin, mặc định: null
Lượng lỗi tối đa được chấp nhận khi thực hiện bất kỳ phép chiếu lại cần thiết nào.
proj
Phép chiếu, mặc định: null
Phép chiếu để thực hiện thao tác. Nếu không được chỉ định, thao tác sẽ được thực hiện trong hệ toạ độ cầu và khoảng cách tuyến tính sẽ tính bằng mét trên quả cầu.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["`difference()` returns a Geometry representing the portion of the first geometry that does not intersect with the second geometry."],["It accepts a 'right' Geometry to subtract and optional `maxError` and `proj` parameters for reprojection control."],["The operation is performed in spherical coordinates with distances in meters on the sphere unless a projection is specified."],["This method is useful for creating new geometries by removing overlapping areas between existing ones."]]],["The `Geometry.difference()` method subtracts a 'right' geometry from a 'left' geometry, returning the result as a new geometry. It accepts the `right` geometry, an optional `maxError` for reprojection tolerance, and an optional `proj` for the operation's projection. If `proj` is not defined the method will use the spherical coordinate system. Example code shows the difference operation using defined geometries and displays the result.\n"]]