Working with Sentinel-1 data: pre-processing, georeferencing and exporting with SNAP

In this second part of the Sentinel-1 tutorial we will go through some simple steps to pre-process, georeference and export the data we downloaded using the procedures described in the previous post. To this end, we will use SNAP (Sentinels Application Platform), a free software package that you can download here.

We begin by downloading and installing the SNAP software package from the above mentioned webpage. You will have to enter your name and e-mail address, and will then receive a message in your mailbox with a link to download the executable. Choose the one that is right for your specific platform. Installation is straightforward, at least in Linux, the platform I use. Important: at the beginning of the installation check the boxes that tell the program to also install the toolbox for Sentinel-1.

Start SNAP. It is fairly rich in options, but the graphical user interface is intuitive and will be familiar to anyone who has worked with other GIS or remote sensing tools before:

SNAP (Sentinels Application Platform) menus.

SNAP (Sentinels Application Platform) menus.

In our example, we got two TIFF images of the same region. The difference between them is that they were acquired with different combinations of polarization in the transmitted and received signals (see the Sentinel-1 SAR user guide and file naming conventions). We access the data by targeting the entire ZIP file in SNAP. Once accessed, the dataset is shown in the panel in the upper left, but the images are not yet displayed. With a double click in any field we can access the metadata:


and then, by double-clicking in the label image, we get the image displayed in the main panel (images are big files and this can be a slow process, depending on your computer):

Displaying the raw image and its ground control points.

Displaying the raw image and its ground control points.

Now we see that this image is inverted. It is displayed according to the order of data acquisition, which is not necessarily according to a cartographic representation. To bring this image to something resembling a map we can georeference it using the ground control points embedded in the metadata. We do this by simply clicking on the menu: Raster and then Reprojection, and the following menu opens:

Reprojection dialogue.

Reprojection dialogue.

In this case we will reproject this image into its corresponding UTM zone (33 North). SNAP has the interesting feature that it can automatically find the zone for you. Before continuing, check the menu I/O Parameters and select output format you desire (I chose GeoTIFF), the name for the resulting file and the folder where it will be located. We then click Run and wait (long process again, over 2′ in my case!).

Our new file is the added to the file panel, and looks likes this:

Reprojected image of the Bay of Naples.

Reprojected image of the Bay of Naples.

We then proceed to cut the file, to fit the same area as in our Landsat tutorial. I prefer to do this with GDAL tools from the command line:

gdal_translate -projwin 431000 4539000 471000 4489000 Sentinel-1A_IW_GRD_HR_L1_reprojected.tif vesubius_sentinel.tif
Input file size is 25855, 22363
Computed -srcwin 20623 13330 4125 5156 from projected window.
0...10...20...30...40...50...60...70...80...90...100 - done.

We can then do some kind of simple magic and merge this subset with our visible Landsat image of Vesuvius and surroundings: -o vesuvius_landsat_sentinel_merged.tif -separate vesuvius.tif vesubius_sentinel.tif

the results look wonderful, although one has to be very careful because of the topographic distortion in the mountain slopes in the radar image:

False color composite of the Bay of Naples. Sentinel-1A (red), Landsat 8 band 4 (green) and Landsat 8 band 3 (blue).

False color composite of the Bay of Naples. Sentinel-1A (red), Landsat 8 band 4 (green) and Landsat 8 band 3 (blue).

SNAP includes the possibility of doing topographic correction, if a DEM is available. Something we can think for a future post. On the other hand, on relatively flat areas the details are neat and potentially very useful:


Note however, that the Landsat and Sentinel images combined here are from slightly different times, and therefore there are some obvious changes (highlighted in red), that are particularly noticed in the harbor area.

Of course, all these processes are meant as a very simple guideline on how to use data from the new satellite Sentinel-1A. Radar remote sensing is serious business and fairly unintuitive. Users considering using these data should dedicate serious effort to learn the gory details of this technology.

Happy working with Sentinel-1A data!

Working with Sentinel-1 data: searching and downloading images

Sentinel-1 is the first satellite mission of the ambitious Copernicus programme, an Earth observation and monitoring project planned and developed by the European Space Agency (ESA). When completed in 2020, the Copernicus programme will feature a rich and diverse family of Earth observing satellites continuously acquiring a wide range of data over oceans, land and ice. This family will provide vast amounts of data of great quality, an invaluable resource for individuals and organizations working in environmental research and monitoring. If this were not good enough news, ESA has decided that almost all satellite data will be made freely available!

Sentinel-1 is a constellation of 2 polar orbiting satellites, each carrying a single C-band synthetic aperture radar, aimed at obtaining continuous radar imagery of the Earth. Sentinel-1A was launched on 3 April 2014, while the launch of Sentinel-1B is planned for 2016. The Copernicus programme has recently been expanded with the launch of Sentinel-2A, a remote sensing satellite acquiring images in the visible and infrared portions of the spectrum, that is, an instrument in the same class as NASA/USGS Landsat.

We here have a look at how to search and download images acquired by Sentinel-1A. In the next post we will go through some pre-processing steps using freely available software provided by ESA.

We begin by opening the Sentinels Data Hub in a browser. Although the images are free, one has to register to have access to the data. If you do not have a login, this is the time to register and create one.


Once logged in, we click on the Search tab, the second from the left:


A map of the world will appear, on which we can zoom in to the region of interest. Once identified, we can draw a rectangle using the tool on the bottom left (the second one, from the left). As in our previous Landsat tutorial, we here use the Bay of Naples, Italy, as example:


After we press Search, a (possibly long) list of results is displayed. We can then browse these images and decide which of them suit our purposes best. Pay attention to date of acquisition and polarization mode. These can be read in the name of the files, which you can learn to decode here). Finally, downloading the image is just a matter of clicking on the corresponding disk icon (circled):


Note that these images are really big packages, about ~1 Gb, so downloading takes time. After uncompressing the file, the resulting directory looks like this:


The actual images are found in the folder measurement:


We are now ready to start processing these data. As with any other instrument, it is important to become acquainted with the technical details, which you can find here. In the next post we will have a look at how to do this using software provided by ESA.

Happy downloading!

Metaphors of complex systems. Notes on the adaptive cycle.

Almost every person, group and civilization has invented a set of narratives to explain and predict the behavior of the complex systems, natural and social, in which they spend their lives. This is hardly surprising. It comes almost naturally to any of us to invent explanations that describe the observed facts and give us a (perhaps illusory) sense of understanding. We have an innate ability for it. One might argue that this has something to do with survival, an interesting subject that is best left for another post.

Seen from the perspective of modern science, many of the myths and beliefs of earlier civilizations might now seem nothing more than lousy metaphors. Yet, it is interesting to see that it is at the level of metaphors that most of us make sense of the findings of modern science because for the vast majority of people the hard technical details are seldom accessible or understandable. A cursory glance at the futile “debates” of climate change possibly suffices to illustrate the point. I am also convinced that metaphors are the kind of qualitative conclusions that scientists use to summarize observations and results, and which make the starting point for reasoning on more elaborate theories. One might also argue that an asset of any good science communicator is the ability to create simple yet accurate metaphors of an otherwise complicated set of phenomena. So, yes, I like good metaphors and believe that they are useful when administered in wise doses and are not taken too far.

As far as metaphors of complex systems go, my favorite one is the adaptive cycle, an idea put forward and developed by Holling and colleagues [1], and summarized in the figure below (see also this page by the Resillience Alliance; and this wonderful article by Holling [2]).

Schematic representation of the adaptive cycle metaphor.

Schematic representation of the adaptive cycle metaphor.

In short, the adaptive cycle describes the time evolution of a complex system. Beginning with the exploitation (gamma) phase, generalist (or entrepreneurial) agents expand on a newly opened field, occupying niches and growing stronger, perhaps at the expense of other agents. Experimentation and rapid development are rife. As time goes, the realm in question becomes crowded, niches less readily available and competition hardens. In this conservation (K) phase, agents evolve to specialize in their respective niches, optimizing behavior and possibly increasing the connections and interdependence with other agents in the system. The conservative K phase might be very long and resilient, yet nothing last forever. Resources become depleted, or stored in forms and places where they cannot be easily accessed, novelty is extinguished as there is no place for change nor incentive for experimentation. The overconnected system sooner or later collapses, possibly catastrophically, and we thus enter the release (Omega) phase. In this phase, agents disappear or shrink, and the resources previously locked up by them become available again. The crash is bad for the agents that previously dominated the system, but the change opens the game for new or previously repressed agents. This is the reorganization (alpha) phase, where the landscape is open to a new colonization. A new cycle begins.

In general, the first two phases, exploitation and conservation, are often called the forward loop. The release and reorganization phases are often referred to as the backloop. Adaptive cycles in complex systems can even be conceived as forming a larger set in nested form, that is, hierarchies or levels operating at different scales in time, space, energy and matter. Holling and colleagues call this panarchy. As the reader can possibly imagine, interesting things happen to systems when the release phases of nested cycles in different levels occur at the same time.

Think of landscapes, ecosystems, organizations, economies, societies, and even personal stories. The world is rife with complex systems behaving in a pseudo-cyclic manner. The adaptive cycle has a striking resemblance to reality and even has a poetic lure [3]. Although not fully part of the current mainstream, nor even completely accepted, the notion of adaptive cycles is well grounded in decades of observations of ecologists, and the science of complex systems and dynamical systems. As far as metaphors go, I find the adaptive cycle a powerful tool for thought, a rich framework to understand current challenges in sustainability and for developing our adaptation to a changing world. Let’s hope then that we can understand and navigate the current backloop, embracing the panarchies and finding more harmonious ways of living under the conditions of our Earth.


[1] Gunderson, Lance H., and C. S. Holling, eds. Panarchy: Understanding Transformations in Human and Natural Systems. Island Press, 2002.

[2] Holling, C. S. 2004. From complex regions to complex worlds. Ecology and Society 9(1): 11. [online] URL:

[3] Turning the wheels of life. Marcus Antoninus.

A look at worldviews and their role in shaping our relationship with Nature

In this post we take a brief look at worldviews, the set of deeply rooted (and often unquestioned) attitudes and beliefs on which groups and individuals base decisions and opinions, and that basically guide their lives. The topic is relevant for understanding the backstage of our attitudes towards Nature and our fellow humans, including the all important question of how are we going to face the challenges of adaptation to the impending environmental changes in our world. As an interesting aspect of culture, the academic literature on worldviews is vast, and difficult to wade for this humble geoscientist. I have nevertheless found a very readable summary of these intricate matters in chapter 6 of the excellent book “Sustainability Science” by Bert de Vries [1]. What follows are some notes and thoughts on my reading of this chapter. The topic is of course very closely related to that of the previous post “Myths of Nature“.

What is important for us? How do we see the world? What guides our actions and decisions? Why do different people and groups take different paths when confronted with basically the same information? Answers to these questions lie at the root of what individuals and societies value, and what they make of themselves and their environments. According to de Vries (2012), the problem boils down to the multiplicity of views on answering the question “what is quality of life?“. The author argues convincingly that modern materialistic science cannot give a complete and unambiguous answer to this question, and that an answer must by necessity also consider and integrate subjective aspects. As in Maslow’s hierarchy of needs, a set of elementary needs such as air, water, food and shelter, in sufficient quantity and quality, must be considered. But on top of these come other less obvious but crucial aspects of life, such as belonging, spirituality, connection and a sane environment. The relative importance of these aspects are more contentious among different people than the first group and, although they can be systematized and described, they are possibly not easily made compatible.

One way to look at these problems is through the Cultural Theory of Risk, summarized in the figure below. The idea of the chart is to plot worldviews in the four quadrants determined by two main dimensions: group, in the horizontal, representing how much people submit to the collective rules of the group; and grid, in the vertical, representing how much people feel constrained by hierarchy in society.

Worldviews according to cultural theory of risk.

Worldviews according to cultural theory of risk.

In this scheme, a fatalist worldview is that held by a person or group that is convinced that their fate is decided by the upper hierarchies of society and which they have little or no chance of changing. Fatalists see Nature and society as capricious sources of the troubles they endure, and for them the strategy of choice is finding ways to cope with this. The fatalist worldview is therefore represented by a ball rolling on a flat landscape. Fatalist have no regard for Nature in the large. They just live in the present, trying to cope with whatever toil life throws at them.
The hierarchist worldview represents that of groups that place faith in the existence of ruling organizations, as the state, and that are confident that the elites deciding the fate of society will know where to place the limits of stability. This worldview is therefore represented as a ball rolling in a local low, in which wise management of organizations will maintain forever. Hierachists see large organizations and their rules as the necessary and desirable way to solve sustainability problems.
The egalitarian worldview is dominated by the faith in community values and an unstructured society. Egalitarians see a fair distribution of costs and benefits as a necessary requisite for dealing with the inherent instability of the world (social and natural). Accordingly, the metaphor is a ball rolling on top of a hill, a metaphor for an unstable reality. Egalitarians distrust large organizations and trust to find solutions to sustainable development in smaller, less structured groups.
Lastly, the individualists lack strong attachment to both groups or hierarchies. The individualist sees the world as a generous and stable realm, with plenty of room for manoeuvre and profit. The metaphor for this worldview is a ball rolling on a basin, always returning to the bottom after a disturbance. Individualists place faith in human inventiveness and freedom, and distrust organizations, both large and small.
There is an interesting theoretical dynamics attached to this theory, in which there is a proposed evolution of ideas, where people and groups change worldviews leading to societal changes. These metaphors are useful and enlightening in a sense, but are of course not free of controversy or shortcomings.

In chapter 6 of “Sustainability Science” de Vries (2012) proposes a different scheme to classify worldviews. The author grounds his proposal in social science research suggesting that societal values can be expressed in two different main dimensions: an horizontal axis representing a gradient of validity from the universal to the particular; and a vertical axis representing a gradient of validity from the mental/spiritual to the bodily/material. The upper two quadrants represent worldviews sharing a common appreciation for immaterial values. To the right, leaning the the side of the particular lies the subjective idealist worldview, to the left, the absolute idealism worldview. The lower two quadrants represent worldviews that value the material over the spiritual: a modernist objective materialist worldview, and a postmodernist subjective materialistic view. These worldviews are depicted in the figure below:

Worlviews according to de Vries (2012).

Worlviews according to de Vries (2012).

In this scheme, the subjective idealist worldview values the uniqueness of each person, and even sentient being, and believes that there is a diversity in the interpretation of truth, whatever that may be. Groups endorsing this worldview tend to value wisdom, cooperation and small scale economies. Ideas such as deep ecology find a committed audience within these groups.
The absolute idealist view values and enshrines a set of perceived universal truths, as possibly the interpretation given by some leader, or that written in a sacred book, and aims for a large scale social order under these values. Adherents to this worldview tend to place faith in government or spiritual organizations, seeking social justice and a moral imperative that they perceive as universally valid. Ideas such as large regulatory bodies find a natural home within this worldview.
The modernist objective materialist wordlview is the currently dominant system of values in modern societies, particularly in the West: namely the idea that there exists an objective material truth that we can find through experiment and that is outside any human system of beliefs. The progress and benefits, but also many of the sustainability problems of modern society largely stem from the application of this worldview on a global scale.
Finally, the postmodern worldview combines the same material objective view of the previous one, but without the collective sphere of application, accepting the plurality and diversity of individual values and views. Adherents to this view might not be environmentally engaged on a global scale, and perhaps focus only narrowly on the local environment around them.
As with the previous theory, there exists a proposal for an interesting historical dynamics in these four worldviews, in the way the might rise within a region, change and eventually collapse.

Of course, every attempt to classify how and what groups of people think is a treacherous intellectual adventure. Rarely a person or group embraces a single worldview all the time, as expressed above. Evolution and maturation of ideas are also part of life. It is therefore no surprise that research on worldviews is fraught with difficulties, controversies and shortcomings. I nevertheless believe that some of these ideas contain valuable aspects worth considering when we try to understand how people look at things and act on common issues, particularly global environmental problems. Think, for example, on how many times we ascribe some social behaviour to ignorance, indolence or hypocrisy, when it might likely be the expression of some tacit worldview. Perhaps, posing social problems as conflicting worldviews helps us widen our perspectives, enabling us to achieve a deeper appreciation of how people think, feel and act.

Confronting the challenges of sustainability and global environmental change will somehow involve reaching some sort of global understanding, consensus and dialogue among a plethora of worldviews, not all of them compatible. The prospect of such a consensus is bleak, but still there is no excuse for inaction. Perhaps it will suffice with a generous dose of good will? personally, I choose to believe that this is not an entirely lost cause, and like to think that having a serious look at worldviews can be definitely contribute to find solutions to our global environmental challenges. What do you think?

[1] De Vries, Bert JM. Sustainability science. Cambridge University Press, 2012.

Myths of Nature: a reflection on our tacit assumptions about the global environment

It is not difficult to realize that the world around us is vast and complex, its dynamics happening somewhere in the fascinating but paradoxical realm of complexity, beyond the easier to envision extremes of complete order or chaos. It is no coincidence then that one of the pleasures of life is to grasp some aspect of the Universe, be it through the cosmovision of some philosophy, or using advanced computer models.

In everyday life, though, we are not roaming the world hooked to a supercomputer with just the appropriate set of equations to understand every single situation happening around us. No matter how rational and knowledgeable we believe we are, we rely heavily on intuitive mental models, imprinted upon us by our education and culture, to make sense of life and express our impressions about it. We are forced to face, evaluate and act on complex situations based on more or less blurry ideas and incomplete information. These mental models almost always have some irrationality built into them, something that is particularly true when we assess the multidimensional and multiscale problems related to the global environment and sustainability.

These issues are nicely highlighted in “Panarchy. Understanding Transformations in Human and Natural Systems” [1], a thoughtful book edited by Lance H. Gunderson and C.S Holling, and published in 2002. In chapter 1 of this book “In quest of a theory of adaptive change“, Gunderson, Holling and Ludwig present a clever picture of some common mental models used to understand Nature and justify our approach to it. These authors call these five models “caricatures”, or “myths”, simple metaphors expressed as balls rolling in different landscapes and encapsulating our ideas about the dynamic behaviour of the world. None of these models is completely right, nor completely wrong, but all are just incomplete visions of one and the same world.


The first model, “Nature random” or “Nature flat“, expresses the worldview of a nature without feedbacks or nonlinearities. Changes in this world are driven by random causes, natural or political, and it is therefore a world where humans can do as they please to satisfy their needs, with no risk of triggering undesirable irreversible processes. The ball just moves in a flat terrain, going wherever some random force pushes it.

Nature stable” expresses the view that the world is largely in balance, a static world dominated by negative feedbacks equilibrating any change. This is the worldview that emphasizes maximum yields and believes that we can optimize things to navigate turbulent times.

Nature unstable” or “Nature anarchic” is the opposite worldview, where Nature is in delicate balance and extreme caution is needed not to push it away from it. This is the mental model where the precautionary principle dominates, and is the worldview held by many environmental organizations.

Nature Resilient” is a step forward in our understanding of Nature, it encompasses the previous three views. It relies on the lessons from the science of complex systems and dynamical systems applied to natural science. A resilient world is one in which several dynamical basins of attraction exist, where a given part of nature might be forced to move to a neighbouring basin by human intervention, or by changes in variables at larger scales of time and space. In this worldview, a perturbed ecosystem can flip to a different state, a move that is fully admissible under the prevailing environmental conditions, although possibly unknown and probably not pleasant for its inhabitants and users. An example of this is the often observed transition of grasslands to dry unproductive woodlands due to heavy overgrazing (Australia, Patagonia).

Nature evolving” is presented as the last frontier. It depicts an even more complex world than “Nature resilient”, one where the dynamical landscape changes with time. Gunderson, Holling and Ludwig convincingly argue that this view might be the one closest to our real world, and the one that we should be exploring to assess our impacts on Nature and evaluate our chances for long term survival in the Anthropocene. It is also the one worldview that is least accessible to our intellects, the one that poses the greatest challenges to understanding and prediction, where intuition might not longer serve us so well.

I believe that these models capture wonderfully well some of the most common sets of beliefs that people use to summarize and classify the behaviour complex natural systems. Even if they are just overly simple caricatures, they also show us that having a look at our often unchallenged mental models can be a worthy exercise that can teach us lessons on how to approach Nature in more harmonious ways.

Now, read again the myths. Which is the one closest to your beliefs?

[1] Gunderson, Lance H., and C. S. Holling, eds. Panarchy: Understanding Transformations in Human and Natural Systems. Island Press, 2002.

GIS in a nutshell

I have recently accepted the challenge of giving a very short introduction to GIS to an eclectic audience composed of highly educated professionals, albeit not versed in geospatial technologies or geography. This has prompted me to rethink the question “what is GIS?“, modifying accordingly my approach to teaching it from scratch. The idea was to achieve that beautiful blend of minimal elementary theory, for meaningfulness, and minimal sufficient practical knowledge, for usefulness, that enable any person to start producing simple results and delving further in the matter, if desired.

After some pondering, and many sketches, I finally came to this:

GIS in a nutshell

GIS in a nutshell

This is of course nothing else that the classical “a system to store, manipulate and visualize geographical data” stripped to its bare minimum.

In this scheme of things, we may start describing the two basic representations of geographical reality: vectors, for discrete features, and rasters, for continuous fields, for which different formats are used (in the most simple cases just ShapeFiles and GeoTIFFs). Here, I find convenient to introduce the concept of data as layers, which is essential for both processing and visualization in GIS.

We may then continue explaining that, for each layer, we usually have associated data, that are allocated in database tables called attributes. These can be used to store information, to choose a particular subset (spatial queries) or make operations on the layers. Vectors and raster data models have associated sets of spatial operations, and also operations for converting one type into the other. It is at this level that we most often use GIS to explore relationships in spatial data.

As all this makes sense only in the context of a particular coordinate system, a Spatial reference System (SRS), we may continue by introducing some essential cartography. I found that it is sufficient, and more convenient, to limit myself to the practical basics of a projection of interest for the audience (such as UTM), introduced merely as a coordinate system. I prefer this approach to the more classical lecture on geodesy, with the gory details of the geoid, ellipsoid and the myriad of projections and reference systems, which more often than not are just confusing for beginners.

Finally, I found relevant to say some closing words about where our data might come from: models, field measurements, regional surveys, GPS, satellite images, on-screen digitizing; and where our data might go to: maps, statistics, datasets as input for other studies, etc. This gives context and adds that tiny dose of practical meaningfulness that most people (that is, not GIS nerds) appreciate.

This was my brand of “GIS in a nutshell“, as of today. Which is yours?

Elementary atmospheric correction of Landsat images: haze correction via histogram minimum

Sensors operating in the visible and mid-infrared portions of the electromagnetic spectrum measure the fraction of the incoming solar radiation reflected at the surface. If the sensors are mounted on board satellites in orbit, the radiation coming up to the sensor does not entirely arises from the reflection at a particular location on Earth, but also partly due to the interaction of light with the atmosphere. Apart from the obvious case of a cloudy sky, absorption and dispersion of light by the atmosphere can be very important, even in conditions that we could consider clear sky.

The basic types of scattering are Rayleigh and Mie. Rayleigh scattering arises from the interaction between the light and the air molecules. it affects more the shorter wavelengths and is responsible for the blue color of the sky. Mie scattering arises from the interaction of light with particles, more importantly water drops, dust and pollution. Their combined effect on a satellite image is that, apart from the radiation reflected at the surface, we also get radiation coming from Sun light scattered in the atmosphere along the view path (path irradiance), and from Sun light scattered in the atmosphere in the direction of the surface element and reflected to the sensor (sky irradiance). Eventually we also get light scattered from the neighboring surface (neighbor irradiance).

Depending on our purpose these effects might be negligible and we can simply disregard them, as when measuring the extent of a feature. In other cases they may severely degrade the quality of an image, for example when we need to use the value of the surface reflectance. We might then need to apply atmospheric correction. In essence, this is about modeling the amount of radiation arising from the above described processes and subtracting them from the measured values. Atmospheric correction models, such as 6s, used in GRASS GIS, are based on radiative transfer theory and depend on information about current atmospheric conditions at the moment of image acquisition, be them measured (rarely) or assumed (most often). We here show a simple application of the haze correction method, a simple yet effective method that relies on image values and simple assumptions about the effects of the atmosphere for visible and near infrared Landsat bands. In the tradition of this blog, we focus on the fundamental aspects, leaving sophistication aside. As an example, we use a subset of a Landsat 8 image of the Bay of Naples, Italy, subject of previous posts.

The central assumption of the method is that all values in an image are shifted upwards due to the additive effects of scattering, and that the effects are uniformly distributed across the region covered by the image. Thus, if we could find the value of this upward shift in each band, we could simply subtract it from each pixel and correct the image. To find these values we plot histograms of the bands and inspect them to find the minimum significant values in each band. We begin with the reflectance in bands 2 (blue), 3 (green), 4 (red) and 5 (near infrared):

Histograms of reflectance in bands 2, 3, 4 and 5, of the Landsat 8 image path/row 189/32.

Histograms of reflectance in bands 2, 3, 4 and 5, of the Landsat 8 image path/row 189/32.

We clearly see that band 2, blue, has the largest shift in the histogram, the signature of Rayleigh scattering. Detailed inspection of the data for each histogram enables us to figure out the thresholds for the significant values:

band 2: 0.15
band 3: 0.11
band 4: 0.07
band 5: 0.04

We then subtract these threshold values from each band. We do this using grdmath, the NetCDF calculator of the Generic Mapping Tools (GMT) toolbox:

grdmath vesuvius_b2_refTOA.grd 0.15 SUB = vesuvius_b2_refTOA_atcorr.grd
grdmath vesuvius_b3_refTOA.grd 0.11 SUB = vesuvius_b3_refTOA_atcorr.grd
grdmath vesuvius_b4_refTOA.grd 0.07 SUB = vesuvius_b4_refTOA_atcorr.grd
grdmath vesuvius_b5_refTOA.grd 0.04 SUB = vesuvius_b5_refTOA_atcorr.grd

Note that, to do this, we first have to convert our GeoTIFF files to NetCDF using the GDAL utility gdal_translate. See previous posts. A comparison of our results, in band 2, with the uncorrected image readily shows the effects of “haze removal”:

Band 2 (blue), before (left) and after (right) removing the 'haze'

Band 2 (blue), before (left) and after (right) removing the ‘haze’

A comparison of false color composites, using bands 5, 4 and 3 (RGB), shows the same but in color:

False color composite (bands 5, 4 and 3 RGB), before (left) and after (right) haze removal.

False color composite (bands 5, 4 and 3 RGB), before (left) and after (right) haze removal.

Finally, we might calculate the Normalized Difference Vegetation Index (NDVI):

NDVI = \frac{\rho_{ir} - \rho_{r}}{\rho_{ir} + \rho_{r}}

using our corrected images, and compare with the results with the uncorrected ones:

Normalized Difference Vegetation Index (NDVI) calculated before (left) and after (right) haze removal.

Normalized Difference Vegetation Index (NDVI) calculated before (left) and after (right) haze removal.

Although there is no big visual difference, the image to the right is arguably better because the range of values in the corrected bands is larger, thus allowing us to reveal vegetation patterns more clearly.

This method is closely related to the Dark Object Subtraction (DOS) method, which is based on the identification of dark surfaces, clean lakes or asphalt, and assuming that their reflectances are only due to atmospheric scattering, subtracting their values from the image. The difference here is that we do not have to rely on the existence of such surfaces within our region. In a sense, haze removal by histogram minimum is technically equivalent to a linear stretch, where we cut a fraction of the lowest values, except that in this case we have a reasonable geophysical principle to rely on. Although not perfect, the haze removal by histogram minimum is a robust and simple method that is very reliable as a first approximation. In many cases it might be the only atmospheric correction we need.