Visualizing Built-Up Areas Using Satellite Images
By: Francis Adrian Viernes
Tags: Philippines, Python3, Data Science, Geospatial, Analytics

Big data is incredible! The way Big Data manages to bring sciences and business domains to new levels is almost sort of magical. It allows us to tap into a variety of avenues to access the information we normally do not access in order to gain fresh insights.

Satellite images are an amazing unconventional source to tap into for these fresh insights. Urban planners, environmentalists, and geospatial data scientists usually turn to satellite images for a big picture perspective and find insights from this exercise that brings their intended solutions to a whole new level.

Crash Course in Satellite Image Analysis a.k.a. Remote Sensing

If you ever came across the term “remote-sensing” in online articles, more likely this refers to the process of observing the earth using satellites. They’re called as such because they have the ability to make measurements remotely.

What do these remote-sensing instruments sense? The short answer is radiation. To be more technical, these instruments sense electromagnetic radiation.

These electromagnetic radiations vary in wavelength and frequencies and along this spectrum, there is a tiny portion our eyes can see known as the “visible spectrum”.

Electromagnetic Spectrum. From Bob — EDU Astronomy

This is where satellites come into play. Satellites that are orbiting the earth have lenses that can not only detect visible light but infrared wavelengths (nearest one to the visible spectrum) and microwaves.

When the light coming from the sun reaches the surface of the earth, every object reflects, absorbs, or transmits this energy differently. For example, green plants absorb all colors but reflect the green color. This is why green is the one visible to us when looking at plants. In some cases, the same type of plant may not be equally hydrated, and while this tiny difference will not be seen by the naked eye, the way these two plants reflect light will be different.

And as you know it, not all light reflected is visible.

Because surfaces reflect light differently, satellites have been used in studying vegetation, flood-prone areas and even analyzing the built-up areas of a place across the years.

While anyone can go and look up and download satellite images, they may not contain the data coming from the reflection which produces so many insights at once.

This is the data that we’re after. In the visualization that we will be doing later, the difference in color represents the difference in radiation being reflected. Since this is a multitemporal visualization (multiple time periods), the colors will represent surface of the built-up area across different time series for a place.

Preliminaries

To continue with this tutorial, make sure the following is done first:

Create an account with Google Earth Engine. This is free and will be authenticated in your Jupyter Notebook. Install Google Maps (pip install geemap) and Earth Engine (pip install ee). Initialize earth engine using ee.Initialize()

Dataset

For this exercise, we will access the “GHSL: Global Human Settlement Layers” dataset from the Google Earth Engine database.

The Global Human Settlement (GHS) framework produces global spatial information about the human presence on the planet over time. This includes physical settlement so this captures built-up area over time.

Let’s Code!

#Preliminaries

import geemap

import ee #After importing, it is important to initialize this.

ee.Initialize()

Initalize the folium map:

Map = geemap.Map(center=[15.222871,120.574440], zoom=7)

Map

Load the dataset and store it as an object.

#Note that ee.Image and ee.ImageCollection can both access datasets but you need to check which one is applicable for your intended dataset image = ee.Image('JRC/GHSL/P2016/BUILT_LDSMT_GLOBE_V1')

Select “built” band as we want the built-up area.

builtUp = image.select('built')

Define the Vis Parameters.

visParams = {

'min': 1.0,

'max': 6.0,

'palette': ['0c1d60', '000000', '448564', '70daa4', '83ffbf', 'ffffff'],

}

For this to make sense, let’s refer to what these min and max refer to:

Taken from Earth Engine Data Catalog

The min and max refer to the value column in the built Class Table above. For best viewing, you should choose min=1 and max=6. You do not want to leave out the water and land values as your visualization may not have a legible form for some readers that are not experts in reading maps.

The palette simply assigns a color to the class value. The suggested colors are seen in the built Class table. You can use hex codes but leave the “#’ out.

#.addLayer method adds this on top of your initialized Map above

Map.addLayer(builtUp, visParams, 'Built-Up Multitemporal')

This is how it will appear for the suggested colors.

Examining the Built-up Land Areas for the Philippines

Legend for the suggested colors

Alternatively, you can use color names directly for the palette. Make sure to arrange it so the first color matches Value 1 for the built Class table.

visParams = {

'min': 1.0,

'max': 6.0,

'palette': ['0c1d60', 'black', 'yellow', 'green', 'blue', 'white'],

}

Notice you can use the inspector function to check the value of a point:

Using color names for the palette. Use Inspector to show the value of the point

So from this exercise, you can see that most built-up areas are found on the capital of the Philippines and areas near it like Region III and Region IV-A. And you can likewise trace a pattern and answer the question “Where does development occur for a particular period?”.

There are other modifications that we can do for this such as limiting the visualization to simply one city or province.

With Google Earth Engine, you can access other datasets as well.

Feel free to explore the other datasets. Happy coding!

Click here to view the Jupyter Notebook for this one on Github.