Anúncio: todos os projetos não comerciais registrados para usar o Earth Engine antes de
15 de abril de 2025 precisam
verificar a qualificação não comercial para manter o acesso ao Earth Engine.
ee.ImageCollection.cast
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Transmite algumas ou todas as bandas de cada imagem em uma ImageCollection para os tipos especificados.
Uso | Retorna |
---|
ImageCollection.cast(bandTypes, bandOrder) | ImageCollection |
Argumento | Tipo | Detalhes |
---|
isso: collection | ImageCollection | A coleção de imagens a ser transmitida. |
bandTypes | Dicionário | Um dicionário do nome da banda para os tipos de banda. Os tipos podem ser PixelTypes ou strings. As strings válidas são: "int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "byte", "short", "int", "long", "float" e "double". Precisa incluir todas as bandas já presentes em qualquer imagem da coleção. Se isso incluir bandas que ainda não estão em uma imagem de entrada, elas serão adicionadas à imagem como bandas transparentes. |
bandOrder | Lista | Uma lista que especifica a ordem das bandas no resultado. Precisa corresponder às chaves de "bandTypes". |
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
[null,null,["Última atualização 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. |"]]