Exploring Satellite Imagery

Girija Shankar Behera
The Startup
Published in
8 min readSep 1, 2020

--

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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

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).

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.

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.

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.

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.

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

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.

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.

--

--