Ajuste a variável "Banda" para que ela 1) renomeie cada banda com a respectiva "fase" e…
- User
Ajuste a variável "Banda" para que ela 1) renomeie cada banda com a respectiva "fase" e 2) adicione as propriedades "fase" e "Index" como propriedades da nova imagem. Aqui está o script: var table3 = ee.FeatureCollection("projects/ee-cbcgeeanalises/assets/CAR_UCsFederais_032024"), table = ee.FeatureCollection("projects/ee-cbcgeeanalises/assets/INCRA_Areas_de_Quilombolas_corrigidas_202404"), table2 = ee.FeatureCollection("projects/ee-cbcgeeanalises/assets/INCRA_Assentamento_Brasil_corrigidos_202404"), table4 = ee.FeatureCollection("projects/ee-cbcgeeanalises/assets/INCRA_Assentamento_Federal_corrigido_202404"), table5 = ee.FeatureCollection("projects/ee-cbcgeeanalises/assets/INCRA_Assentamento_Reconhecimento_corrigido_202404"), table6 = ee.FeatureCollection("projects/ee-cbcgeeanalises/assets/INCRA_Imovel_certificado_SNCI_Publico_corrigido_202404"), table7 = ee.FeatureCollection("projects/ee-cbcgeeanalises/assets/INCRA_Sigef_Publico_corrigido_202404");
Map.addLayer(table, {}, 'brasil')
Map.addLayer(table3, {}, 'federais')
//print(table.aggregate_array('fase').distinct().sort(), 'fase quilombola')
//print(table2.aggregate_array('fase').distinct().sort(), 'fase assentamentos brasil')
//print(table4.aggregate_array('fase').distinct().sort(), 'fase assentamentos brasil')
//print(table5.aggregate_array('fase').distinct().sort(), 'fase assentamentos em reconhecimento')
var Assentamentos = ee.FeatureCollection(table2, table4, table5)//.flatten()
//print(Assentamentos, 'Assentamentos')
var listaFaseAssent = ee.List([4,5,6,7,10])
var listaFaseTQ = ee.List([ '', 'CCDRU', 'DECRETO', 'PORTARIA', 'RTID', //TITULADO, 'TITULO ANULADO', 'TITULO PARCIAL' ]) // Filtrar territórios var TQ_NaoTitulados = table.filter(ee.Filter.inList('fase', listaFaseTQ)); var TQ_Titulados = table.filter(ee.Filter.inList('fase', ee.List(['TITULADO'])));
var Assent_NaoTitulados = Assentamentos.filter(ee.Filter.inList('fase', listaFaseAssent)); var Assent_Titulados = Assentamentos.filter(ee.Filter.inList('fase', ee.List([3])));
print(Assentamentos.size(), 'Assentamentos quantidade')
print(TQ_NaoTitulados,'TQ_NaoTitulados') print(TQ_Titulados,'TQ_Titulados') print(Assent_NaoTitulados,'Assent_NaoTitulados') print(Assent_Titulados,'Assent_Titulados')
var TQ_NaoTitulados1 = ee.FeatureCollection(table);
var listaFases = TQ_NaoTitulados1.aggregate_array('fase').distinct().sort();
var sequencia = ee.List.sequence(1, listaFases.size());
var listaFasesComIndice = listaFases.zip(sequencia);
var criarImageCollection = function(parFaseIndice) { var fase = ee.List(parFaseIndice).get(0); var indice = ee.List(parFaseIndice).get(1);
var clip = TQ_NaoTitulados1.filter(ee.Filter.eq('fase', fase)); var imagem = ee.Image.constant(indice).toInt().clip(clip) .set({ 'Fase': fase, 'Index': indice }); return imagem; - Assistant