ee.ImageCollection.cast
Casts some or all bands of each image in an ImageCollection to the specified types.
Usage | Returns |
---|
ImageCollection.cast(bandTypes, bandOrder) | ImageCollection |
Argument | Type | Details |
---|
this: collection | ImageCollection | The image collection to cast. |
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. |
bandOrder | List | A list specifying the order of the bands in the result. Must match the keys of bandTypes. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-13 UTC.
[null,null,["Last updated 2024-07-13 UTC."],[[["Casts image bands within an ImageCollection to specified data types like 'int8', 'float', etc., ensuring uniformity across images."],["Requires a dictionary mapping band names to desired types and a list defining the output band order."],["The process adds any new bands specified in the dictionary as transparent bands to images lacking them."],["Input band types and order must encompass all existing bands within the ImageCollection to avoid errors."]]],[]]