当前位置:网站首页>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
边栏推荐
- Draw a wave chart_ Digital IC
- Mathematical knowledge -- understanding and examples of fast power
- Getting started with pytest ----- confitest Application of PY
- No logic is executed after the El form is validated successfully
- Disable access to external entities in XML parsing
- Typescript function details
- [Yu Yue education] autumn 2021 reference materials of Tongji University
- 6.30年终小结,学生时代结束
- C # picture display occupancy problem
- Fabric.js 右键菜单
猜你喜欢

Pyechats 1.19 generate a web version of Baidu map

Summary of database problems

Cultivate primary and secondary school students' love for educational robots

Getting started with pytest ----- confitest Application of PY

4. Flask cooperates with a tag to link internal routes

06 decorator mode

Application of intelligent robot in agricultural ecology

Dark horse notes -- Set Series Collection

The underlying principle of go map (storage and capacity expansion)

C# 基于MQTTNet的服务端与客户端通信案例
随机推荐
LS1046nfs挂载文件系统
Disable access to external entities in XML parsing
Oracle和MySQL的基本区别(入门级)
Implementation of go language for deleting duplicate items in sorting array
2022 Alibaba global mathematics competition, question 4, huhushengwei (blind box problem, truck problem) solution ideas
Differential identities (help find mean, variance, and other moments)
6.30 year end summary, end of student age
fastText文本分类
Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
Fasttext text text classification
Feign realizes file uploading and downloading
C case of communication between server and client based on mqttnet
06 装饰(Decorator)模式
Getting started with pytest -- description of fixture parameters
Fabric.js 圆形笔刷
[high speed bus] Introduction to jesd204b
Global and Chinese market of travel data recorder (VDR) 2022-2028: Research Report on technology, participants, trends, market size and share
7.1模擬賽總結
Briefly introduce chown command
Essence and physical meaning of convolution (deep and brief understanding)