ee.ImageCollection.cast
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.
Truyền một số hoặc tất cả các dải tần của mỗi hình ảnh trong ImageCollection thành các loại được chỉ định.
Cách sử dụng | Giá trị trả về |
---|
ImageCollection.cast(bandTypes, bandOrder) | ImageCollection |
Đối số | Loại | Thông tin chi tiết |
---|
this: collection | ImageCollection | Bộ sưu tập hình ảnh để truyền. |
bandTypes | Từ điển | Từ điển từ tên ban nhạc đến các loại ban nhạc. Các loại có thể là PixelTypes hoặc chuỗi. Các chuỗi hợp lệ là: "int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "byte", "short", "int", "long", "float" và "double". Phải bao gồm tất cả các dải tần đã có trong bất kỳ hình ảnh nào trong bộ sưu tập. Nếu có những dải tần chưa có trong hình ảnh đầu vào, thì những dải tần đó sẽ được thêm vào hình ảnh dưới dạng dải tần trong suốt. |
bandOrder | Danh sách | Danh sách chỉ định thứ tự của các dải trong kết quả. Phải khớp với các khoá của bandTypes. |
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\u003eCasts image bands within an ImageCollection to specified data types like 'int8', 'float', etc., ensuring uniformity across images.\u003c/p\u003e\n"],["\u003cp\u003eRequires a dictionary mapping band names to desired types and a list defining the output band order.\u003c/p\u003e\n"],["\u003cp\u003eThe process adds any new bands specified in the dictionary as transparent bands to images lacking them.\u003c/p\u003e\n"],["\u003cp\u003eInput band types and order must encompass all existing bands within the ImageCollection to avoid errors.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.cast\n\nCasts some or all bands of each image in an ImageCollection to the specified types.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------|-----------------|\n| ImageCollection.cast`(bandTypes, bandOrder)` | ImageCollection |\n\n| Argument | Type | Details |\n|--------------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | ImageCollection | The image collection to cast. |\n| `bandTypes` | Dictionary | A dictionary from band name to band types. Types can be PixelTypes or strings. The valid strings are: 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'byte', 'short', 'int', 'long', 'float', and 'double'. Must include all bands already in any image in the collection. If this includes bands that are not already in an input image, they will be added to the image as transparent bands. |\n| `bandOrder` | List | A list specifying the order of the bands in the result. Must match the keys of bandTypes. |"]]