Ajuste a função "exportarFeatureCollection " no script do google earth engine de modo…
- User
Ajuste a função "exportarFeatureCollection " no script do google earth engine de modo que a string contida na propriedade 'NomeAbrev' seja incorporada ao nome do arquivo que será exportado. Não use .getInfo() dentro de uma função. Aqui está o trecho do script e como aparece o resultado: // Função para exportar cada FeatureCollection var exportarFeatureCollection = function(nomeUC, featureCollection) { //var nomeArquivo = 'APA_DO_RIO_PRETO_' + nomeUC; var nomeArquivo = ee.String(UCs_MMA.aggregate_array('NomeAbrev')).cat(nomeUC); /*
// Exportar shape Export.table.toDrive({ collection: featureCollection, description: nomeArquivo, folder: 'Planet_Poligonos_Veredas', fileFormat: 'SHP' });// */Export.table.toAsset({ collection: featureCollection, description: nomeArquivo, assetId: nomeArquivo});
/*
// Exportar CSV Export.table.toDrive({ collection: featureCollection.select(lista3), description: nomeTabela, folder: 'Tabela_Classes_Restauracao', fileFormat: 'CSV' }); */ }; O resultado da exportação aparece assim : ee.List({ "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "collection": { "type": "Invocation", "arguments": { "tableId": "projects/ee-cbcgeeanalises/assets/UC_Todas_MMA_cnuc_2024_04" }, "functionName": "Collection.loadTable" }, "filter": { "type": "Invocation", "arguments": { "leftField": ".all", "rightValue": { "type": "Invocation", "arguments": { "geometry": { "type": "Polygon", "coordinates": [ [ [ -45.59555792117524, -8.552142038898108 ], [ -45.59555792117524, -9.092243327049003 ], [ -44.87046026492524, -9.092243327049003 ], [ -44.87046026492524, -8.552142038898108 ] ] ], "geodesic": false, "evenOdd": true } }, "functionName": "Feature" } }, "functionName": "Filter.intersects" } }, "functionName": "Collection.filter" }, "property": "NomeAbrev" }, "functionName": "AggregateFeatureCollection.array" })749288 - Assistant
- User
ajuste a função utilizando "iterate" para evitar utilizar "getInfo()"
- Assistant
- User
Ajuste o script. Não utilize ".getInfo()". Utilize "evaluate" e ".forEach"
- Assistant
- User
utilize ".cat()" ao invés de comandos nativos do javascript como + ou =
- Assistant