ee.ImageCollection.cast
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wandelt einige oder alle Bänder jedes Bildes in einer ImageCollection in die angegebenen Typen um.
Nutzung | Ausgabe |
---|
ImageCollection.cast(bandTypes, bandOrder) | ImageCollection |
Argument | Typ | Details |
---|
So gehts: collection | ImageCollection | Die Bildersammlung, die gestreamt werden soll. |
bandTypes | Wörterbuch | Ein Dictionary mit Bandnamen und Bandtypen. Typen können PixelTypes oder Strings sein. Gültige Strings sind: „int8“, „int16“, „int32“, „int64“, „uint8“, „uint16“, „uint32“, „byte“, „short“, „int“, „long“, „float“ und „double“. Muss alle Bänder enthalten, die bereits in einem Bild in der Sammlung vorhanden sind. Wenn dies Bänder umfasst, die noch nicht in einem Eingabebild enthalten sind, werden sie dem Bild als transparente Bänder hinzugefügt. |
bandOrder | Liste | Eine Liste, die die Reihenfolge der Bänder im Ergebnis angibt. Muss mit den Schlüsseln von „bandTypes“ übereinstimmen. |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 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. |"]]