外星人圖像和外星人太空船
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.pswp.cn/news/391073.shtml 繁體地址,請注明出處:http://hk.pswp.cn/news/391073.shtml 英文地址,請注明出處:http://en.pswp.cn/news/391073.shtml
如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!