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',
  });

最后结果

 


相关文章
|
4月前
|
数据可视化 定位技术 Sentinel
如何用Google Earth Engine快速、大量下载遥感影像数据?
【2月更文挑战第9天】本文介绍在谷歌地球引擎(Google Earth Engine,GEE)中,批量下载指定时间范围、空间范围的遥感影像数据(包括Landsat、Sentinel等)的方法~
1911 1
如何用Google Earth Engine快速、大量下载遥感影像数据?
|
4月前
|
编解码 算法 定位技术
GEE时序——利用sentinel-2(哨兵-2)数据进行地表物候学分析(时间序列平滑法估算和非平滑算法代码)
GEE时序——利用sentinel-2(哨兵-2)数据进行地表物候学分析(时间序列平滑法估算和非平滑算法代码)
298 3
|
4月前
|
机器学习/深度学习 算法 数据可视化
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
191 0
|
4月前
|
数据可视化 数据挖掘 数据建模
R语言指数平滑法holt-winters分析谷歌Google Analytics博客用户访问时间序列数据
R语言指数平滑法holt-winters分析谷歌Google Analytics博客用户访问时间序列数据
|
4月前
|
算法 数据挖掘 定位技术
GEE 案例——如何计算sentinel-2中每一个单景影像的波段的DN值并绘制直方图
GEE 案例——如何计算sentinel-2中每一个单景影像的波段的DN值并绘制直方图
88 5
|
4月前
|
API Go 网络架构
GEE Colab——如何从本地/Google云盘/Google Cloud Storage (GCS)上传和下载
GEE Colab——如何从本地/Google云盘/Google Cloud Storage (GCS)上传和下载
236 4
|
4月前
|
机器学习/深度学习 存储 人工智能
GEE Colab——初学者福音快速入门 Google Colab(Colaboratory)
GEE Colab——初学者福音快速入门 Google Colab(Colaboratory)
199 3
|
4月前
|
存储 编解码 人工智能
GEE数据集——哨兵2号Sentinel-2 云概率数据集
GEE数据集——哨兵2号Sentinel-2 云概率数据集
319 2
|
4月前
|
编解码 人工智能 算法
Google Earth Engine——促进森林温室气体报告的全球时间序列数据集
Google Earth Engine——促进森林温室气体报告的全球时间序列数据集
70 0
|
4月前
|
编解码 人工智能 数据库
Google Earth Engine(GEE)——全球道路盘查项目全球道路数据库
Google Earth Engine(GEE)——全球道路盘查项目全球道路数据库
99 0
下一篇
DDNS