Sie sind auf Seite 1von 12

Gap Fill for Landsat Images

Gap Fill para imgenes Landsat

2012
Luis Vega
Ingeniera Ambiental

On May 31, 2003, the Scan Line Corrector (SLC), which compensates
for the forward motion of Landsat 7, failed. Subsequent efforts to
recover the SLC were not successful, and the failure appears to be
permanent. Without an operating SLC, the Enhanced Thematic
Mapper Plus (ETM+) line of sight now traces a zig-zag pattern along
the satellite ground track (Figure 1). As a result, imaged area is
duplicated, with width that increases toward the scene edge

MODEL: Gap Fill for Landsat 7 images A correction of SLC-off


AUTHOR: Luis Vega Bustillos, Environmental Engineer
E-MAIL: luispvb@gmail.com
DATE: July 2012

About SLC-off
On May 31, 2003, the Scan Line Corrector (SLC), which compensates for the forward motion of
Landsat 7, failed. Subsequent efforts to recover the SLC were not successful, and the failure
appears to be permanent. Without an operating SLC, the Enhanced Thematic Mapper Plus
(ETM+) line of sight now traces a zig-zag pattern along the satellite ground track (Figure 1). As
a result, imaged area is duplicated, with width that increases toward the scene edge.

Figure 1. SLC Failure


The Landsat 7 ETM+ is still capable of acquiring useful image data with the SLC turned off,
particularly within the central part of any given scene. The Landsat 7 ETM+ therefore continues
to acquire image data in the "SLC-off" mode. All Landsat 7 SLC-off data are of the same high
radiometric and geometric quality as data collected prior to the SLC failure.
The SLC-off effects are most pronounced along the edge of the scene and gradually diminish
toward the center of the scene (Figure 2). The middle of the scene, approximately 22
kilometers wide on a Level 1 (L1G, L1Gt, L1T) product, contains very little duplication or data
loss, and this region of each image is very similar in quality to previous ("SLC-on") Landsat 7
image data.

Figure 2. Complete Landsat 7 scene showing affected vs. unaffected area.

An estimated 22 percent of any given scene is lost because of the SLC failure. The maximum
width of the data gaps along the edge of the image would be equivalent to one full scan line,
or approximately 390 to 450 meters. The precise location of the missing scan lines will vary
from scene to scene.
SOURCE: USGS. (2010). SLC-off Products: Background. Obtenido de USGS - Landsat Missions:
http://landsat.usgs.gov/using_Landsat_7_data.php

Algorithms for the correction


After reviewing various methodologies proposed by the USGS and by independent authors
raised some difficulties in the application. Among the methods outlined is the suggested by the
USGS to use a mosaic of at least 2 images of the same sector.
The main obstacle to using the above method was implemented in software, but a group of
scientists can adapt the method to work. Although in my opinion It doesdnt produce good
results.
The methods can be found at:
http://landsat.usgs.gov/sci_an.php

The method developed


First, the Fill Gap model was conducted in a practical and simplified way. I chose to work in
ArcGIS Desktop Platform 9.3 10 for the experience to be had with this software.

The algorithm that is created is shown in the following flowchart:


The model must be executed many times as needed

Gap Filling

The Original Raster can be any Landsat band or any clip

Original Raster:
band.tif

Build attributes
table

No

Identify invalid pixcels


Pixel=0

Yes

Erase pixel = 0
(SetNull)

Keep pixel value

Raster witouth
values 0"

Interpolate
values with
valid data
(Filter LOW)

Smoothed
Raster

No

Filling gaps:
Original Raster= 0

Yes

Leyend:
Take the value
of Raster
original

Take the value


of Smoothed
Raster

Start
Process

Condition
The Filled Raster can be used like a new original Raster

Filled Raster
Result

Description of the algorithm:


1. Select one to one Landsat bands that will be filled
2. The selected band will be our "Original Raster", we may even make a cut in our area of
interest to optimize model performance.
3. Create the table of attributes for the Original Raster, is important because we are working
with ArcGIS.
4. By the condition "value = 0" delete cells with values of 0, using the tool SetNull
5. We proceed to use the Neighborhood tools, in this case we use the Filter LOW. This will
create a Smoothed Raster that fills the gaps with an average cell.
About the use of Filter LOW. - This point is one of the most important model, here are filled
the gaps of the image, the same can use different tools from which are Block Statistics,
Statistics Focal these two options fill with statistics (means, medians, etc..). Filter LOW was
chosen because of my appreciation is the one with better results, in part because it makes
processing of data on the type of interpolation. Despite my choice can still testing the use of
the Statistics Tools (Block or Focal).
6. Finally replace the cells with value = 0 of the Original Raster to Raster Smoothed values,
using the tool condition "Con"

The Gap Fill in ArcGis 9.3 10


Part1

Part2

Part3

NOTE: If you find another Neighborhood tools (Focal or Block Statistics) best suited to your
project you must replace Filter and Filter (2) by your new choice.

The Link
You can download the model here:
https://rapidshare.com/files/1632645659/GapFill.tbx
Or you can send me a e-mail to luispvb@gmail.com or nomoxxx@gmail.com

Annex: How Filter Works


SOURCE:
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=How%20Filter%20works
Filter calculates new z-values by centering the specified 3 x 3 filter over each input
raster cell. As the filter is passed over each cell, the center is assigned the sum of
the products of the cell value and the corresponding operand in the 3 x 3 filter.

Consider the following nine raster cells and 3 x 3 filter:

The output raster cell at the center of the filter (Z5) is assigned a z-value based on
the following formula:

Z1*F1 + Z2*F2 + Z3*F3 + ... + Z9*F9

When an input raster cell on the edge of the filter has a NoData value, the z-value
of the cell is substituted for the missing z-values.

On the edges of the raster, the filter lies partially outside the raster. When this
occurs, the z-value of the cell at the center of the filter is substituted for the
missing z-values.

Low

The LOW option is an averaging filter. The nine z-values are weighted
equally to calculate the value of the center cell.

The sum of the weights for the low pass filter is 1.000. This ensures that the
general elevation of the surface is maintained after smoothing.

The 3 x 3 filter for the LOW option is:


1/9

1/9

1/9

1/9

1/9

1/9

1/9

1/9

1/9

(where 1/9 is approximately = 0.11111...)

In the following example, the input raster has an anomalous data point
caused by a data collection error. The averaging characteristics of the LOW option
have smoothed the anomalous data point.

Example
This example shows the resulting raster generated by FILTER with the LOW option
on a demonstration raster. Partial listings of the input and output raster cell values
are provided for comparison. Note how the NODATA locations are processed.
2.000

3.000

4.000

5.000

6.000

2.000

3.000

4.000

NODATA

6.000

2.000

3.000

4.000

5.000

6.000

2.000

30.000

4.000

5.000

NODATA

1.000

2.000

2.000

3.000

NODATA

After the low pass filter is performed, the values on the output raster are:

2.333

3.000

3.889

5.000

5.778

2.333

3.000

3.889

NODATA

5.778

5.333

6.000

6.889

4.889

5.778

5.000

5.556

6.444

4.333

NODATA

4.667

5.111

5.889

3.111

NODATA

MODELO: Gap Fill para imagines Landsat 7Una alternativa de correccin al SLC-off
AUTOR: Luis Vega Bustillos, Ingeniero Ambiental
E-MAIL: luispvb@gmail.com
FECHA: Julio de 2012

Sobre el SLC-off
Las imgenes del satlite Landsat 7 a partir del 2003 sufre del fallo en su sistema SLC, el SLC
es la parte del sensor ETM+ que compensa el movimiento hacia adelante del satlite durante la
adquisicin de las imgenes. Sin el SLC, el rea escaneada por el sensor delinea un patrn de
zigzag provocando un bandeado o efecto gaps en la imagen, como se muestra a continuacin:

Una vez revisados varias metodologas propuestas por la USGS y por autores independientes
surgieron algunas dificultades para su aplicacin. Entre los mtodos destacados est el
sugerido por la USGS para usar un mosaico de por lo menos 2 imgenes del mismo sector.

El principal obstculo para utilizar el anterior mtodo fue la implementacin en un software;


sin embargo un grupo de cientficos puedo adaptarlo para que el mtodo trabaje. A pesar de
esto no se obtuvieron buenos resultados.

El mtodo creado

En primer lugar, el modelo Gap Fill se llev a cabo de una forma prctica and simplificada. Se
eligi trabajar en la plataforma ArcGis Desktop 9.3 10 por la experiencia que se tena con este
software.

El algoritmo que se cre se muestra en el siguiente diagrama de flujo:


Relleno de
gaps

El mdulo se puede realizar las veces necesarias:

El Raster Original es una banda del sensor Landsat o a su vez cualquier


recorte de la banda de tipo raster:

Raster Original:
banda .tif

Construir tabla
de atributos del
raster

No

Identificacin
de datos no vlidos
Pixel=0

Si
Borrar datos de
pixeles = 0
(SetNull)

Mantener valor
de pixeles

Raster sin
valores de 0

Interpolar
valores con los
datos vlidos
(Filter LOW)

Raster
homogenizado

No

Rellenar gaps:
raster original = 0

Si

Leyenda
Tomar valor del
Raster
Homogenizado

Tomar valor del


Raster original

Inicio
Proceso

Desicin
El Raster Rellenado puede utilizarse en un nuevo proceso sin ningn
problema, entonces vendra a ser el nuevo Raster Original

Raster
Rellenado

Resultado

Descripcin del algoritmo:


1. Seleccionamos una a una las bandas Landsat que sern rellenadas
2. La banda elegida ser nuestro "Original Raster", inclusive podramos hacer un recorte del
nuestra rea de inters para optimizar el rendimiento del modelo.
3. Creamos la tabla de atributos para el Original Raster, es importante porque estamos
trabajando con ArcGis.
4. Mediante la condicin "value=0" borramos las celdas con valores de 0, para esto aplicamos
la herramienta SetNull
5. Procedemos a usar los Neighborhood tools, en este caso usaremos la herramienta Filter
LOW. Esto nos crear un Smoothed Raster que rellena los vacos mediante un promedio de
celdas.
Aclaracin sobre el uso de Filter LOW.- Este punto es uno de los ms importantes del modelo,
aqu se rellenan los gaps de la imagen, para lo mismo se puede utilizar distintas herramientas
entre las cuales estn Block Statistics; Focal Statistics estas dos con opciones de relleno
mediante estadstica (medias, medianas, etc.). Se escogi Filter LOW porque segn mi
apreciacin es el que presenta mejores resultados, en parte porque hace un tratamiento de
datos del tipo de interpolacin. A pesar de mi eleccin se puede seguir probando el uso de los
Statistics Tools (Block or Focal)

El Modelo dentro de ArcGis 9.3 y 10


Parte1

Parte2

Parte3

NOTA: Si se identifica una opcin de relleno dentro de Focal o Block Statistics que se adapte
mejor a su rea de estudio pueden incorporarla al modelo reemplazando Filter y Filter (2) por
la nueva herramienta

Los links de descarga:


https://rapidshare.com/files/1632645659/GapFill.tbx
Si por alguna razn se desactiva pueden escribirme un a e-mail a luispvb@gmail.com or
nomoxxx@gmail.com

Das könnte Ihnen auch gefallen