Google Earth Engine(GEE)——导出后的影像像素不同于原始Landsat影像的分辨率(投影差异)

简介: Google Earth Engine(GEE)——导出后的影像像素不同于原始Landsat影像的分辨率(投影差异)

问题:

我在谷歌地球引擎中有一个Landsat 7的镶嵌图,在网络应用的地图窗口中显示时(导出前)看起来没有问题。但是,当我导出它时,有些像素变窄了,有些变宽了。基本上有一些南北向的长度,其像素宽度为22米,而不是30米。

原始代码链接:https://code.earthengine.google.com/3ecceca28e81cc3d0c304281f08b4619

原始代码:

// Define study site geometry:
var box = ee.Geometry.Rectangle(14.91081234991633, 68.28371077192794, 14.965572329164377, 68.30250393637535);
Map.centerObject(box);
// Filter image collection by time and area.
var landsat_7 = ee.ImageCollection("LANDSAT/LE07/C01/T1_SR") // 
  .filterBounds(box)
  .filterDate('2000-07-01','2000-08-31');
// Make median mosaic from collection:  
var landsat_7_mosaic = landsat_7.median()
  .select('B.+'); // Keep only bands containing B
var visuals = {bands: ["B1","B2","B3"],
    gamma: 1,
    max: 2737.5867438745377,
    min: 2040.6889200176545,
    opacity: 1};
// Add the image to the map window
Map.addLayer(landsat_7_mosaic, visuals, 'Landsat 7 mosaic');
             
Export.image.toDrive({image: landsat_7_mosaic,
                       description:'imageToDriveExample',
                       scale:30,
                       region: box,
                       maxPixels:1e13});

 

问题是:为什么会发生这种情况?有什么办法可以避免吗?

调查:

我调查了在QGIS中的输出,但如果我把导出的图像上传到Earth Engine中,这种差异仍然存在,所以这似乎不是一个与平台有关的问题。

如果我使用检查器功能,导出前和导出后的文件在重叠变形的地方有不同的像素值,所以这不仅仅是一个显示错误。

如果我对同一集合的图像做同样的事情(只有原始图像,没有马赛克),导出的文件看起来与原始文件完全一样。

我试着用不同的坐标参考导出,如WGS84和不同的UTM-zone。这些都不影响结果。

思考:

首先我想,马赛克和原始图像之间的差异可能意味着,不规则是马赛克操作试图将空间位置略有不同的像素装入同一光栅的结果。但如果是这样,我就不明白为什么在输出前的光栅渲染中没有显示出来。

默认情况下,GEE以EPSG:4326导出图像,这导致在这个纬度上出现矩形的像素。最好的办法是在导出时将图像重新投射到本地投影--在你的例子中是EPSG:32633。这应该可以解决这个问题:

修改后的代码:

// Define study site geometry:
var box = ee.Geometry.Rectangle(14.91081234991633, 68.28371077192794, 14.965572329164377, 68.30250393637535);
Map.centerObject(box);
Map.addLayer(box)
// Filter image collection
var landsat_7 = ee.ImageCollection("LANDSAT/LE07/C01/T1_SR") // Use var to make an object containing the landsat 5 catalogue.
  .filterBounds(box)
  .filterDate('2000-07-01','2000-08-31');
// Make median mosaic from collection:  
var landsat_7_mosaic = landsat_7.median()
  .select('B.+'); // Keep only bands containing B
print(landsat_7)
var visuals = {bands: ["B1","B2","B3"],
    gamma: 1,
    max: 2737.5867438745377,
    min: 2040.6889200176545,
    opacity: 1};
// Add the image to the map window
Map.addLayer(landsat_7_mosaic, visuals, 'Landsat 7 mosaic');
             
Export.image.toDrive({image: landsat_7_mosaic.select(["B1","B2","B3"]),
                       description:'mosaic_epsg4326',
                       scale:30,
                       region: box,
                       maxPixels:1e13});
                       
var proj = landsat_7.first().select(0).projection();
print(proj)
Export.image.toDrive({image: landsat_7_mosaic.select(["B1","B2","B3"]).reproject(proj),
                       description:'mosaic_reproj_epsg32633',
                       scale:30,
                       region: box,
                       maxPixels:1e13});

 

 

目录
打赏
0
0
0
0
207
分享
相关文章
如何用Google Earth Engine快速、大量下载遥感影像数据?
【2月更文挑战第9天】本文介绍在谷歌地球引擎(Google Earth Engine,GEE)中,批量下载指定时间范围、空间范围的遥感影像数据(包括Landsat、Sentinel等)的方法~
2924 1
如何用Google Earth Engine快速、大量下载遥感影像数据?
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
295 0
|
9月前
GEE——Google dynamic world中在影像导出过程中无法完全导出较大面积影像的解决方案(投影的转换)EPSG:32630和EPSG:4326的区别
GEE——Google dynamic world中在影像导出过程中无法完全导出较大面积影像的解决方案(投影的转换)EPSG:32630和EPSG:4326的区别
174 0
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
142 0
Google Earth Engine——促进森林温室气体报告的全球时间序列数据集
Google Earth Engine——促进森林温室气体报告的全球时间序列数据集
127 0
Google Earth Engine(GEE)——全球道路盘查项目全球道路数据库
Google Earth Engine(GEE)——全球道路盘查项目全球道路数据库
199 0
|
9月前
|
Open Google Earth Engine(OEEL)——matrixUnit(...)中产生常量影像
Open Google Earth Engine(OEEL)——matrixUnit(...)中产生常量影像
102 0
|
9月前
Google Earth Engine(GEE)——导出指定区域的河流和流域范围
Google Earth Engine(GEE)——导出指定区域的河流和流域范围
364 0
Open Google Earth Engine(OEEL)——哨兵1号数据的黑边去除功能附链接和代码
Open Google Earth Engine(OEEL)——哨兵1号数据的黑边去除功能附链接和代码
169 0
|
9月前
Google Earth Engine(GEE)——当加载图表的时候出现错误No features contain non-null values of “system:time_start“.
Google Earth Engine(GEE)——当加载图表的时候出现错误No features contain non-null values of “system:time_start“.
166 0