基于AI Earth的威宁草海水质反演

简介: 利用AI Earth可用很快的进行遥感计算,利用哨兵2号影像进行对威宁草海进行水质反演,当然我这里没有具体的数据,也不知道做的效果怎么样,大家有数据的,可用帮我去看看,速度特别快的。后面附上ArcGIS Pro绘图的成果。

威宁草海水质反演

贵州威宁草海国家级自然保护区, 位于贵州省西部威宁县县城西南面,保护区面积120平方公里, 其中水域面积46.5平方公里。是一个完整、典型的高原湿地生态系统、是黑颈鹤等228种鸟类的重要越冬地和迁徙中转站;是中国著名三大高原湖泊(草海、滇池,青海湖)之一、贵州最大的高原天然淡水湖泊、中国Ⅰ级重要湿地、国家4A级旅游景区;是世界十大观鸟基地,被美国国家地理杂志评选为世界上最受欢迎的旅游胜地。

初始化环境

import aie
aie.Authenticate()
aie.Initialize()

检索数据

# 导入roi
shp = aie.FeatureCollection('user/17bf545043ad434aa03f516c8bb311eb')
geometry = shp.geometry()
# geometry = geometry.buffer(1500)
map = aie.Map(
    center=geometry.getCenter(),
    height=800,
    zoom=11
)
vis_params = {
    'color': '#00FF00'
}
map.addLayer(
    geometry,
    vis_params,
    'shapefile',
    bounds=geometry.getBounds()
)
map

roi


# 指定检索数据集,可设置检索的空间和时间范围,以及属性过滤条件(如云量过滤等)
dataset = aie.ImageCollection('SENTINEL_MSIL2A') \
             .filterBounds(geometry) \
             .filterDate('2020-05-13', '2021-05-15') \
             .filter(aie.Filter.lte('eo:cloud_cover',10.0))
# 显示影像
# vis_params = {
#     'bands': ['B4', 'B3', 'B2'],
#     'min': 0,
#     'max': 2000,
# }
# map.addLayer(
#     dataset,
#     vis_params,
#     'True Color (432)',
#     bounds=dataset.getBounds()
# )
# map

水体反演指数计算

image = dataset.select(["B2", "B3", "B4"]).mosaic().clip(geometry)

# date = image.get("date").getInfo();  
b2 = image.select("B2") 
b3 = image.select("B3") 
b4 = image.select("B4") 

# 叶绿素α浓度
chl1 = ((b4.divide(b3)).pow(aie.Image(2))).multiply(aie.Image(4.089))
chl2 = (b4.divide(b3)).multiply(aie.Image(0.476))                                                   
chlorophyll = chl1.subtract(chl2).add(aie.Image(29.733)) 

# 悬浮物浓度
suspension = ((b3.divide(b2)).pow(aie.Image(6.0823))).multiply(aie.Image(119.62))
# 透明度
transparency = suspension.pow(aie.Image(-0.67)).multiply(aie.Image(284.15))

# 基于叶绿素α浓度的营养状态指数
TLIchia = (chlorophyll.multiply(aie.Image(10.86))).add(aie.Image(2.5))
# 基于透明度的营养状态指数
TLIsd = aie.Image(51.18).subtract(transparency.log().multiply(aie.Image(19.4)))
chlorophyll_vis  = {
    'min': 30,
    'max': 38,
    'palette': ['#ff2b18','#fe9a0c','#f9e71c','#d2fe79',
               '#8afccb','#39dfff','#6b85fe','#5813fc']
}


map.addLayer(
    chlorophyll,
    chlorophyll_vis,
    'Chlorophyll',
    bounds=chlorophyll.getBounds()
)

map

叶绿素α浓度

transparency_vis  = {
    'min': 0,
    'max': 10,
    'palette': ['#c2523c','#e18321','#f5c60b','#d6fa00',
               '#20e000','#16b569','#198090','#0b2c7a']
}


map.addLayer(
    transparency,
    transparency_vis,
    'Transparency',
    bounds=transparency.getBounds()
)

map

透明度

# unitScale操作,归一化操作
TLIchia_unit = TLIchia.unitScale(333, 408)
TLIsd_unit = TLIsd.unitScale(-9,63)
# max操作
Water_quality = TLIchia_unit.max(TLIsd_unit)
quality_vis  = {
    'min': 0,
    'max': 0.4,
    'palette': ['#5813fc','#6a70fd','#5eb7fe','#08fcfd','#95fcc3',
                '#ccfd83','#f2fe2a','#fdc521','#ff860e','#ff2b18']
}


map.addLayer(
    Water_quality,
    quality_vis,
    'WaterQuality',
    bounds=Water_quality.getBounds()
)

map

水体质量分布

水体质量分类

# Water_quality是水体污染指数,意思就是都是反过来,Water_quality三分类,
# 将quality小于等于0.39的区域设置为1,
# 将quality大于0.39小于等于0.52的区域设置为2,将quality大于0.52设置为3

Water_class = Water_quality.where(Water_quality.lte(aie.Image(0.39)),aie.Image(1))\
                           .where(Water_quality.gt(aie.Image(0.39)).And(Water_quality\
                                                      .lte(aie.Image(0.52))),aie.Image(2))\
                           .where(Water_quality.gt(aie.Image(0.52)),aie.Image(3))\


# map = aie.Map(
#     center=geometry.getCenter(),
#     height=800,
#     zoom=11
# )


# 正常水体区域为蓝色
vis_params = {
    'min': 1.0,
    'max': 3.0,
    'palette' : [
        '#97dbf2', '#ffffbe', '#fc3019'
    ]
}


map.addLayer(
    Water_class,
    vis_params,
    'WaterClass',
    bounds=Water_class.getBounds()
)
map

水体质量分级空间分布

# 导出数据
# task = aie.Export.image.toAsset(chlorophyll,'chlorophyll',10)
# task.start()

总结

利用AI Earth可用很快的进行遥感计算,利用哨兵2号影像进行对威宁草海进行水质反演,当然我这里没有具体的数据,也不知道做的效果怎么样,大家有数据的,可用帮我去看看,速度特别快的。后面附上ArcGIS Pro绘图的成果。
主要引用
[1]孙微,曹宇佳,马新文,魏丹.基于Sentinel-2和ZH-1遥感影像的松北区水质监测[J].地理信息世界,2021,28(01):118-123.
水体透明度空间分布
水体综合污染等级空间分布
水体叶绿素α浓度空间分布

相关文章
|
2月前
|
人工智能 JSON 数据格式
GEE、PIE和AI Earth平台进行案例评测:NDVI计算,结果差异蛮大
GEE、PIE和AI Earth平台进行案例评测:NDVI计算,结果差异蛮大
91 0
|
2月前
|
人工智能 开发者
AI Earth ——开发者模式案例8:利用Landsat-8数据进行地表温度反演
AI Earth ——开发者模式案例8:利用Landsat-8数据进行地表温度反演
47 0
|
2月前
|
人工智能 开发者
AI Earth ——开发者模式案例9:OpenAPI调用AI识别能力
AI Earth ——开发者模式案例9:OpenAPI调用AI识别能力
62 0
|
2月前
|
人工智能 算法 数据可视化
AI Earth ——开发者模式案例6:决策树模型实现冬小麦提取
AI Earth ——开发者模式案例6:决策树模型实现冬小麦提取
53 2
|
2月前
|
人工智能 开发者
AI Earth ——开发者模式案例5:鄱阳湖水体区域识别
AI Earth ——开发者模式案例5:鄱阳湖水体区域识别
52 6
|
2月前
|
人工智能 数据可视化 定位技术
AI Earth ——开发者模式案例4:浙江省森林区域植被生长分析
AI Earth ——开发者模式案例4:浙江省森林区域植被生长分析
37 2
|
2月前
|
人工智能 数据可视化 算法
AI Earth ——开发者模式案例3:典型植被指数计算及区域统计
AI Earth ——开发者模式案例3:典型植被指数计算及区域统计
87 1
|
2月前
|
人工智能 算法 数据可视化
AI Earth ——开发者模式案例2:Landsat系列影像数据去云
AI Earth ——开发者模式案例2:Landsat系列影像数据去云
65 3
|
2月前
|
人工智能 编解码 数据可视化
AI Earth ——开发者模式案例1:按区域进行Sentinel2L2A检索与下载
AI Earth ——开发者模式案例1:按区域进行Sentinel2L2A检索与下载
50 0
|
2月前
|
人工智能 算法 数据可视化
AI Earth ——开发者模式案例7:植被覆盖度提取
AI Earth ——开发者模式案例7:植被覆盖度提取
60 9