探索卫星图像

Satellite data provides much crucial and decisive information for a wide range of applications such as land cover change detection, mineral exploration, monitoring wildfires, disasters and various natural calamities. The greatest events on Earth can be traced back to the point of time when they were actually happening, using the Historical Satellite Images. They allow us to go back in time and see how Earth looked in the past. In the age of Big Data, there is no other conventional equipment that can offer such amount of real time data at a global level.

小号 atellite数据提供了广泛的应用,例如土地覆盖变化检测,矿物勘探,监测野火,灾难和各种自然灾害多关键和决定性的信息。 使用历史卫星图像,可以将地球上最大的事件追溯到实际发生的时间点。 它们使我们能够回到过去,看看地球过去的样子。 在大数据时代,没有其他传统设备可以在全球范围内提供如此大量的实时数据。

In the past decades, many Earth Observing Satellite missions have come into existence, each one with certain objectives, some were driven by the Government entities and some were driven commercially by various private firms. Sentinel Program is one such program developed by European Space Agencies, whose mission was to replace the older generation of Earth Observation Satellites, as most of them were nearing their retirement. The earlier Sentinel missions (Sentinel-1 & 2) were monitoring Land and Ocean. The later ones (Sentinel-3, 4, 5, & 5P) have focused more on the air quality data, ozone and UV radiation. Landsat Program is one of the longest running Satellite programs, managed jointly by NASA and U.S. Geological Survey. They have had 8 missions till date, of which 6 older ones (Landsat 1 — Landsat 6) have been discontinued and Landsat 7 and 8 are currently on their mission, continuously acquiring new imageries. The data collection from Landsat allows researchers to analyze and track land use, and land changes over the time caused due to climate change, urbanization, wildfires, etc. It is also being used for monitoring crops, vegetation and forestry.

在过去的几十年中,已经出现了许多地球观测卫星任务,每个任务都有特定的目标,一些任务是由政府实体推动的,而某些则是由各种私营公司进行商业驱动的。 前哨程序 欧洲航天局开发的一种这样的程序其任务是替换大多数的地球观测卫星,因为它们中的大多数即将退休。 前哨兵的早期任务(前哨兵1和2)正在监视陆地和海洋。 后面的(Sentinel-3、4、5和5P)则更多地关注空气质量数据,臭氧和紫外线辐射。 Landsat计划是运行时间最长的卫星计划之一,由NASA美国地质调查局共同管理。 到目前为止,他们已经执行了8次任务,其中6个较旧的任务(Landsat 1-Landsat 6)已经终止,Landsat 7和8目前正在执行任务,并不断获取新图像。 Landsat的数据收集使研究人员可以分析和跟踪土地使用情况,以及由于气候变化,城市化,野火等导致的土地随时间变化的情况。它还被用于监测农作物,植被和林业。

First ever Artificial Earth Satellite launched was Sputnik 1. It was launched by Soviet Union on 4 October 1957. First ever Satellite Photographs of Earth were made on August 14, 1959, by the U.S. Explorer 6. First ever Satellite Photographs of the Moon were made on October 6, 1959, by the Soviet Satellite Luna 3, which was on a mission to capture the far side of the Moon.

人造卫星人造卫星1发射的第一颗人造地球卫星。 它由苏联于1957年10月4日发射。第一张地球卫星照片是由美国探险家6号于1959年8月14日拍摄的。 1959年10月6日,苏联卫星Luna 3拍摄了第一张月球卫星照片,该卫星的任务是捕获月球的另一侧。

This article is about exploring such Satellite data, artificially collected thousands of kilometres above without having any direct connection with the Earth (Remote Sensing is the term they use). It also talks about various functions, called as Raster Functions which are provided out-of-the-box, and creating custom Raster Functions as well.

本文是关于探索这样的卫星数据的信息,这些数据是人为地收集了数千千米以上的距离,而与地球没有任何直接联系( 遥感是他们使用的术语)。 它还讨论了各种功能,即开即用地提供的称为“ 栅格函数”的功能 ,以及如何创建自定义栅格函数。

影像层 (Imagery Layer)

Imagery layer is a matrix of cells or pixels storing pictorial information in an image or other remote sensing information that are captured by the satellites. For example, here is a dataset of locations of the active Volcanoes in the last 10,000 years, in and near the United States. This is available for displaying them on the map and analyzing them. Here is another dataset of the Average Annual area of Maize harvested in Africa during 1999–2001. This is mainly for monitoring the Maize harvestation.

图像层是单元或像素的矩阵,这些单元或像素将图像信息或其他遥感信息存储在卫星捕获的图像中。 例如,这是过去10,000年中美国及附近活跃火山位置的数据集。 这可用于在地图上显示它们并进行分析。 这是1999-2001年非洲玉米平均年收获面积的另一个数据集。 这主要是为了监视玉米的收获。

For this article, we are going to use Landsat-8 data, which is available here. The id in the url can be used to access the dataset. Above link gives some basic information about the imagery. The data source is updated daily with the latest imageries collected by the Satellite. The page lists 8 multispectral bands, and the out-of-the-box raster functions which make use of these bands for further analysis. The following code snippet shows how to access the data. I’m using ArcGIS API for Python to access the geological data.

对于本文,我们将使用Landsat-8数据,可在此处获得 。 网址中的ID可用于访问数据集。 上面的链接提供了有关图像的一些基本信息。 每天使用卫星收集的最新图像更新数据源。 该页面列出了8个多光谱波段,以及利用这些波段进行进一步分析的即用型栅格功能。 以下代码段显示了如何访问数据。 我正在使用ArcGIS API for Python访问地质数据。

The Landsat 8 orbits a single rotation around earth in 99 minutes, in a sun-synchronous orbit, to capture imageries in day sunlight. It takes 16 days for the satellite to cover one full rotation and take a whole picture of the earth. The code snippet below prints the imageries on a map, and also extracts the images captured on a single day, prints them as a dataframe and then shows them on the map.

Landsat 8在太阳同步轨道上绕地球旋转一周,绕地球旋转99分钟,以捕获日照下的图像。 卫星需要花费16天的时间才能旋转一圈并拍摄整个地球的图像。 下面的代码段将图像打印在地图上,还提取在一天中捕获的图像,将其打印为数据框,然后在地图上显示。

Image for post
Left: Picture of the Landsat data on a world map. The Landsat takes 16 days to make a full rotation and collect all the images from earth, this picture is the collection of all the 16 days images put on a basemap. Right: Picture showing the Imageries captured on a single day 2020–08–01. Each box is an image. Clicking a box shows the basic information about that particular image.
左:世界地图上Landsat数据的图片。 Landsat需要16天才能完全旋转并收集地球上的所有图像,此图片是放在底图上的所有16天图像的集合。 右:此图显示了在2020-08-01日单日拍摄的图像。 每个框都是图像。 单击一个框将显示有关该特定图像的基本信息。

特征层 (Feature Layer)

So this is how an Imagery layer looks like. Satellite takes a bunch of images across several days, which can be accessed as shown above. In this section, I have explored another type of Satellite dataset, known Feature Layer. It consists of records which have similar geographic features. For example, here is a dataset of all Glacial Lakes and Water Bodies in the Himalayan region, monitored during September, 2019. The data was collected by the satellites to monitor the floods caused by excessive rain, or the Glacial lakes formed by frequent landslides. This one is a feature layer for the Global Air Quality data from the ground-based monitoring stations. This dataset is compiled by the OpenAQ community on a global scale by aggregating station data from national networks of air quality. The layer is updated with the PM2.5 concentration each and every hour.

这就是图像图层的外观。 Satellite在几天内拍摄了一堆图像,可以如上图所示进行访问。 在本节中,我探索了另一类卫星数据集,即“ 要素图层” 。 它由具有相似地理特征的记录组成。 例如,以下是喜马拉雅地区所有冰川湖泊和水体数据集,数据集于 2019年9月进行了监视。这些数据是由卫星收集的,以监视因过度降雨而引起的洪水或由频繁的山体滑坡形成的冰川湖。 这是来自地面监测站全球空气质量数据的要素层。 该数据集由OpenAQ社区通过汇总来自全国空气质量网络的站点数据在全球范围内进行编译。 每小时更新一次该层的PM2.5浓度。

For this article, the selected feature layer is a simple one, a dataset of Indian States and Union Territorial level boundaries as it was in 2018. We use them on base maps for visualization. The dataset is available here. It has 4 layers, first one is the Indian country level boundary, second one is for the States and Union Territorial level boundaries, and the next two are District and Sub-district level boundaries. Here we are accessing the second layer. We can also use SQL like queries to filter out the data of our interest.

在本文中,所选要素图层是一个简单的要素图层,是2018年印度国家和联邦领土范围边界的数据集。我们在基础地图上使用它们进行可视化。 该数据集可在此处获得 。 它有4层,第一层是印度国家/地区级别边界,第二层是州和联邦领土级别的边界,其后两层是地区和分区级别的边界。 在这里,我们正在访问第二层。 我们还可以使用类似SQL的查询来过滤出我们感兴趣的数据。

Image for post
Accessing and querying the feature layer to get the boundaries for Delhi.
访问和查询要素图层以获取德里的边界。

This dataset has no free access available, so I’ve used my developer credentials to get access. I’ve queried the feature dataset to get the boundaries for Delhi, then accessed it’s geometry and visualized it on a GIS basemap.

该数据集没有可用的免费访问权限,因此我使用了开发人员凭据来获取访问权限。 我查询了要素数据集以获取德里的边界,然后访问其几何图形并在GIS底图上将其可视化。

栅格分析 (Raster Analysis)

So far we have selected our region of interest. Next, we are going to see some raster functions in action. First of all, a Raster is an image file format where the image is in the form of a matrix, and each cell of the matrix is an integer value for a pixel. A Raster Function is used to perform operations on the raster datasets. These are mostly used for analyzing the pixel values in the raster, or selecting those pixels which stand out more than the others.

到目前为止,我们已经选择了我们感兴趣的区域。 接下来,我们将看到一些运行中的栅格函数。 首先, 栅格是一种图像文件格式,其中图像采用矩阵形式,并且矩阵的每个像元都是像素的整数值。 栅格函数用于对栅格数据集执行操作。 这些主要用于分析栅格中的像素值,或选择比其他像素更突出的像素。

In the above code, I’m taking a look on the default raster functions available with the Landsat Imagery, using one of its properties named as rasterFunctionInfos. Here I’m going to put some of these raster functions on Landsat on-the-fly while accessing them, as this would take less time in comparison to first storing the images on the disk and then applying them.

在上面的代码中,我使用Landsat Imagery的属性之一(称为rasterFunctionInfos)来查看Landsat Imagery可用的默认栅格函数。 在这里,我将在访问它们时将其中一些栅格函数动态地放到Landsat上,因为与首先将图像存储在磁盘上然后应用它们相比,这将花费更少的时间。

In the previous section, I’ve accessed the geometry of Delhi from the feature layer, I’m going to use that on the Landsat Imagery and then put the raster function only on that particular region. Also, for some reason, I’ve queried the Landsat to get an imagery between 2015 to 2017 with less Cloud Cover. With a narrowed down output, I’ve selected a random date, and applied Natural Color raster on it, and then clipped with the geometry selected for Delhi.

在上一节中,我已经从要素图层访问了德里的几何图形,我将在Landsat影像上使用它,然后将栅格函数仅放置在该特定区域上。 另外,出于某种原因,我已查询Landsat以获得2015年至2017年之间的云量较少的图像。 使用缩小的输出,我选择了一个随机日期,并在其上应用了自然色栅格,然后使用为德里选择的几何形状进行裁剪。

Image for post

Natural Color displays the image very similar to the way we see it with our eyes. It displays only the visible Red, Green and Blue colors as they are. One thing to note here is, a part of Delhi is missing from the raster function. The reason is, I’ve selected a single imagery (with it’s objectID 2752790), and as the imageries are in the form of square boxes, it only captured some part of Delhi and left the remaining part.

自然色显示的图像与我们用眼睛看到的图像非常相似。 它仅显示可见的红色,绿色和蓝色。 这里要注意的一件事是, 光栅功能缺少德里的一部分 。 原因是,我选择了一个图像(其对象ID为2752790),并且由于图像为方形框,因此仅捕获了德里的一部分,而其余部分则保留了。

Cool, let’s play around, and see some more raster functions as well. And this time without using the query.

太酷了,让我们一起玩,还可以看到更多的栅格功能。 而且这次没有使用查询。

Image for post
Different Raster techniques were applied on the Landsat Imagery and then clipped with the geometry of Delhi. Top Left: Natural Color with DRA, Top Right: NDVI Colorized, Bottom Left: Agriculture with DRA, Bottom Right: NDMI Colorized
在Landsat影像上应用了不同的栅格技术,然后裁剪了德里的几何形状。 左上:DRA的自然色,右上:NDVI彩色,左下:DRA农业,右下:NDMI彩色

Natural Color with DRA, when applied on the imagery only shows the Natural Colors as shown above, except that it adjusts the contrast of the image by stretching the pixel values only at the displayed portion, using a technique called Dynamic Range Adjustment (DRA).

带有DRA的自然色应用于图像上时,仅显示如上所示的自然色,不同之处在于,它使用称为动态范围调整 ( DRA )的技术通过仅拉伸显示部分的像素值来调整图像的对比度。

NDVI Colorized is used as a vegetation index, makes use of NDVI algorithm. It compares the Visible spectrum of light with the Near-Infrared spectrum ((NIR — red) / (NIR + red)). Healthy vegetation reflects a larger part of Near-Infrared light, whereas Unhealthy vegetation reflects more Visible than Near-Infrared. So a crop field or a dense forest would have a higher NDVI as per the formula, possibly values ranging from 0.3 to 1, than Unhealthy Vegetation, for which the range would be 0.1 to 0.2. Lakes, Oceans, Rivers, and other water bodies tend to have very low NDVI, similarly, clouds or snow fields would have negative index values. In the image above, Green indicates High NDVI, Yellow indicates Lower and Red/Brown indicates the least NDVI values respectively.

NDVI Colorized被用作植被指数,利用了NDVI算法。 它将光的可见光谱与近红外光谱((NIR-红色)/(NIR +红色))进行比较。 健康的植被反射了大部分的近红外光,而不健康的植被反射的可见性比近红外光高。 因此,根据公式,农田或茂密的森林将具有更高的NDVI,其值可能在0.3至1范围内,而不健康植被的NDVI范围将在0.1至0.2之间。 湖泊,海洋,河流和其他水体的NDVI往往很低,同样,云层或雪原的指数值也为负。 在上图中,绿色表示NDVI较高,黄色表示较低NDVI,红色/棕色表示NDVI值最小。

Similar to NDVI, Agriculture with DRA is also used for monitoring agricultural crops. Bright green represents healthy vigorous vegetation, while dull green represents stressed or mature vegetation, and brown represents bare areas. NDMI, which stands for Normalized Difference Moisture Index is used for analyzing the water content on the land. Wetlands and Moist areas are blue, and dry areas in deep yellow and brown.

与NDVI相似,DRA农业也可用于监测农作物。 亮绿色表示健康的有活力的植被,而暗绿色表示受压或成熟的植被,而棕色则表示裸露的区域。 NDMI代表归一化水分指数 ,用于分析土地上的水分。 湿地和潮湿地区为蓝色,干燥地区为深黄色和棕色。

链接栅格函数 (Chaining Raster Functions)

Raster functions can even be chained with one another. In this section, I have explored how to write custom raster functions, by chaining the other ones — remap and colormap.

栅格功能甚至可以相互链接。 在本节中,我通过链接其他的remapcolormap探索了如何编写自定义栅格函数。

In the NDVI output above, we saw that different NDVI values represent different types of vegetations. Now, I am only interested in seeing the healthy vegetation and forestry, and filter out the remaining. To achieve this, we are going to remap the healthy vegetation NDVI values to 1, and forestry NDVI values to 2. Now, all the values in the image are either 1 or 2, other NDVI values are filtered out. To visualize this on a map, I need to transform these values to represent colors. So I’ve used a colormap again to show the healthy vegetation in light green and forests in dark green respectively.

在上面的NDVI输出中,我们看到不同的NDVI值表示不同类型的植被。 现在,我只希望看到健康的植被和森林,并过滤掉其余的树木。 为此,我们将健康植被NDVI值重新映射为1,将林业NDVI值重新映射为2。现在,图像中的所有值均为1或2,其他NDVI值被滤除。 为了在地图上可视化,我需要转换这些值以表示颜色。 因此,我再次使用了颜色图,分别以浅绿色和深绿色显示了健康的植被。

That’s it. Majority of the areas are filtered out by this approach.

而已。 该方法将大部分区域过滤掉了。

Image for post
Showing changes in greenery over the time for Delhi.
随着时间的推移,显示出绿色植物的变化。

Arcgis Timeslider widget is used to show the chaining of rasters. It allows us to observe the change in the greenery around the city over the time. Timeslider widget is used from ArcGIS Javascript APIs. The Javascript code is available here.

Arcgis Timeslider小部件用于显示栅格链接。 它使我们能够观察一段时间内城市周围绿化的变化。 从ArcGIS Javascript API使用Timeslider小部件。 Javascript代码可在此处获得

That’s it for this post. Will continue exploring more Satellite data, put analytics and ML. And possibly will write some more on this. Feel free to leave comments or suggestions for improvement.

就是这个帖子。 将继续探索更多的卫星数据,进行分析和机器学习。 并且可能会对此进行更多介绍。 随时留下意见或改进建议。

翻译自: https://medium.com/swlh/exploring-satellite-imagery-f640ce73f8a6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值