当前位置:网站首页>Gee: remote sensing image composite and mosaic
Gee: remote sensing image composite and mosaic
2022-07-02 05:11:00 【Gee water ecological space】
Catalog
To learn, you must be rigid and constant , If it's not rigid, it's easy , If it doesn't last, it will fall back .—— The song dynasty . Fengzixian
Preface
GEE, How to realize the synthesis of remote sensing images (composite) And inlay (mosaic)? What's the difference between them ?
The analysis area is as follows :
One 、 Analysis steps
Main analysis steps :
Two 、python Code
1、 Image synthesis Composite
python The code is as follows
Be careful : synthesis composite It mainly reflects the synthesis of multi-phase images in the same area
Map = geemap.Map()
# Load image data
naip2004_2012 = ee.ImageCollection('USDA/NAIP/DOQQ') \
.filterBounds(ee.Geometry.Point(-71.09, 42.4)) \
.filterDate('2004-07-01', '2012-12-31') \
.select(['R', 'G', 'B'])
# Maximum value synthesis
composite = naip2004_2012.max()
Map.addLayer(composite, {
}, 'max value composite')
Map.setCenter(-71.09, 42.4, 14)
Map
give the result as follows :
2、 Image mosaic Mosaic
- ee.ImageCollection.mosaic()

Be careful : set mosaic It mainly reflects the synthesis operation of images in different regions
You need to splice four different DOQQ, But in different places
python The code is as follows
# Load span 4 Data of images
naip2012 = ee.ImageCollection('USDA/NAIP/DOQQ') \
.filterBounds(ee.Geometry.Rectangle([-71.18, 42.35, -71.09, 42.41])) \
.filterDate('2012-01-01', '2012-12-31')
# Image mosaic mosaic
mosaic = naip2012.mosaic()
Map.addLayer(naip2012, {
}, 'naip2012')
Map.setCenter(-71.12532, 42.3712, 12)
give the result as follows :
3、 Dig further Mosaic Characteristics of
a key :mosaic() Methods according to their order in the set ( Finally at the top ) Composite overlapping image . To control tessellation ( Or synthesis ) The source of pixels in , Image masks can be used mask.
for example , The following uses spectral threshold to mosaic new image data
python The code is as follows :
# Load image , Show
naip = ee.Image('USDA/NAIP/DOQQ/m_4207148_nw_19_1_20120710')
Map.setCenter(-71.0915, 42.3443, 12)
Map.addLayer(naip, {
}, 'naip')

# Generate NDVI、NDWI Index
ndvi = naip.normalizedDifference(['N', 'R']).rename('ndvi')
ndwi = naip.normalizedDifference(['G', 'N']).rename('ndwi')
# Use the above 2 Indices , Use different threshold conditions , The detection area is naked
# Naked land 1, Vegetation index is lower than 0.2, At the same time, the water index is lower than 0.3 Region
bare1 = ndvi.lt(0.2).And(ndwi.lt(0.3))
# Naked land 2, Vegetation index is lower than 0.2, At the same time, the water index is lower than 0.8 Region . It can be seen that its sensitivity is lower than the previous threshold
bare2 = ndvi.lt(0.2).And(ndwi.lt(0.8))
# Display parameters
vis_ndvi = {
'min':-1, 'max':1, 'palette':['red', 'green']}
vis_ndwi = {
'min':0.5, 'max':1, 'palette':['gray', 'blue']}
# Load display
Map.addLayer(ndvi, vis_ndvi, 'ndvi')
Map.addLayer(ndwi, vis_ndwi, 'ndwi')
Map.addLayer(bare1, {
}, 'bare1')
Map.addLayer(bare2, {
}, 'bare2')
Show results :
# Mask and embed visual images , You can see that the last layer is on the top ( This is a Mosaic Characteristics )
mosaic = ee.ImageCollection([
ndwi.updateMask(ndwi.gte(0.5)).visualize(**vis_ndwi),
ndvi.updateMask(ndvi.gte(0.2)).visualize(**vis_ndvi),
bare2.updateMask(bare2.And(bare1.Not())).visualize(**{
'palette':['gray']}),
bare1.updateMask(bare1).visualize(**{
'palette':['white']})
]).mosaic()
Map.addLayer(mosaic, {
}, 'visualization mosaic')
give the result as follows :
3、 ... and 、 Summary
- Two different influence synthesis methods of image synthesis and image mosaic are analyzed , among Image synthesis composite It is more manifested in the combination of images in the same area at different times , The most commonly used synthesis methods are maximization synthesis (MVC,max value composite)、 Median synthesis (median)、 Mean synthesis (mean) And other synthetic methods , In specific work, different synthesis methods can be adopted according to actual needs ; set (mosaic) More performance in the synthesis of multiple images in different areas .
- The feature of mosaic is that the last layer is on the top , This is also Mosaic One of the characteristics of .
Reference resources :
- https://developers.google.com/earth-engine/apidocs/ee-image-visualize?hl=en
- https://github.com/giswqs/earthengine-py-notebooks/blob/master/ImageCollection/mosaicking.ipynb
- https://developers.google.com/earth-engine/guides/ic_composite_mosaic?hl=en
边栏推荐
- 7.1模擬賽總結
- Global and Chinese markets for marine selective catalytic reduction systems 2022-2028: Research Report on technology, participants, trends, market size and share
- 运维工作的“本手、妙手、俗手”
- Fabric.js 3个api设置画布宽高
- Ansible installation and use
- Use of typescript classes
- 案例分享|智慧化的西部机场
- Implementation of go language for deleting duplicate items in sorting array
- 06 decorator mode
- 摆正元素(带过渡动画)
猜你喜欢

Paddlepaddle project source code

List of common bugs in software testing

Video multiple effects production, fade in effect and border background are added at the same time

Cubemx DMA notes

C case of communication between server and client based on mqttnet

el form 表单validate成功后没有执行逻辑

Disable access to external entities in XML parsing

黑马笔记---Set系列集合

解析少儿编程中的动手搭建教程

Analyzing the hands-on building tutorial in children's programming
随机推荐
7.1模拟赛总结
06 decorator mode
Fabric.js 渐变
数学知识——快速幂的理解及例题
Map in JS (including leetcode examples)
解决:代理抛出异常错误
Dark horse notes -- map set system
Fabric.js 右键菜单
Lay the foundation for children's programming to become a basic discipline
7.1 simulation summary
Go Chan's underlying principles
Leetcode18题 【四数之和】递归解法
Briefly introduce chown command
Orthogonal test method and function diagram method for test case design
National all Chinese Automatic Test Software apifox
Line by line explanation of yolox source code of anchor free series network (7) -- obj in head_ loss、Cls_ Loss and reg_ Calculation and reverse transmission of loss I
Paddlepaddle project source code
ansible安装与使用
Typescript function details
How do I interview for a successful software testing position? If you want to get a high salary, you must see the offer