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.
ee.data.updateAsset
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Aggiorna una risorsa.
L'utente autenticato deve essere un autore o un proprietario dell'asset.
Utilizzo | Resi |
---|
ee.data.updateAsset(assetId, asset, updateFields, callback) | Oggetto |
Argomento | Tipo | Dettagli |
---|
assetId | Stringa | L'ID dell'asset da aggiornare. |
asset | api.EarthEngineAsset | La versione aggiornata dell'asset, contenente solo i nuovi valori dei campi da aggiornare. È possibile aggiornare solo i campi
"start_time", "end_time" e "properties". Se un valore è denominato in "updateMask", ma non è impostato in "asset", verrà eliminato dall'asset. |
updateFields | List<String> | Un elenco dei nomi dei campi da aggiornare. Può contenere:
"start_time" o "end_time" per aggiornare il timestamp corrispondente,
"properties.PROPERTY_NAME" per aggiornare una determinata proprietà oppure
"properties" per aggiornare tutte le proprietà. Se l'elenco è vuoto, verranno aggiornate tutte le proprietà e tutti i timestamp. |
callback | Funzione, facoltativa | Un callback facoltativo. Se non viene fornito, la chiamata viene effettuata in modo sincrono. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 2025-07-25 UTC."],[[["\u003cp\u003eUpdates specified fields or all properties and timestamps of an Earth Engine asset.\u003c/p\u003e\n"],["\u003cp\u003eRequires writer or owner authentication for the asset being updated.\u003c/p\u003e\n"],["\u003cp\u003eAllows updating start/end times and properties, with the option to delete values by specifying them in \u003ccode\u003eupdateFields\u003c/code\u003e but omitting them in \u003ccode\u003easset\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003eee.data.updateAsset\u003c/code\u003e function with asset ID, updated asset details, and optional fields to update and callback.\u003c/p\u003e\n"]]],["This function updates an existing asset, requiring the user to be a writer or owner. It accepts the `assetId`, an `asset` object containing new field values, and a list of `updateFields`. Updatable fields include \"start_time\", \"end_time\", and \"properties\". Specifying a field in `updateFields` but not in `asset` deletes it. An empty `updateFields` list updates all properties and timestamps. The function returns an object, with an optional callback for asynchronous operation.\n"],null,["# ee.data.updateAsset\n\n\u003cbr /\u003e\n\nUpdates an asset.\n\n\u003cbr /\u003e\n\nThe authenticated user must be a writer or owner of the asset.\n\n| Usage | Returns |\n|-------------------------------------------------------------------|---------|\n| `ee.data.updateAsset(assetId, asset, updateFields, `*callback*`)` | Object |\n\n| Argument | Type | Details |\n|----------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `assetId` | String | The ID of the asset to update. |\n| `asset` | api.EarthEngineAsset | The updated version of the asset, containing only the new values of the fields to be updated. Only the \"start_time\", \"end_time\", and \"properties\" fields can be updated. If a value is named in \"updateMask\", but is unset in \"asset\", then that value will be deleted from the asset. |\n| `updateFields` | List\\\u003cString\\\u003e | A list of the field names to update. This may contain: \"start_time\" or \"end_time\" to update the corresponding timestamp, \"properties.PROPERTY_NAME\" to update a given property, or \"properties\" to update all properties. If the list is empty, all properties and both timestamps will be updated. |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |"]]