GEE问题:筛选指定区域的Sentinel-1影像缺乏VH等波段

目录

问题简介

原始代码

原始代码

问题解析

修改后的代码


问题简介

亲爱的同事们,我正在尝试使用 SAR 图像 - Sentinel-1 来改进使用机器学习的地上生物量建模。我想处理 Sentinel 图像并将它们作为波段插入以增强模型。通过阅读文档,可用的极化(已在 GRD 中处理)是 HH、HV、VV 和 VH。但是,出现一条消息,指出只有 VV 波段可用。有人知道其他极化是否不可用吗?

原始代码

https://code.earthengine.google.com/00d394a0be6a840eb4a260a78cabca7e

原始代码

var table = ee.FeatureCollection("projects/ee-selper/assets/aoi_sample");
// Define period of analysis
var start = '2021-01-01';
var end = '2021-12-31';
var season = ee.Filter.date(start,end);
print(season);


// Import Sentinel-1 collection
var sentinel1 =  ee.ImageCollection('COPERNICUS/S1_GRD');
// Filter Sentinel-1 collection for study area, date ranges and polarization components
var sCollection =  sentinel1
                    //filter by aoi and time
                    .filterBounds(table)
                    .filter(season)
                    // Filter to get images with VV and VH dual polarization
                    .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
                    .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH'))
                    // Filter to get images collected in interferometric wide swath mode.
                    .filter(ee.Filter.eq('instrumentMode', 'IW'));

var desc = sCollection.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));
var asc = sCollection.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'));

// Contar o número de imagens em cada coleção
print('Número de Imagens Ascendente (VH)', asc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')).size());
print('Número de Imagens Ascendente (VV)', asc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')).size());
print('Número de Imagens Descendente (VH)', desc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')).size());
print('Número de Imagens Descendente (VH)', desc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')).size());
// Criar um compósito a partir da média das polarizações e modos de órbita
var vh_asc = asc.select('VH').mean().rename('VH_asc');
var vv_asc = asc.select('VV').mean().rename('VV_asc');
var vh_desc = desc.select('VH').mean().rename('VH_desc');
var vv_desc = desc.select('VV').mean().rename('VV_desc');


// Combinar as bandas em uma única imagem
var composite = ee.Image.cat([vh_desc]).focal_median();

// Definir parâmetros de visualização para compósito (usar valores individuais para min e max)
var visParams = {
  bands: ['VH_desc'],  // bandas para os canais R, G, B
  min: -25,  // valor mínimo para todas as bandas
  max: 0     // valor máximo para todas as bandas
};

// Exibir no mapa
Map.centerObject(table, 10);  // Centralizar o mapa na área de interesse
Map.addLayer(composite.clip(table), visParams, 'composite');

// Exportar a imagem para o asset
Export.image.toAsset({
  image: composite.clip(table), // Recortar para a área de interesse
  description: 'Sentinel1', // Nome da tarefa de exportação
  assetId: 'projects/ee-selper/assets/Sentinel1', // Substitua pelo caminho correto do seu asset
  scale: 30, // Resolução da imagem em metros
  region: table, // Área de interesse para recorte
  maxPixels: 1e13 // Número máximo de pixels permitidos (ajuste conforme necessário)
});

问题解析

Sentinel-1卫星是由欧洲空间局(ESA)运行的合成孔径雷达(SAR)卫星系统。它们以天基的方式提供大量的雷达图像数据,用于监测地球表面的变化和活动。

在Sentinel-1数据中,区域只有Descending(下行)或只有Ascending(上行)数据是由于卫星系统的运行模式和地球自转的原因。

在多数情况下,Sentinel-1卫星会同时收集Descending和Ascending数据覆盖一个区域。这样做可以提供更全面的地面覆盖,减少数据缺失和提高数据质量。同时,Descending和Ascending数据还可以用于获取更准确的地表变化信息,例如地表沉降等。

然而,由于技术和资源限制,有些区域可能只有一种数据可用。这可能是因为在某些时间区域内,只有Descending或只有Ascending数据收集,这取决于卫星任务安排和优先级。此外,在一些地区,由于地形、地貌等因素,只有一种数据方向可以有效地传输信号,而另一种方向可能遇到干扰或信号损失。

总结起来,Sentinel-1数据只有Descending或只有Ascending覆盖某个区域是由于卫星运行模式、地球自转和地理因素等多种原因造成的。这些数据的不同方向可以提供更全面和准确的地表观测,并支持各种应用,如环境监测、农业、城市规划等。

修改后的代码

var table = ee.FeatureCollection("projects/ee-selper/assets/aoi_sample");
// Define period of analysis
var start = '2021-01-01';
var end = '2021-12-31';
var season = ee.Filter.date(start,end);
print(season);


// Import Sentinel-1 collection
var sentinel1 =  ee.ImageCollection('COPERNICUS/S1_GRD');
// Filter Sentinel-1 collection for study area, date ranges and polarization components
var sCollection =  sentinel1
                    //filter by aoi and time
                    .filterBounds(table)
                    .filter(season)
                    // Filter to get images with VV and VH dual polarization
                    .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH'))
                    // Filter to get images collected in interferometric wide swath mode.
                    .filter(ee.Filter.eq('instrumentMode', 'IW'));

var desc = sCollection.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));
var asc = sCollection.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'));

// Contar o número de imagens em cada coleção
print('Número de Imagens Ascendente (VH)', asc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')).size());
print('Número de Imagens Ascendente (VV)', asc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')).size());
print('Número de Imagens Descendente (VH)', desc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')).size());
print('Número de Imagens Descendente (VH)', desc.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')).size());
// Criar um compósito a partir da média das polarizações e modos de órbita
var vh_asc = asc.select('VH').mean().rename('VH_asc');
var vv_asc = asc.select('VV').mean().rename('VV_asc');
var vh_desc = desc.select('VH').mean().rename('VH_desc');
var vv_desc = desc.select('VV').mean().rename('VV_desc');


// Combinar as bandas em uma única imagem
var composite = ee.Image.cat([vh_desc]).focal_median();

// Definir parâmetros de visualização para compósito (usar valores individuais para min e max)
var visParams = {
  bands: ['VH_desc'],  // bandas para os canais R, G, B
  min: -25,  // valor mínimo para todas as bandas
  max: 0     // valor máximo para todas as bandas
};

// Exibir no mapa
Map.centerObject(table, 10);  // Centralizar o mapa na área de interesse
Map.addLayer(composite.clip(table), visParams, 'composite');

// Exportar a imagem para o asset
Export.image.toAsset({
  image: composite.clip(table), // Recortar para a área de interesse
  description: 'Sentinel1', // Nome da tarefa de exportação
  assetId: 'projects/ee-selper/assets/Sentinel1', // Substitua pelo caminho correto do seu asset
  scale: 30, // Resolução da imagem em metros
  region: table, // Área de interesse para recorte
  maxPixels: 1e13 // Número máximo de pixels permitidos (ajuste conforme necessário)
});

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

此星光明

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值