Earth Engine sẽ giới thiệu
các bậc hạn mức phi thương mại để bảo vệ các tài nguyên điện toán dùng chung và đảm bảo hiệu suất đáng tin cậy cho mọi người. Tất cả các dự án phi thương mại đều cần chọn một cấp hạn mức muộn nhất vào
ngày 27 tháng 4 năm 2026 , nếu không sẽ sử dụng Cấp cộng đồng theo mặc định. Hạn mức theo cấp sẽ có hiệu lực đối với tất cả các dự án (bất kể ngày chọn cấp) từ
ngày 27 tháng 4 năm 2026 .
Tìm hiểu thêm.
Gửi ý kiến phản hồi
ee.FeatureCollection.copyProperties
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.
Sao chép các thuộc tính siêu dữ liệu từ một phần tử sang một phần tử khác.
Cách sử dụng Giá trị trả về FeatureCollection. copyProperties (source , properties , exclude )Phần tử
Đối số Loại Thông tin chi tiết this: destination Phần tử, mặc định: rỗng Đối tượng có các thuộc tính cần ghi đè. sourcePhần tử, mặc định: rỗng Đối tượng mà bạn muốn sao chép các thuộc tính. propertiesDanh sách, mặc định: null Các thuộc tính cần sao chép. Nếu bạn bỏ qua, tất cả các thuộc tính thông thường (tức là không phải thuộc tính hệ thống) sẽ được sao chép. excludeDanh sách, mặc định: null Danh sách các tài sản cần loại trừ khi sao chép tất cả tài sản. Không được chỉ định nếu thuộc tính là.
Ví dụ
Trình soạn thảo mã (JavaScript)
// Import a Landsat 8 surface reflectance image to sample.
var image = ee . Image ( 'LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722' )
// Select the optical bands.
. select ([ 'SR_B.' ]);
// Get the image geometry to define the geographical bounds of the sample.
var imageBounds = image . geometry ();
// Sample the image at a set of random points; a feature collection is returned.
var pointSampleFc = image . sample (
{ region : imageBounds , scale : 30 , numPixels : 5 , geometries : true });
// Copy image properties to the FeatureCollection; three options follow.
print ( 'All non-system image properties copied to the FeatureCollection' ,
pointSampleFc . copyProperties ( image ));
print ( 'Selected image properties copied to the FeatureCollection' ,
pointSampleFc . copyProperties ({
source : image ,
properties : [ 'system:time_start' , 'SPACECRAFT_ID' ]
}));
print ( 'All but selected image properties copied to the FeatureCollection' ,
pointSampleFc . copyProperties ({
source : image ,
exclude : [ 'TIRS_SSM_MODEL' , 'TIRS_SSM_POSITION_STATUS' ]
}));
Thiết lập Python
Hãy xem trang
Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.
import ee
import geemap.core as geemap
Colab (Python)
# Import a Landsat 8 surface reflectance image to sample.
image = ee . Image ( 'LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722' ) . select (
# Select the optical bands.
[ 'SR_B.' ])
# Get the image geometry to define the geographical bounds of the sample.
image_bounds = image . geometry ()
# Sample the image at a set of random points; a feature collection is returned.
point_sample_fc = image . sample (
** { 'region' : image_bounds , 'scale' : 30 , 'numPixels' : 5 , 'geometries' : True })
# Copy image properties to the FeatureCollection; three options follow.
display ( 'All non-system image properties copied to the FeatureCollection:' ,
point_sample_fc . copyProperties ( image ))
display ( 'Selected image properties copied to the FeatureCollection:' ,
point_sample_fc . copyProperties ( ** {
'source' : image ,
'properties' : [ 'system:time_start' , 'SPACECRAFT_ID' ]
}))
display ( 'All but selected image properties copied to the FeatureCollection:' ,
point_sample_fc . copyProperties ( ** {
'source' : image ,
'exclude' : [ 'TIRS_SSM_MODEL' , 'TIRS_SSM_POSITION_STATUS' ]
}))
Gửi ý kiến phản hồi
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-10-30 UTC.
Bạn muốn chia sẻ thêm với chúng tôi?
[[["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-10-30 UTC."],[],[]]