前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Google Earth Engine(GEE)——sentinel-1数据中乌克兰附近数据缺失轨道36缺失

Google Earth Engine(GEE)——sentinel-1数据中乌克兰附近数据缺失轨道36缺失

作者头像
此星光明
发布2024-02-02 13:38:09
780
发布2024-02-02 13:38:09
举报

ee.Filter.maxDifference(difference, leftField, rightValue, rightField, leftValue) 创建一个一元或二元过滤器,如果左和右操作数都在给定的最大差值内,则通过。如果作为一个连接条件,这个数字的差异被用作一个连接措施。

参数。 difference (Float): 过滤器将返回真值的最大差异。

leftField (String, default: null): 左边操作数的选择器。如果指定了leftValue,就不应该指定。

rightValue(对象,默认:null)。 右边操作数的值。如果指定了rightField,则不应该指定。

rightField(字符串,默认:null)。 右边操作数的选择器。如果指定了rightValue,则不应该指定。

leftValue(对象,默认:null)。 左边操作数的值。如果指定了leftField,则不应该指定。

返回。过滤器

ee.Join.saveBest(matchKey, measureKey, outer) 返回一个连接,将第一个集合中的每个元素与第二个集合中的匹配元素配对。具有最佳连接度量的匹配被作为一个额外的属性添加到每个结果中。当 withinDistance 或 maxDifference 过滤器被用作连接条件时,会产生连接测量。

参数。 matchKey(字符串)。 用来保存匹配的键。

measureKey (String)。 用于保存匹配的连接条件的措施的键。

outer(布尔值,默认:false)。 如果为真,没有匹配的主行将被包括在结果中。

返回。连接

filterMetadata(name, operator, value) 已删除。使用 filter() 与 ee.Filter.eq(), ee.Filter.gte() 等。

通过元数据来过滤一个集合的快捷方式。这相当于this.filter(ee.Filter.metadata(..))。

返回过滤后的集合。

参数。 this:collection(集合)。 集合实例。

name(字符串)。 要过滤的属性名称。

operator (String): 比较运算符的名称。可能的值是。"等于"、"小于"、"大于"。

"not_equals", "not_less_than", "not_greater_than", "start_with",

"end_with", "not_starts_with", "not_ends_with", " contains",

"不包含"。

value(对象)。   - 要比较的值。

返回。集合

代码:

代码语言:javascript
复制
//乌克兰哨兵1A一致性:请看这里的细节。
// https://medium.com/@gglemoine62/12-day-sentinel-1-coherence-a-test-case for-ukrain-998488bf589

// 问题报告。
// 由于ALU软件的一个错误,相对轨道36的一致性错过了IW2的中心子路径。
// 但是,由于IW1和IW3没有问题,我们没有将它们排除在外。
// 我们打算在该错误修复后立即替换它们。

// COH12测试集有混合的VV(多数)和VH图像,都是单带的。
// 这就是为什么ee.Image.select('VV')不起作用。按偏振过滤如下。
var c12 = ee.ImageCollection('JRC/S1_COH_TEST').
  filterMetadata('system:index', 'ends_with', '_VV_coh12')

print(c12.size())
print(c12.first())
Map.addLayer(c12, null, 'Mosaic', false)

// 用S1_GRD_FLOAT加入COH12主站

var s0 = ee.ImageCollection('COPERNICUS/S1_GRD_FLOAT').
  filterDate('2021-09-01', '2022-09-02').filterBounds(geometry)

var masterDiffFilter = ee.Filter.maxDifference({
  difference: 10 * 1000,
  leftField: 'system:time_start',
  rightField: 'system:time_start'
});

var slaveDiffFilter = ee.Filter.maxDifference({
  difference: 10 * 1000,
  leftField: 'system:time_end',
  rightField: 'system:time_start'
});

// Define the join.
var saveMasterJoin = ee.Join.saveBest({
  matchKey: 'masterImage',
  measureKey: 'timeDiff'
});

var saveSlaveJoin = ee.Join.saveBest({
  matchKey: 'slaveImage',
  measureKey: 'timeDiff'
});

// Apply the joins.
var c12_joined = ee.ImageCollection(saveMasterJoin.apply(c12, s0, masterDiffFilter))

// Promote the relativeOrbitNumber_start 
c12_joined = c12_joined.map(function(f) { 
  return f.set('relativeOrbitNumber', ee.Image(f.get('masterImage')).get('relativeOrbitNumber_start'))
})

// Show the issue with relativeOrbitnumber 36
Map.addLayer(c12_joined.filterMetadata('relativeOrbitNumber', 'equals', 36), {min: 0.2, max: 1}, "IW2 missing for rel orbit 36")
Map.centerObject(geometry, 6)
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-02-01,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档