外星人图像和外星人太空船
By Christophe Restif & Avi Hoffman, Senior Software Engineers, Crisis Response
危机应对高级软件工程师Christophe Restif和Avi Hoffman
Editor’s note: In 2019, we piloted a new feature in Search SOS Alerts for major California wildfires. We used satellite data to create a wildfire boundary map that helps people immediately see the approximate size and location for a given fire. Now, we’re launching this feature on Search and Google Maps in the U.S. to provide deeper insights for areas impacted by an ongoing wildfire. Here we’ll show you how we generate wildfire boundary maps using Earth Engine.
编者注: 2019年,我们在Search SOS Alerts中试用了一项新功能,以应对加州的主要野火。 我们使用卫星数据创建了野火边界图,可帮助人们立即查看给定火势的大致大小和位置。 现在,我们将 在美国的“搜索”和“ Google地图”上 启动此功能 ,以提供更深入的洞察力,以了解不断发生的野火影响的地区。 在这里,我们将向您展示如何使用Earth Engine生成野火边界图。
Wildfires affect many countries and are getting more frequent and intense with climate change. In the USA alone, wildfires cost billions of dollars every year and impact people’s lives in profound ways. Mapping where they happen and how they grow provides critical information for a wide range of people. For first responders and communities near a wildfire, knowing where a blaze has been developing in recent hours can help inform evacuation orders and suppression plans. For long-term analysis and planning, looking back at where and how fires developed can improve prevention and management of future wildfires.
野火影响许多国家,并且随着气候变化而变得越来越频繁和加剧。 仅在美国,山火每年就造成数十亿美元的损失,并深刻影响人们的生活。 绘制它们的发生位置以及它们的生长方式,可以为广泛的人们提供重要的信息。 对于在野火附近的急救人员和社区,了解近几个小时来的大火在哪里可以帮助告知疏散命令和镇压计划。 为了进行长期分析和计划,回顾火灾发生的地点和方式可以改善对未来野火的预防和管理。
Google Earth Engine provides out-of-the-box tools that can identify and display the outline of a wildfire. It offers free access to public satellite image datasets focused on wildfire applications, along with computing power to process the image data, and display libraries to visualize wildfire activity.
Google Earth Engine提供了开箱即用的工具,可以识别和显示野火的轮廓。 它可以免费访问专注于野火应用的公共卫星图像数据集,并具有处理图像数据的计算能力以及显示库以可视化野火活动。
In this post, we’ll illustrate how to put all the pieces together, going from satellite imagery to map outlines, using the Kincade fire (California, 2019) as an example. We’ll start with an overview of some of the relevant satellite imagery and then demonstrate how to turn pixelated image data into outlines of affected areas.
在本文中,我们将以Kincade火 (加利福尼亚州,2019年)为例,说明如何将所有部分组合在一起,从卫星图像到地图轮廓。 我们将首先概述一些相关的卫星图像,然后演示如何将像素化图像数据转换为受影响区域的轮廓。
卫星图像:来自太空的见解 (Satellite images: insights from space)
Wildfires can be detected from airborne and space-based platforms. Each technique has its pros and cons. Flying near or over an active fire can provide data with very high spatial and temporal precision. But it’s not always an option, as it requires significant operation costs and does not scale easily over entire states and countries.
可以从机载和天基平台检测到野火。 每种技术都有其优点和缺点。 在活跃的火势附近或上方飞行可以提供非常高的空间和时间精度的数据。 但这并不总是一种选择,因为它需要大量的运营成本,并且无法在整个州和地区轻松扩展。
Satellites offer a global alternative for wildfire imaging. They detect a wide range of reflected and emitted wavelengths from visible to infrared (IR), allowing identification of smoke, burned areas, and active fires. There has been significant research to develop accurate fire detection algorithms to distinguish whether heat picked up by IR bands is emitted by wildfire or some other source.
卫星为野火成像提供了全球替代方案。 它们可以检测从可见光到红外(IR)的各种反射和发射波长,从而可以识别烟雾,燃烧的区域和活跃的火灾。 有大量研究开发精确的火灾检测算法,以区分红外波段吸收的热量是由野火还是其他来源散发的。
密切关注地球静止轨道 (Keeping an eye on earth from geostationary orbit)
Geostationary satellites orbit the Earth while observing the same spot. GOES 16 and 17 satellites carry the GOES ABI imager, which provides the underlying data for the FDC fire detection algorithm. The satellites offer a relatively high temporal resolution, taking images every 5 to 15 minutes. However, each satellite has a limited view that covers less than a hemisphere. And since they’re over 22,000 miles away, their spatial resolution is fairly coarse: the smallest pixels are about 2km wide at nadir, and increase with distance from nadir.
对地静止卫星在观测同一点的同时绕地球旋转。 GOES 16和17卫星携带GOES ABI成像仪 ,该成像仪为FDC火警检测算法提供了基础数据。 卫星提供相对较高的时间分辨率,每5至15分钟拍摄一次图像。 但是,每颗卫星的视野范围都小于半球。 而且,由于它们的距离超过22,000英里,因此它们的空间分辨率相当粗糙:最小像素在最低点约为2公里,并且随着距最低点的距离而增加。
In Earth Engine, these data are provided as ee.ImageCollection(“NOAA/GOES/16/FDCF”)
and ee.ImageCollection(“NOAA/GOES/17/FDCF”)
.
在Earth Engine中,这些数据分别作为ee.ImageCollection(“NOAA/GOES/16/FDCF”)
和ee.ImageCollection(“NOAA/GOES/17/FDCF”)
。
Having access to multiple geostationary satellites is a great way to reduce the spatial limitations. An area covered by two or more satellites will benefit from two independent sources of data, and covered by two different pixel geometries.
可以使用多个对地静止卫星是减少空间限制的好方法。 由两个或多个卫星覆盖的区域将受益于两个独立的数据源,并由两个不同的像素几何形状覆盖。
检测来自极地轨道卫星的野火信号 (Detecting wildfire signals from polar-orbiting satellites)
Polar-orbiting satellites fly at a lower altitude than geostationary satellites, and provide higher spatial resolution as a result; they also cover the entire Earth surface over time. Onboard the Suomi NPP satellite, the VIIRS instrument collects wildfire-related signals at 375m resolution. Onboard the Terra and Aqua satellites, the MODIS instrument collects wildfire-related signals at 1km resolution. On the other hand, their temporal resolution is lower, as they cover the same Earth footprint a few times per day, and transmit their data with a few hours of latency.
极地轨道卫星的飞行高度低于对地静止卫星,因此提供更高的空间分辨率; 随着时间的推移,它们还覆盖了整个地球表面。 在Suomi NPP卫星上 , VIIRS仪器以375m分辨率收集与野火有关的信号 。 在Terra和Aqua卫星上, MODIS仪器以1 km的分辨率收集与野火有关的信号 。 另一方面,它们的时间分辨率较低,因为它们每天几次覆盖相同的地球足迹,并且以数小时的延迟传输数据。
These polar-orbiting satellites offer important data for historical analysis and provide consistent pixel resolution for all regions of the Earth. This is particularly valuable for areas near the poles, like Alaska, where the pixel distortion from geostationary satellites can be very high.
这些极地轨道卫星为历史分析提供重要数据,并为地球所有区域提供一致的像素分辨率。 这对于极地附近的地区(例如阿拉斯加)特别有价值,因为地球静止卫星的像素失真可能非常高。
Earth Engine provides the Thermal Anomalies and Fire Daily Global 1km dataset from the MODIS sensor on the Terra satellite as ee.ImageCollection(“MODIS/006/MOD14A1”)
.
地球引擎从Terra卫星上的MODIS传感器提供ee.ImageCollection(“MODIS/006/MOD14A1”)
的热异常和每日每日火情数据集。
处理野火图像数据 (Processing wildfire imagery data)
In this post, we assume the intention is to delineate a single wildfire that is already known. Our input is a rough estimate of the region where it’s developing, and a rough estimate of the start and end dates. Sites providing such data include NASA Fire Information for Resource Management System (FIRMS), EC Global Wildfire Information System (GWIS), and US National Wildfire Coordinating Group (NWCG) InciWeb.
在本文中,我们假设目的是描绘一个已知的野火。 我们的输入是对其发展区域的粗略估算,以及开始和结束日期的粗略估算。 提供此类数据的站点包括NASA资源管理系统火灾信息 (FIRMS) , EC全球野火信息系统(GWIS)和美国国家野火协调小组(NWCG)InciWeb 。
We’ll illustrate how to process wildfire imagery data using the California Kincade fire, whose region is covered by GOES 16 and 17. To keep the illustration simple, we won’t be integrating polar-orbiting data here.
我们将说明如何使用California Kincade火 (其区域由GOES 16和17覆盖)来处理野火图像数据。为使说明简单,我们在此处将不整合极轨数据。
使用一颗卫星 (Using a single satellite)
The data provided for each GOES 16 and 17 are the results from the FDC algorithm. They’re generated every 15 minutes, over a grid of over 5,400 by 5,400 pixels, centered over the equator at the GOES East position at 75 degrees west longitude for GOES 16, and at the GOES West position at 138 degrees west longitude for GOES 17.
为每个GOES 16和17提供的数据是FDC算法的结果。 它们每15分钟生成一次,覆盖面积超过5,400 x 5,400像素,位于赤道上方,位于GOES East位置,西经75度,位于GOES West位置,位于GOES West处,西经138度。 。
The FDC algorithm provides a “fire mask code” for each pixel, with a few dozen predefined values. Here we focus on the following code values: processed fire pixel (value 10), saturated fire pixel (11), cloud contaminated fire pixel (12), high probability fire pixel (13), medium probability fire pixel (14), low probability fire pixel (15); and the corresponding “temporally filtered” code values: temporally filtered process fire pixel (30), temporally filtered saturated fire pixel (31), etc. These mask codes (10–15 and 30–35) indicate that the pixel is believed to cover a wildfire, with a varying degree of confidence.
FDC算法为每个像素提供了“防火模板代码” ,其中包含几十个预定义值。 在这里,我们重点关注以下代码值:处理后的火灾像素(值10),饱和火灾像素(11),云污染火灾像素(12),高概率火灾像素(13),中概率火灾像素(14),低概率火像素(15); 以及相应的“临时过滤”代码值:临时过滤的过程火灾像素(30),临时过滤的饱和火灾像素(31)等。这些掩码代码(10-15和30-35)表示该像素被认为覆盖了充满信心的野火。
Since we already know which region and time range to look at, we start by filtering the image collection by date and bounds.
由于我们已经知道要查看的区域和时间范围,因此我们先按 date和bounds 过滤图像集合。
// Time and location of the fire.
var kincade = {
longitude: -122.8,
latitude: 38.7,
start: '2019-10-23',
end: '2019-11-06',
};// Region of interest.
var radius_of_interest_meters = 40000;
var area_of_interest = ee.Geometry.Point([kincade.longitude, kincade.latitude])
.buffer(radius_of_interest_meters);// Satellite data.
var goes_16_data = ee.ImageCollection('NOAA/GOES/16/FDCF')
.filterDate(kincade.start, kincade.end)
.filterBounds(area_of_interest);
var goes_17_data = ee.ImageCollection('NOAA/GOES/17/FDCF')
.filterDate(kincade.start, kincade.end)
.filterBounds(area_of_interest);
The next step is to convert each mask code to a confidence value, between 0 and 1. Note that these values are arbitrary and for illustrative purposes. In Earth Engine, this is a map operation.
下一步是将每个掩码代码转换为0到1之间的置信度值。请注意,这些值是任意的,仅用于说明目的。 在Earth Engine中,这是一个地图操作 。
// Conversion from mask codes to confidence values.
var fire_mask_codes = [10, 30, 11, 31, 12, 32, 13, 33, 14, 34, 15, 35];
var confidence_values = [1.0, 1.0, 0.9, 0.9, 0.8, 0.8, 0.5, 0.5, 0.3, 0.3, 0.1, 0.1];
var default_confidence_value = 0;var map_from_mask_codes_to_confidence_values = function(image) {
return image
.clip(area_of_interest)
.remap(fire_mask_codes, confidence_values, default_confidence_value);
};var goes_16_confidence = goes_16_data
.select(['Mask'])
.map(map_from_mask_codes_to_confidence_values);
var goes_17_confidence = goes_17_data
.select(['Mask'])
.map(map_from_mask_codes_to_confidence_values);
As the wildfire evolves and gets extinguished, mask codes of a given pixel will change to reflect wildfire status over the time range we’ve filtered. The time series of mask code values contains a lot of valuable information. In this post, we’re interested in generating the outline of the affected area throughout the event. As a result, we’re going to summarize the time series with a single value: the maximum confidence that was assigned to each pixel over the wildfire time range. This is done in Earth Engine with a reduce operation, using the max reducer operator. Note that other operators would give different insights into the temporal evolution of the wildfire.
随着野火的发展和被扑灭,给定像素的遮罩代码将更改,以反映我们过滤的时间范围内的野火状态。 掩码代码值的时间序列包含许多有价值的信息。 在这篇文章中,我们有兴趣在整个事件中生成受影响区域的轮廓。 结果,我们将用一个值来总结时间序列:在野火时间范围内分配给每个像素的最大置信度。 这是在地球引擎完成了一个减少操作 ,使用最大减速操作 。 请注意,其他操作员会对野火的时间演变给出不同的见解。
var goes_16_max_confidence = goes_16_confidence
.reduce(ee.Reducer.max());
var goes_17_max_confidence = goes_17_confidence
.reduce(ee.Reducer.max());
We can visualize that initial data processing step from each satellite, using:
我们可以使用以下命令可视化每个卫星的初始数据处理步骤:
var affected_area_palette = ['white', 'yellow', 'orange', 'red', 'purple'];
Map.centerObject(area_of_interest, 9);
Map.addLayer(area_of_interest,
{color: 'green'},
'Area of interest', true, 0.2);
Map.addLayer(goes_16_max_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'GOES 16 maximum confidence');
Map.addLayer(goes_17_max_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'GOES 17 maximum confidence');
结合两颗卫星 (Combining two satellites)
Since GOES 16 and 17 cover the same area with the same temporal frequency, it is possible to combine their data in a fairly straightforward way. It’s worth noting that the pixels they observe do not coincide. Instead, the intersection of pixels from GOES 16 with those from GOES 17 give a new pixel grid at a smaller grain.
由于GOES 16和GOES以相同的时间频率覆盖相同的区域,因此可以以相当直接的方式组合其数据。 值得注意的是,它们观察到的像素不一致。 取而代之的是,来自GOES 16的像素与来自GOES 17的像素的交集以较小的粒度提供了新的像素网格。
In that new grid, each fragmented pixel receives one observation from GOES 16 and another from GOES 17, independent of each other. That gives us an advantage: while GOES 16 may mark an entire pixel at a certain mask value, GOES 17 may use a different value for part of that pixel. This essentially increases the spatial resolution of the combined data.
在该新网格中,每个分割的像素彼此独立地从GOES 16接收一个观测值,从GOES 17接收另一个观测值。 这给我们带来了一个优势:尽管GOES 16可以将整个像素标记为某个掩码值,但是GOES 17可以对该像素的一部分使用不同的值。 这实质上提高了组合数据的空间分辨率。
Once again, there are several ways to reduce the two numbers per pixel to a single one. In this post we keep the minimum value — the confidence of a wildfire being in a fragmented pixel is the lowest value measured from GOES 16 and 17. Here as well, other operators would give different insights.
再一次,有几种方法可以将每个像素的两个数字减少到一个。 在这篇文章中,我们保持最小值-野火在像素碎片中的置信度是从GOES 16和17中测得的最小值。在这里,其他运算符也会给出不同的见解。
var combined_confidence = ee.ImageCollection([goes_16_max_confidence,
goes_17_max_confidence])
.reduce(ee.Reducer.min());Map.addLayer(combined_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'Combined confidence');
生成最终轮廓 (Generating the final outline)
平滑卫星像素 (Smoothing the satellite pixels)
At this point, the processed data looks like a patchwork of polygonal regions, having sharp corners and containing a constant confidence value each. We can smooth both the polygonal corners and the step-like variations of confidence in a single operation, called ee.Image.reduceNeighborhood
in Earth Engine. It requires choosing a shape, known as a kernel, which will define a region of interest around each pixel, and a reducer operator, which will combine all the values in that region of interest into a single new value. Earth Engine offers a range of built-in kernels (such as ee.Kernel.circle
) and reducers (such as ee.Reducer.mean
). Each kernel shape and size and each reducer will produce a different smoothed image
在这一点上,处理后的数据看起来像是多边形区域的拼凑而成,具有尖锐的角并且每个包含恒定的置信度值。 我们可以在“地球引擎”中的一个名为ee.Image.reduceNeighborhood
的单一操作中平滑多边形的角点和阶梯状的置信度变化。 它需要选择一个称为内核的形状,该形状将在每个像素周围定义一个感兴趣的区域,以及一个reducer运算符,该运算符将将该感兴趣的区域中的所有值组合为一个新的值。 Earth Engine提供了一系列内置内核(例如ee.Kernel.circle
)和化ee.Kernel.circle
器(例如ee.Reducer.mean
)。 每种仁的形状和大小以及每种异化剂都会产生不同的平滑图像
var kernel = ee.Kernel.square(2000, 'meters', true);
var smoothed_confidence = combined_confidence
.reduceNeighborhood({'reducer':ee.Reducer.mean(),
'kernel': kernel,
'optimization': 'boxcar',});Map.addLayer(smoothed_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'Smoothed confidence');
转换为轮廓 (Converting to an outline)
After the smoothing operation above, the processed data is still an image of confidence values. A straightforward approach is to use the ee.Image.gt
operation to keep the parts of the image having confidence above a chosen threshold value.
经过上述平滑操作后,处理后的数据仍然是置信度值的图像。 一种简单的方法是使用ee.Image.gt
操作,以使图像的各个部分的置信度保持在所选阈值之上。
var high_confidence = smoothed_confidence
.gt(0.6);Map.addLayer(high_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'High confidence');
The next step is to convert the resulting binary image into an outline — typically generating a multi-polygon in case there are multiple regions in the image above the threshold. In Earth Engine, this is achieved with the ee.Image.reduceToVectors
operation.
下一步是将生成的二进制图像转换为轮廓-如果图像中有多个区域高于阈值,通常会生成一个多面体。 在Earth Engine中,这是通过ee.Image.reduceToVectors
操作实现的。
var affected_areas = high_confidence
.reduceToVectors({scale: 200, // 200 m/pixel
maxPixels: 1e10,
geometry: area_of_interest})
.filter(ee.Filter.eq('label', 1));var affected_areas_outline = ee.Image().byte()
.paint({featureCollection: affected_areas,
width: 2});
Map.addLayer(affected_areas_outline,
{palette: 'purple'},
'Affected areas', true, 0.3);
平滑最终轮廓 (Smoothing the final outline)
The reduceToVectors
operation typically generates outlines with staircase-like edges. Depending on the scale parameter used in that operation, the staircase steps will be more or less pronounced.
reduceToVectors
操作通常生成带有阶梯状边缘的轮廓。 取决于该操作中使用的比例参数,阶梯或多或少会明显。
One way to smooth such edges is to use Earth Engine ee.Feature.simplify
operation, specifying an acceptable error margin — the greater the error margin, the simpler the shape.
平滑此类边缘的一种方法是使用Earth Engine ee.Feature.simplify
操作,指定可接受的误差范围-误差范围越大,形状越简单。
var smooth = function(feature) {
var max_error_meters = 500;
return ee.Feature(feature).simplify(max_error_meters);};
var affected_areas_smoothed = ee.FeatureCollection(affected_areas)
.map(smooth);var affected_areas_smoothed_outline = ee.Image().byte()
.paint({featureCollection: affected_areas_smoothed,
width: 2});
Map.addLayer(affected_areas_smoothed_outline,
{palette: 'purple'},
'Smoothed affected areas', true, 0.3);
There are alternative ways to smooth such polygons, including averaging neighboring vertices. Each method will produce a slightly different smoothed outline.
有其他方法可以平滑此类多边形,包括对相邻顶点进行平均。 每种方法都会产生稍微不同的平滑轮廓。
评估结果 (Evaluating your results)
We described how to use Earth Engine’s public datasets and available libraries to compute the outlines around the affected areas of a known wildfire. There are several parameters to choose along the way, each affecting the final outcome. This is a good reminder that the generated outlines can only match the reality on the ground within a certain spatial and temporal resolution. Evaluating the quality of the results and tuning the parameters is an important task, which can rely on publicly available official outlines datasets, such as those provided by the US National Interagency Fire Center (NIFC).
我们描述了如何使用Earth Engine的公共数据集和可用库来计算已知野火的受影响区域周围的轮廓。 在此过程中,有几个参数可供选择,每个参数都会影响最终结果。 这很好地提醒了生成的轮廓只能在特定的空间和时间分辨率内与地面上的现实相匹配。 评估结果的质量和调整参数是一项重要的任务,它可以依靠可公开获得的官方轮廓数据集,例如美国国家机构间消防中心(NIFC)提供的数据集。
We hope learning more about how we approached this wildfires project will inspire others to work with tools like Earth Engine and publicly available Earth observation data to develop new and innovative approaches to pressing global issues.
我们希望更多地了解我们如何处理这个野火项目,这将激励其他人使用诸如Earth Engine和公开可用的Earth观测数据之类的工具来开发新的创新方法来解决紧迫的全球性问题。
翻译自: https://medium.com/google-earth/how-to-generate-wildfire-boundary-maps-with-earth-engine-b38eadc97a38
外星人图像和外星人太空船
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/391073.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!