Annuncio: tutti i progetti non commerciali registrati per l'utilizzo di Earth Engine prima del 15 aprile 2025 devono verificare l'idoneità non commerciale per mantenere l'accesso a Earth Engine.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Esegue il cast di alcune o tutte le bande di un'immagine ai tipi specificati.
Utilizzo
Resi
Image.cast(bandTypes, bandOrder)
Immagine
Argomento
Tipo
Dettagli
questo: image
Immagine
L'immagine da trasmettere.
bandTypes
Dizionario
Un dizionario dal nome della band ai tipi di band. I tipi possono essere PixelTypes o stringhe. Le stringhe valide sono: "int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "byte", "short", "int", "long", "float" e "double". Se bandTypes include bande non presenti nell'immagine di input, queste verranno aggiunte all'immagine come bande trasparenti. Se non viene specificato anche bandOrder, le nuove bande verranno aggiunte in ordine alfabetico.
bandOrder
Elenco, valore predefinito: null
Un elenco che specifica l'ordine delle bande nel risultato. Se specificato, deve corrispondere all'elenco completo delle band nel risultato.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-26 UTC."],[[["Casts image bands to specified data types like 'int8', 'float', etc., allowing for data type conversions within an image."],["Accepts a dictionary mapping band names to desired types, enabling selective casting for individual bands."],["Can introduce new bands with specified types, appending them to the image with optional ordering using the `bandOrder` parameter."],["Returns a new Image with the converted bands, preserving the original image unchanged."]]],["The `Image.cast` function modifies an image by changing the data type of its bands. It takes a dictionary, `bandTypes`, mapping band names to new data types (PixelTypes or strings like 'int8', 'float'). If a specified band is not present in the original image, a transparent band of that type is added. An optional `bandOrder` list defines the sequence of the resulting bands. The function returns the modified `Image`.\n"]]