Google Earth Engine(GEE)——Sentinel-5p数据的正确展示和下载

简介: Google Earth Engine(GEE)——Sentinel-5p数据的正确展示和下载

问题:

各位,请问一下sentinel-5p数据筛选的时候,为什么filterBounds()方法不起作用呢?(我设置范围为福建省,但是他还是把全球都是筛选出来了)

来看一下他的原始代码:

var O3 = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_O3"),
var China = ee.FeatureCollection("users/Zhouxiaokang/Shape/China_Province_Zone"),
var Fujian = ee.FeatureCollection("users/Zhouxiaokang/Fujian");
var star_date=ee.Date.fromYMD(2019,1,1);
var end_date=ee.Date.fromYMD(2020,12,31);
var Fujian=China.filter(ee.Filter.eq("省","福建省"));
var S5p_Fujian=O3.filter(ee.Filter.bounds(Fujian))
                  .filterDate(star_date,end_date);
print(S5p_Fujian.limit(100));
Map.centerObject(Fujian,6);
Map.addLayer(Fujian);
Map.addLayer(S5p_Fujian.first());

首先来看问题,影像和适量添加的都没有问题,时间时日筛选也没有问题,当然,有更简单的方法,一会看我的代码即可。这里的重点是没有我们筛选的时候不能有中文的出现,所以错误出现在这里,这是第一个,我们一般会以英文进行命名,而且不必要向上面代码这么麻烦,直接一个 filterBounds()来解决即可,然后打印这里如果不是为了获取影像的数量不建议打印,这一步有点多余,不过初学者来说可以坚持这么做,毕竟可以发现问题的所在之处。


filterBounds(geometry)

Shortcut to filter a collection by intersection with geometry. Items in the collection with a footprint that fails to intersect the given geometry will be excluded.

This is equivalent to this.filter(ee.Filter.bounds(...)).

Caution: providing a large or complex collection as input can result in poor performance. Collating the geometry of collections does not scale well, use the smallest collection (or geometry) that is required to achieve the desired outcome.

Returns the filtered collection.


Arguments:

this:collection (Collection):

The Collection instance.

geometry (ComputedObject|FeatureCollection|Geometry):

The geometry, feature or collection to intersect with.


Returns: Collection

改正

今天看到有个朋友说无法正确的使用filterBounds()这个函数,在对于sentinel-5P的数据中,对于中国区域没法正确使用,我很是纳闷,随后我就直接自己赶快从之前的博客中找来我的代码,然后进行了一番改写之后实现了中国区域的sentinel-5P数据的展示和下载。

//加载中国区域的矢量边界
//如果你是省的矢量也直接夹在即可
var table2 = ee.FeatureCollection("users/bqt2000204051/CHINA");
// 分别定义两年的影响数据筛选
//用时间节点获取你想要的影像
var y2019 = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_SO2").filterDate("2019-06-01","2019-06-3").filterBounds(table2);
// 上色
var band_viz = {
  min: 0.0,
  max: 0.0005,
  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};
//图层加载
Map.addLayer(y2019.mean().select("SO2_column_number_density").clip(table2),band_viz," 2019");
//分别利用已经定义的影像名称来下载即可
Export.image.toDrive({
//这里的mean就代表求均值
    image: y2019.mean().select("SO2_column_number_density").clip(table2),
    region:table2,
    scale:1000,
    description: "CHINA_so2_1Km",
    folder: 'CHINA_so2_1Km',
  });

最后结果

 


相关文章
|
数据可视化 定位技术 Sentinel
如何用Google Earth Engine快速、大量下载遥感影像数据?
【2月更文挑战第9天】本文介绍在谷歌地球引擎(Google Earth Engine,GEE)中,批量下载指定时间范围、空间范围的遥感影像数据(包括Landsat、Sentinel等)的方法~
5525 1
如何用Google Earth Engine快速、大量下载遥感影像数据?
|
编解码 算法 定位技术
GEE时序——利用sentinel-2(哨兵-2)数据进行地表物候学分析(时间序列平滑法估算和非平滑算法代码)
GEE时序——利用sentinel-2(哨兵-2)数据进行地表物候学分析(时间序列平滑法估算和非平滑算法代码)
1792 3
|
传感器 编解码 数据处理
Open Google Earth Engine(OEEL)——哨兵1号数据的黑边去除功能附链接和代码
Open Google Earth Engine(OEEL)——哨兵1号数据的黑边去除功能附链接和代码
538 0
|
机器学习/深度学习 算法 数据可视化
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
799 0
|
Java 测试技术 Nacos
|
API Go 网络架构
GEE Colab——如何从本地/Google云盘/Google Cloud Storage (GCS)上传和下载
GEE Colab——如何从本地/Google云盘/Google Cloud Storage (GCS)上传和下载
977 4
|
数据可视化 数据挖掘 数据建模
R语言指数平滑法holt-winters分析谷歌Google Analytics博客用户访问时间序列数据
R语言指数平滑法holt-winters分析谷歌Google Analytics博客用户访问时间序列数据
|
数据处理
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
386 0
|
编解码 人工智能 计算机视觉
Google Earth Engine(GEE)——Umbra卫星翁布拉合成孔径雷达公开数据
Google Earth Engine(GEE)——Umbra卫星翁布拉合成孔径雷达公开数据
456 0
|
人工智能 Java 数据库
Google Earth Engine(GEE)——北美当前和预测的气候数据
Google Earth Engine(GEE)——北美当前和预测的气候数据
367 0

推荐镜像

更多