You are on page 1of 69

ODMP – Topographic Model Final Report – Issue 1.2.

1 Page 1

Topographic Model of the


Okavango Delta

Okavango Delta Management Plan

Final Technical Report


November 2004
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 2

Final Technical Report Geographic Resource Analysis & Science Ltd.


c/o Institute of Geography,
Okavango Delta Management Plan University of Copenhagen
DK-1350 Copenhagen K
Creation of a Topographic Model of the Denmark
Okavango Delta using remote sensing
Tel: +45 35 32 25 78
Fax: +45 35 32 25 01

e-mail: gras@gras.ku.dk
Web: www.gras.ku.dk

Client Client’s representative

Scanagri Anne V. Andersen


Project: Internal reference:
DK.391.02 - ODMP 50029

Authors Date
Mikael Kamp Sørensen 12 November 2004
Lars Boye Hansen
Lotte Nyborg
Michael Schultz Rasmussen
Approved by
NUMBER of pages: 68
Michael Schultz Rasmussen
Issue: 1.2.1

Key words Classification


Topographic Model, Elevation Model,
Remote sensing, Altimetry, Landsat, Open
Tasseled Cap, Water level variation
Internal

Proprietary
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 3

Table of Contents

1 Introduction ........................................................................................................................ 7
2 Terms of Reference............................................................................................................... 9
3 Data ................................................................................................................................. 10
3.1 Elevation data ........................................................................................................... 10
3.1.1 Radar Altimetry Data .............................................................................................. 10
3.1.2 Shuttle Radar Topography Mission (SRTM) data .......................................................... 10
3.2 Remote Sensing Data ................................................................................................. 11
3.3 GIS Data .................................................................................................................. 12
3.4 Hydrological Data....................................................................................................... 12
3.5 Reference Elevation Data ............................................................................................ 13
3.5.1 Department of Surveys and Mapping Benchmarks ....................................................... 13
3.5.2 DWA / DSM Benchmark Survey ................................................................................ 13
3.5.3 UCT GPS data ........................................................................................................ 14
3.6 Field reconnaissance .................................................................................................. 14
3.6.1 GRAS mission to the Delta ....................................................................................... 14
3.6.2 Reference GPS recordings........................................................................................ 14
3.6.3 Reference Aerial Photographs................................................................................... 14
3.6.4 Expert botanical advice ........................................................................................... 15
4 Methods ............................................................................................................................ 16
4.1 Introduction to the Conceptual Model............................................................................ 16
4.2 Validity of the Wetness Index as in indicator of water level .............................................. 16
4.3 Model structure ......................................................................................................... 20
4.4 Evaluation of the originally proposed approach ............................................................... 23
4.5 Validity and assumptions of the model .......................................................................... 23
4.5.1 Reference elevation data ......................................................................................... 24
4.5.2 Calibration period ................................................................................................... 24
4.5.3 Topographic information above highest water level ..................................................... 24
4.5.4 Water level variations ............................................................................................. 24
4.5.5 Test conditions....................................................................................................... 24
5 Data processing ................................................................................................................. 25
5.1 Quality assessment of the altimetry data sets ................................................................ 25
5.1.1 Geoid and datum.................................................................................................... 25
5.1.2 Adding original data to the merged model .................................................................. 25
5.1.3 Adding data in the Panhandle area............................................................................ 26
5.1.4 Adding SRTM data in the Boteti outlet area ................................................................ 26
5.1.5 Geo-reference test ................................................................................................. 27
5.1.6 Test of small scale topographic sensitivity .................................................................. 28
5.1.7 Reducing the random errors in the altimeter measurements ......................................... 32
5.2 Remote sensing data .................................................................................................. 33
5.2.1 Rectification .......................................................................................................... 34
5.2.2 Tasselled Cap Transformations ................................................................................. 34
5.2.3 Data calibration ..................................................................................................... 35
5.3 Interpolation of Water Level Variations.......................................................................... 37
5.4 Model script implementation ........................................................................................ 39
5.5 Model maintenance .................................................................................................... 40
5.5.1 Inclusion of additional Landsat scenes ....................................................................... 40
5.5.2 Inclusion of additional water level gauge data............................................................. 40
6 Results ............................................................................................................................. 41
6.1 Model Presentation..................................................................................................... 41
6.2 Topographic Model accuracy ........................................................................................ 42
7 Discussion ......................................................................................................................... 46
8 Conclusion......................................................................................................................... 48
9 Acknowledgements ............................................................................................................. 49
10 Bibliography ................................................................................................................... 50
11 APPENDIX A ................................................................................................................... 51
11.1 Topographic Model script documentation ....................................................................... 51
11.1.1 Calculating Tasseled cap wetness index ................................................................. 51
11.1.2 DryLand & OpenWater mask generation ................................................................. 52
11.1.3 TCW Normalization ............................................................................................. 53
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 4

11.1.4 Calculating the Topographic effect......................................................................... 54


11.2 Topographic Model scripts ........................................................................................... 55
11.2.1 Tasseled cap calculation script .............................................................................. 55
11.2.2 DryLand_&_OpenWater_mask_generation.............................................................. 60
11.2.3 TCW Normalisation Script .................................................................................... 64
11.2.4 Topographic Effect Script ..................................................................................... 66
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 5

List of acronyms and abbreviations

BGW Brightness, Greenness and Wetness


CSL Chips Scripting Language
DEM Digital Elevation Model
DSM Department of Surveys and Mapping
DWA Department of Water Affairs
ETM Enhanced Thematic Mapper (Landsat 7 radiometer)
FFT Fast Fourier Transformation
GPS Global Positioning System
GRAS Geographic Resource Analysis & Science Ltd.
IBC Interactive Box Classification
ICA Independent Component Analysis
RMS Root Mean Square
TC Tasseled Cap
TCT Tasseled Cap Transformation
TCW Tasseled Cap wetness
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 6

Executive Summary

This report documents the creation of a Topographic Model of the Okavango Delta based on a
combination of existing topographic data, new remote sensing data and information from
water level gauge stations in the area. The anticipated approach was based on contour
extraction of the water-land boundary from time series of satellite data. However, this method
has to be rejected due to delays in the delivery of the hydrology data that were required and
because of the inadequate spatial and temporal coverage of the water level data.

Instead a different method was set up based on enhancing an aerial altimetry elevation model
using a combination of water level information and a remote sensing wetness index derived
from time series of satellite images. The concept of the model is that the water level at any
given location is weighted according to the frequency of flooding at that location and then
subtracted from the base elevation data set. This assigns a relatively lower elevation to areas
that are permanently flooded than areas that are less frequently flooded. This information is
generated for each 30 x 30 metre pixel in the model. By using time series of satellite images
for deriving the wetness index, the temporal dynamics of the delta are reflected in the
Topographic Model making it more robust.

The interpretation of remote sensing data was supported by a mission to the Delta where field
trips and aerial reconnaissance provided valuable reference information. Furthermore, expert
botanical advice was obtained on vegetation classes and their associated topography.

Various steps of data validation and pre-processing were performed. On the base elevation
data set, quality assessment was carried out. It was shown that the amount of noise in the
data set was of a magnitude that prevented the extraction of small scale topography.
Accordingly, these small scale variations were removed through filtering and instead generated
from the remote sensing data.

The Tasseled Cap Wetness band that is used for assigning the weight to the water level
variation was able to discriminate different vegetation and land cover classes based on
different degrees of wetness. This wetness is related to the water depth at each location.
Based on five different temporal coverages of the delta, an average wetness was computed for
each pixel. Through an interpolation of water level gauges in the Delta, a generalised map of
water level variations was created. These two data layers were combined and subsequently
subtracted from the base elevation in order to derive a Topographic Model including small scale
topographic variations.

An automated scripting language has been used for generating the model. All the scripts are
provided and these make it possible to maintain and update the model if necessary.

The model was tested against three different geodetic benchmark data sets. Based on a total
of 153 reference points, the RMS error is app. 1 metre, significant at the 99% confidence limit.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 7

1 Introduction
The development objective of the Okavango Delta Management Plan is integrated resource
management for the Okavango Delta that will ensure its long term conservation, and that will
provide benefits for the present and future well-being of the people, through sustainable use of
its natural resources.

In line with the development objective, the immediate objectives for the two Danida supported
components are:

• A comprehensive, integrated management plan for the conservation and sustainable


use of the Okavango Delta and surrounding areas
• Existing data, information and knowledge available in appropriate formats and a timely
manner to support the development and initiated implementation of the Okavango
Delta Management Plan
• Improved water resources planning, monitoring and evaluation in the Okavango Delta,
based on an enhanced capacity of the Department of Water Affairs

A vital tool in the development of a wetland management plan is hydrological modelling in


order to plan, monitor and evaluate the state of water resources both from an ecosystem point
of view as well as for monitoring the impact of future water abstraction demands or effects of
climate changes in the area. In this respect, a Topographic Model is the basis for hydrological
modelling. Terrain models are conventionally created using photogrammetry based on aerial
photographs. Alternatively, it may be derived from remote sensing data sets; either from
satellites with stereo-looking capabilities such as Spot or Ikonos or from airborne or
spaceborne microwave systems such as Synthetic Aperture Radar (SAR) sensors. However,
these methods are expensive and their accuracy is in most cases not suitable for low-relief
wetland areas. For high-resolution optical data such as Ikonos, accuracies of approximately 2
metres may be achieved at a price of approximately 100 € per square kilometre. With SPOT an
accuracy of 10-20 metres is possible at a cost of 2.3 €/km2 while ASTER has better
specifications at 7-10 metres RMSE (root mean square error). With spaceborne SAR sensors,
accuracies of 10-25 metres may be achieved at prices around 1-10 € per square kilometre. An
airborne lidar survey would provide the best accuracy (0.5 m) but the price is currently 400-
500 € per square kilometre.

GRAS has proposed a method that is well suited for an area like the Okavango Delta, where
the dynamics of water and vegetation create very dynamic hydrological conditions. The
method is based on the well established relation between vegetation community, topography
and variations in the local water level. Much of this information can be derived from satellite
images and thus provide elevation data as a derivative parameter of analyses of vegetation
and soil and vegetation wetness. Rather than using a snapshot in time (eg. one coverage of
either aerial photography or satellite images), the present approach addresses the dynamic
environment of the Okavango Delta, where temporal information is used to capture variations
in water level in time and space and hereby reflect the topography. This would not be possible
using any of the conventional methods. Another advantage of the model is the use of 30 metre
resolution data which is major step forward in modelling the hydrology of the Okavango Delta.

The applied method is composed of four main steps:

1) Map the overall topography of the delta comprising a major cone-shaped alleviation fan
with the apex in the upper parts of the Delta. At present, the best topographical
information available is the aerial altimetry survey that has been carried out in
connection with an aeromagnetic survey of the Western Ngamiland, central Okavango
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 8

and Maun regions. This data set captures the overall topography of the delta but is not
accurate enough to depict the small scale variations.
2) Map the permanently dry areas and areas with permanent water using time series of
Landsat ETM data.
3) Map the transitional vegetation communities in between the permanently dry and
permanently wet areas from time series of Landsat ETM data. Using a physically based
wetness index to assign an average wetness value for each pixel in the image.
4) Use general conventional data on water level observations to assign weights to the
wetness index information.
5) Adjust the general topography using a combination of the wetness index and the water
level variations.

A draft version of the model was delivered in April 2004 along with a draft version of the
report. In accordance with the Terms of Reference specified in Section 2, the draft model was
evaluated by the DWA hydrological modelling team. Several comments were also prepared by
and by Dr. Piotr Wolski from HOORC. Finally, an independent review was conducted by
Professor Charles Merry of the Univesity of Cape Town. The recommendations set out by
Professor Merry in this review were included in the final version of the Topographic Model.

Major changes in the current model (version 1.2) include improved transitions between the
different altimeter models, geoid corrections and the inclusion of additional data, primarily
more data from the original altimeter models but also some SRTM data in order to cover the
areas of Lake Ngami and the Boteti River.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 9

2 Terms of Reference
The following Terms of Reference were agreed between GRAS and Team Leader Alasdair
Macdonald. Note that the deadlines were changed due to general delays in the ODMP.

A topographic model, or digital terrain model, will be set up of the Okavango Delta, extending
to the wetland area defined by the Ramsar Convention. The primary purpose of the
Topographic Model will be to set up the surface water component of the Integrated Hydrologic
Model of the delta. The following are the detailed specifications for the model.
1) The model will be prepared in line with the approach outlined in the Consultant’s
Contract with Danida, Appendix A, Enclosure 2: Topographic Survey. Additional
appropriate data sources will be used wherever available to complement and fill
gaps in the methodology. These sources will include aerial surveys.
2) The model will be prepared as a grid, with a grid size of 30m or smaller. The
accuracy of each individual grid point will be assessed during the pilot stage:
±1.0m or better, with a 90% confidence level, is anticipated.
3) Particular attention will be given to the land area within the maximum and
minimum water level, as identified within the period from 1990 to 2002. Within this
area, it is anticipated that the accuracy of the grid will be ±0.5m or better, with a
90% confidence level. This will be assessed during the pilot stage.
4) The approach to setting up the Topographic Model will be drafted by end October
2003. The approach will be detailed by the end of December 2003 for inclusion in
the Final Inception Report.
5) A preliminary Topographic Model will prepared by end January 2004, for the set up
of a preliminary surface water model. Based on the preliminary model set up and
comments from the Team Leader, a Working Model will be prepared by end
February 2004.
6) The preliminary model will be presented in Gaborone to the ODMP, and a training
course given to DWA staff in the methodology used to set up the model, and the
use to be made of the model. The presentation will include plan views, three
dimensional views, simulated overflights. A copy of the presentation will be given to
DWA.
7) GRAS will be available up to the finalisation of the Integrated Hydrologic Model to
address questions on the accuracy of the model which may be thrown up in the
course of development of the hydrologic model, and to make up to two revisions as
deemed necessary based on the results of the hydrologic model. Minor corrections
will be dealt with on an ad hoc basis.
8) A final report on the model will be made after this stage, expected to be in June
2004. The report will include suggestions on how the model may be improved given
more survey resources and information.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 10

3 Data
Various data sources were used for the generation of a Topographic Model of the Okavango
Delta. According to the project Steering Committee, it was agreed that all data should be in
the Cape Datum and not WGS84. Accordingly, all data sets mentioned in the following sections
were transformed when necessary.

3.1 Elevation data


3.1.1 Radar Altimetry Data
An aeromagnetic survey of Western Ngamiland was kindly made available by the Department
of Geological Surveys in Lobatse, Botswana. The primary objective of the survey was to
provide aeromagnetic survey data to enable detailed geological mapping as an incentive to
private sector mineral exploration and Government ground-water exploration programmes. As
a residual product, terrain elevation was also measured using radar altimetry with a
contractual requirement of 5 metre vertical accuracy. The survey was performed by three
different operators. The first survey was carried for the Maun area in 1995 by AeroData
Botswana Ltd., while the second survey was performed by the French company CGS in 1996-
1998 and focused on most of Western Ngamiland and the Maun area, though excluding the
central Okavango Delta. This gap was filled by Sefofane Geophysics in 2001-2002, who also
produced a merged version of the three data sets, covering the entire delta

All three operators have used roughly the same instrumentation and methods (Sefofane,
2003; CGS, 1999; AeroData Botswana, 1995). The details are shown in Table 1.

Table 1: Aerial Survey Specifications


Line spacing 250 m
Line directions 345º and 165º
Tie line spacing 2500 m (1250 m for CGS)
Tie line directions 75º and 255º
Sensor height 80 m
Magnetometer sample rate 10Hz at approximately 170 km/h

Especially the Sefofane data set appeared to have a substantial amount of noise in it. Personal
communication with the project manager, Mr. Luc Antoine of Sefofane, revealed the antenna
had erroneously been placed under the wing of the aircraft rather than the logical position
under the belly of the aircraft. This means that many of the small scale variations in the
elevation data are attributable to the roll, pitch and yaw of the survey aircraft rather than the
actual small scale topography of the terrain.

The altimeter covers almost the entire working areas of the ODMP. However, a few small areas
along the perimeter of the area are not covered, and these areas appear as “no data” in the
final model.

GRAS has performed quality analysis and enhancement on the digital elevation data (refer to
section 5.1).

3.1.2 Shuttle Radar Topography Mission (SRTM) data


Throughout the work process, GRAS have analysed the option of including SRTM data into the
Topographic Model of the Okavango Delta. Since 2002 data has been commercially available
through the German Aerospace Centre (DLR) and GRAS purchased a small set over the Delta
in 2003 to investigate the possibility of supplementing the altimeter DEM. However, the data
was too noisy. The first issue of the global SRTM dataset for Africa was made publicly available
on April 1st 2004. These SRTM data was used to fill a small gap in the background DEM around
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 11

the eastern borders of the Ramsar area, as the altimeter DEM was not available for the entire
Ramsar area. The total area of SRTM data included was 248 km2.

3.2 Remote Sensing Data


Satellite images from the Enhanced Thematic Mapper (ETM+) sensor on the Landsat 7 satellite
have been used for generating the Topographic Model. The data are available from 1999 and
onwards, coinciding with the calibration period of the hydrological model. Landsat has 6
multispectral bands at a spatial resolution of 30 metres. Furthermore, a panchromatic band at
15 m resolution and a thermal band at 60 m resolution are available. The technical
specifications of the ETM+ sensor are shown in Table 2. Four Landsat scenes are needed to
cover the delta (see Figure 1).

Table 2: Landsat ETM+ technical specifications

Band Number Spectral Range (microns) Ground Resolution (m)


1 .45 to .515 30
2 .525 to .605 30
3 .63 to .690 30
4 .75 to .90 30
5 1.55 to 1.75 30
6 10.40 to 12.5 60
7 2.09 to 2.35 30
8 (pan) .52 to .90 15

Figure 1: Map showing the Ramsar area (black outline) and the four Landsat scenes (WRS-2) needed to cover the study
area along with their location identification numbers (WRS-2 system).
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 12

In total, 20 Landsat scenes were used for the Topographic Model. Some of these images were
available from the Harry Oppenheimer Research Centre (HOORC) in Maun, while the rest of the
scenes were purchased.

Table 3 shows a list of the satellite acquisition dates. The dates were chosen to maximise the
contrast between the images and to include as much variation as possible in water extent and
level. The selection of data was based on general information about the degree of flooding and
from analyses of quicklooks (low resolution sample of the actual scene) of every potential
image in the Landsat ETM+ archive in order to obtain the best possible combination of images.
The period

Table 3: List of Landsat data used in the creation of the Topographic Model

Path/row Date
174/73 03-01-02
174/73 03-04-00
174/73 10-10-99
174/73 11-07-01
174/73 22-06-00
174/74 03-01-02
174/74 03-04-00
174/74 10-10-99
174/74 11-07-01
174/74 13-09-01
175/73 02-11-99
175/73 19-06-02
175/73 19-08-01
175/73 25-12-01
175/73 28-03-01
175/74 06-10-01
175/74 28-03-01
175/74 01-09-00
175/74 30-08-99
175/74 10-04-00

It was originally intended to use elevation data from the Shuttle Radar Topography Mission
(SRTM) as a source of cross referencing the base elevation. However, this data set was not yet
processed for the central delta and the general accuracy of this data set is not suitable for a
low-relief environment.

Furthermore, it was intended to make use of the recently created ortho-photographs of the
Okavango Delta. However, the late delivery of this data set (March 2003) made it impossible
to use the photographs in the model development.

3.3 GIS Data


Shapefiles indicating the location of villages, roads and main river networks in the Okavango
region were available from the DWA. However, the accuracy of the files was only moderate,
but they were useful for general orientation in the Delta.

3.4 Hydrological Data


A number of hydrological stations exists in the area, recording either or both discharge and
water level. The DWA and the DSM intended to relate the benchmarks associated with these
stations to the national datum, but unfortunately this campaign was several months delayed.
Therefore, GRAS has mainly used the information about relative variations in water level at
each site, in line with the change in methodology.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 13

3.5 Reference Elevation Data


Two sets of benchmark information were available for testing the final Topographic Model.
Figure 2 shows the distribution of the benchmark information.

Figure 2: Map showing the locations of DSM benchmarks (green dots) and the recently completed levelling of
benchmarks associated with water gauges (red dots).

3.5.1 Department of Surveys and Mapping Benchmarks


DWA digitised DSM benchmarks established in the 1970ies and converted these to ArcView
shapefiles. Most of these areas are placed in connection with the road network around the
Delta, although data are available north and south of Chiefs Island in the Delta. Approximately
57 of these points are available in the central Delta. The accuracy of this data set is reported
to be high. A few of these points are located on 1.2 metre high plinths whereas most of the
points are located on bolts 2 centimetres above the terrain surface.

3.5.2 DWA / DSM Benchmark Survey


In connection with the recent survey of hydrological stations and gauge boards, the DSM
recalibrated the benchmarks placed near the hydrological installations. Most of these points
are placed in the central Okavango Delta (see Figure 2). App. 44 of these points are available
in the Delta. The accuracy of the points is reportedly within 0.1 m.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 14

3.5.3 UCT GPS data


A GPS dataset from the University of Cape Town was made available by Professor Charles
Merry. This data set was measured over the period 1994-1998. The measurements were made
as part of a research project led by the department of Geology at the University of the
Witwatersrand, GPS measurements were made by staff of the department of Geomatics
at the University of Cape Town at some 50 points in the delta, almost all of them on small
islands close to water (14 of the points were at water level on floating platforms anchored to
papyrus). According to Professor Merry, the estimated accuracy of the orthometric heights is in
the order 1-2 centimetres.

3.6 Field reconnaissance


3.6.1 GRAS mission to the Delta
The GRAS remote sensing expert visited the Delta in August 2003 with the objective of
collecting relevant data and performing reconnaissance in the field. The trip gave a good
insight into the variability of the delta and enabled the collection of important data sources to
be used in the model. GPS points with corresponding field photographs and observations were
recorded for reference. These data were stored in an interactive ArcView application for easy
access and reference in order to support the interpretation of satellite images. The application
has been installed at the DWA.

3.6.2 Reference GPS recordings


During the field visit, app. 350 GPS points were recorded in the field, accompanied by digital
photographs and a site description. These data were collected during a field trip to the Moremi
Wildlife Reserve and a boat trip on the Kwai and Maunachira river networks. Information was
also collected along lower reaches of the Boro – Thamalakane system. Finally, many of the
points were collected during an overflight of the delta. This reference information will be
available for future maintenance and training in the model construction.

3.6.3 Reference Aerial Photographs


During a flight over the Delta on August 15th 2003, the Hydrology Component team gained a
valuable insight into the various hydrological and vegetation regimes of the delta. Concurrent
GPS recordings and digital imagery made up an important ground truth data set for
interpretation of the remote sensing data. Examples are provided in Figure 3 and Figure 4. An
ArcView application was generated linking the GPS locations of photographs with the actual
images files. In this way it was easy to interactively compare ground truth information with the
satellite imagery.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 15

Figure 3: Example of the joint use of GPS recordings (green marks), digital photographs and satellite imagery for
reference purposes from an area dominated by Papyrus. The papyrus area is flooded in the upper left part of the satellite
image, but not in the corresponding photograph. This is because it was not possible to obtain Landsat ETM+ at the time
of the field visit due to technical problems with the Landsat 7 satellite.

Figure 4: Example of the joint use of GPS recordings (green marks), digital photographs and satellite imagery for
reference purposes from a grassland island in the Delta.

3.6.4 Expert botanical advice


Professor William Ellery from the University of Kwa-Zulu Natal in Durban, who has intensively
studied the vegetation of the Okavango Delta, assisted in the interpretation of satellite images.
Via email correspondence and telephone conversations, Professor Ellery commented on remote
sensing images and clarified problems in the interpretation of the diverse vegetation.
Furthermore, Professor Ellery provided information on the relationship between main
vegetation types and relative elevation in the area.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 16

4 Methods
4.1 Introduction to the Conceptual Model

The conceptual and theoretical foundation of the Topographic Model is referred to as the
Conceptual Model and it is described in the following sections. The remote sensing assessment
of presence or absence of inundation (where inundation is defined as free water or inundated
vegetation) over time is the key information used to create of the Topographic Model. For each
grid cell (or pixel) the history of inundation is being recorded from time series of Landsat
satellite data, from where the dates of the flooding as well as the frequency of flooding for
specific periods in time will be retained. The originally proposed approach of using vegetation
classification has been further refined and developed. A good relation between the main
vegetation types and the frequency of inundation has been established based on the Tasseled
Cap Index which is a physically based index derived from time series of satellite images.

Combined with information about the local water level variations across the delta, the wetness
index is used to derive the small scale topography which is then subtracted from a layer
containing the general topography from the aerial radar altimetry survey of the delta. A major
advantage of the changed approach is that the degree of inundation is not categorised into
broad and ambiguous vegetation classes and in this way disregarding within-class variations in
water level. Instead a fuzzy membership value (gradual transitions from dry to wet) based on
the physically based wetness index is assigned to each pixel and in this way the degree of
information extracted from the remote sensing data is increased.

It is important to note that the information on water level variations derived from gauges in
the delta is not used as a measure of the local water depth. The water level variation is
exclusively an auxiliary layer that has no actual meaning in itself, but is being used to adjust
the value of the water level map.

It is equally important to be aware of the fact that no information on the bathymetry can be
derived from the permanent swamps. In these areas, the model only reflects the change in
water volume over time. In these areas auxiliary information such as field surveys or modelling
and interpolation has to be included.

4.2 Validity of the Wetness Index as in indicator of water level


Several methods are available for condensing or extracting information or alternatively for
reducing the dimensionality of multispectral data sets. The most common methods are
statistical approaches such as Principal Component Analysis (PCA) or physical methods such as
band ratios and vegetation indices. The Tasseled Cap Transformation (TCT) is an example of a
physically based method that rotates a multispectral data set and creates three orthogonal
planes: Brightness (B), Greenness (G) and Wetness (W). While the output is similar to that
generated from a PCA, a substantial difference between the Tasseled Cap transformation and
the PCA is that the Tasseled Cap method employs fixed coefficients that can be applied to any
scene across dates. The BGW bands are directly associated with physical scene attributes and
are therefore easy to interpret and relate to land cover, vegetation and moisture.

The Brightness band is a weighted sum of all six reflective bands and can be interpreted as the
overall brightness or albedo at the surface. The Greenness band primarily measures the
contrast between the visible bands and near-infrared bands and is similar to a vegetation
index. The Wetness band measures the difference between the weighted sum of the visible and
near-infrared bands and the mid-infrared bands. As TM bands 5 and 7 (near and mid near
infrared) have been shown to be sensitive to moisture and water absorption, the Wetness band
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 17

can be interpreted as a measure of soil and plant moisture (Huang et al., 2002). Clear water
stands out clearly in the Wetness band (see Figure 5).

Figure 5: Examples of Landsat ETM+ images (left) and corresponding TCT images (right). The upper image pair is from
April 2000, the lower image pair is from August 2001. In the TCT image, the red band is Brightness, green is Greenness
and blue is Wetness. Note that wet or moist areas are dominated by blue colours. In the original Landsat images to the
left, the red band is channel 3 (red), the green band is channel 4 (near-infra red) and the blue band is channel seven
(mid infrared).
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 18

Figure 5 illustrates an example of a TCT on Landsat images. Two different images are shown in
order to demonstrate the temporal stability of the method. The contrast in the TCT image is
significantly increased. The Wetness band, displayed in the blue channel of the RGB image,
clearly outlines varying degrees of flooding, from the deep blue colour representing free water
surfaces to the diffusely bright blue colour representing moderately moist soil conditions.

a) Wetness (Y) vs. Brightness (X) for August 2001 b) Wetness (Y) vs. Greenness (X) for August 2001

c) Wetness (Y) vs. Brightness (X) for April 2000 d) Wetness (Y) vs. Greenness (X) for April 2000

Figure 6: Scatter plots of Tasseled Cap Transformations of two Landsat ETM+ images. Wetness is on the ordinate and
Brightness or Greenness is on the abscissa.

The concept model proposed in the creation of the Topographic Model assumes a linear
relation between the Wetness Index and the degree of flooding for each point in the image. In
order to investigate this, a classification test was performed based on the following procedure.
Three different image subsets were identified from different environments in the delta; 1) the
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 19

central region near Kwihum Island, 2) a seasonal floodplain around the Boro River south of
Chiefs Island and 3) a permanent swamp around the Maunachira River around Xobega Lediba.
For each of these three locations, training areas for the most important land cover or
vegetation classes were digitised, and the TCT statistics plotted for each class. In order to test
the temporal stability of the index, images from April 2000 and August 2001 were used for all
three examples. The results from the Boro case are shown in Figure 6.

The Wetness component is plotted along the ordinate in all the illustrations. Figure 6a and
Figure 6b are from August 2001, while Figure 6c and Figure 6d are from April 2000. The
figures show that the Wetness band provides a good separation of the different classes. For
some of the similar classes, i.e Dry Floodplains and Shallow Inundated Floodplains, some
confusion is evident. However, this is probably attributable to the fact that these two classes
are difficult to define separately as the spectral as well as the physical boundaries between
them are fuzzy. Even though the Brightness and Greenness bands contribute to the separation
of classes, it was decided to use only the Wetness index, as this parameter adequately
describes the difference in moisture for different classes. In this way the index value is directly
related to the wetness on the ground. If Wetness, Brightness and Greenness were all used, a
much more complex decision model would be necessary, making the process less transparent.

Initially it was attempted to classify the different vegetation communities using the
multispectral information from the Landsat data. It was revealed that a high degree of
inconsistency existed between Landsat data from the same area but from different points in
time. Even though a multi temporal spectral dataset would be able to identify a number of
vegetation classes exposing the same dynamic in response to the water fluctuations, an
equally high number of reference observations would be needed to match this information with
water levels. Using a physically based parametric approach circumvents the ambiguity
introduced with a classification into “hard” categorical classes. The physical approach is equally
additive in nature and incorporates the variations in wetness over the course of the year.

Both the spatial and the temporal tests show that the Wetness index is capable of separating
different moisture conditions. Instead of performing a traditional supervised classification of
the remote sensing data, the Wetness index is a useful surrogate that is able to discriminate
the main types of vegetation characterised by different moisture regimes. The use of multi-
temporal data ensures a better discrimination between vegetation classes. For instance it is
often difficult to separate riparian woodlands from papyrus when the forest is in full foliage.
However, by including images from November and December when the phenology of the two
areas is different, it is possible to separate these areas.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 20

Figure 7: Colour composite images of Duba Island with the location of the profile line used to extract data. Left: 321 color
composite, Landsat ETM from 19-08-2001. Right: 742 color composite, Landsat ETM from 19-08-2001.

0.9

0.8

0.7

0.6

0.5

0.4
021199
190801
0.3
251201
Average
0.2

0.1

0
3000 2500 2000 1500 1000 500 0 -500

Figure 8: TCW values extracted along the profile line shown above. Values have been extracted from 3 different TCW
images from different dates and from the average TCW found as an average of all 5 dates included in the model.

4.3 Model structure

The overall compilation of the Topographic Model is based on the following data layers:

1) General topography derived from the radar altimetry data


2) Information on water level variations obtained from hydrologic stations and the
literature and
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 21

3) Time series of flooding derived from wetness index calculations

Figure 8 describes the conceptual layout of the model (refer to section 5.4 for the technical
details of the data processing flow). First, basic processing is performed on the Landsat
images. This processing involves geometric rectification, calibration and calculation of the
Tasseled Cap Wetness index. Next, the average value of the Wetness component derived from
each image is computed. In the current case, 5 different images have been used for each of
the four satellite scenes that are needed to cover the Okavango Delta. This means that each
pixel in the resulting average Wetness component is the average of 5 different images from 5
different times of the year.

The approach can be illustrated with a conceptual figure of a floodplain in the seasonal swamp
(Figure 9). The river has running water during the entire year and therefore has a high
Wetness value in all the images and accordingly a high average value. In contrast, areas that
are a distance away from the river are only flooded in the peak of the flood season, resulting in
a low average Wetness Index. The Wetness index is scaled between 0 and 1, with 0 being
completely dry and 1 being completely wet.

Next, the average wetness image is multiplied with a map of local water level variations. This
product will determine how much should be subtracted from the reference elevation data set
(the altimeter survey). In the example shown in Figure 9, the water level variation is constant
because the floodplain cross section shown covers a very small area. If the annual water level
variation is 1 metre, this means that the river should be 1 metre lower than the reference
elevation (1 metre of water level variation times a wetness index of 1). In contrast, areas that
are dry all the year should be at the same level as the reference data set (1 metre of water
level variation times a wetness index of 0). Areas in between will be 0.4 m lower than the
reference if the wetness index is 0.4, 0.8 metre lower if the average wetness index is 0.8.

Finally, the new layer comprising the water level variation multiplied by the average wetness
index is subtracted from the reference elevation data. In this way the small scale topographic
variations are subtracted from (i.e. engraved into) the original data set. For the permanent dry
areas outside the Okavango Delta but within the Ramsar area the wetness index method is not
applicable and these areas contain only information from the altimetry data set. The method is
also not valid in the permanent swamps, but only covers the areas between highest and lowest
flood.

The creation of the topographic model has been done using a decision model. This allows
flexibility and future inclusion of new improved or additional data if required. A generalised
illustration of the processing flow is found in Figure 8. The advantages of the approach can be
summarised in the following way:

- The original approach was based on a land cover classification of the Okavango Delta.
However, in an environment as complex as the Okavango Delta, creating a good land
cover classification is an extremely challenging task that requires substantial field data.
Furthermore, when performing a traditional classification, a lot of generalisation is
involved as dynamic, multispectral data (6 bands each containing 8 bit data) is
generalised into a few land cover classes. In a diverse area like the Okavango Delta,
achieving a classification accuracy of 85 % would be a good result, but this would still
mean that 15 % of the areas would be misclassified and thus assigned an incorrect
elevation.

- By using the TC Wetness Index instead, much more information from the original data
set is retained because the original data is quantified into a 8 bit image (256 bins or
possible values) rather than only 5-10 bins (the number of land cover classes that can
be identified without intensive field campaigns).
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 22

Input data:
Landsat ETM+ data

Geometric rectification to
base image
(UTM zone 34S, Cape datum)

Image normalisation:
Interactive classification of
permanent wet and permanent
dry areas based on the Wetness
Index. Normalisation based on Input data:
mean values. Water gauge measurements

Tasselled Cap transform and Estimation of annual


data stretch on the Wetness water level variation
band

Creating a map of a water level


Averaging up the time series of variation image based on hydro
the Wetness Index data and/or literature

Coupling the time series of


Wetness Index with the
general water
level variation map
Input data:
Altimetry model of
the general Delta
surface

Topographic Model

Figure 8: Flow chart for the setup of the Topographic Model

- The approach of vegetation classes would have involved a complex decision model for
linking different land cover classes with different degrees of flooding and water level
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 23

variations. With the present approach, the final compilation of the model is much
simpler as it does not have to take account of many possible combinations of classes
for each pixel over the year. It only has to consider the relative wetness and in this way
the model structure is much easier to understand and update in the future.

Max water level


Permanently dry

Floodplain

River

Figure 9: Theoretical example of a floodplain. The wetness index ranges from very high near the river to very low near
the permanently dry areas. The areas in between have intermediate wetness values.

4.4 Evaluation of the originally proposed approach


In the original proposal for generating a topographic model of the Okavango Delta, a number
of solutions were presented. These have been evaluated in the inception phase. Originally, one
of the main methods to derive information about water level (and hence topography) was the
extraction of contours delimiting dry and wet areas from time series of satellite images to
derive isolines of flooding as the extent of flooding is a good indicator of the local topography.
The absolute elevation of each contour line was to be established from hydrologic stations.
However, this approach had to be changed because of the limited presence of unambiguous
shorelines along with a substantial delay in the delivery and reduced quality of the required
hydrology data. The hydrological data appeared to be of poorer quality than expected,
especially because of large gaps in the time series in recent years.

Furthermore, the required registration of benchmarks associated with the hydrological stations
was also delayed by several months, making it impossible to use this data set in the work
process.

The use of remote sensing data for generating bathymetric information as indicated in the
proposal was not considered feasible as this requires the bed to have a uniform colour and
appearance. Furthermore it requires calibration field data. The actual bed conditions in the
delta are very heterogeneous, i.e. substantial variations in submerged bed vegetation,
sediment. organic material etc.

4.5 Validity and assumptions of the model


The Topographic Model comprises the entire Ramsar zone defined by the ODMP Steering
Committee. Most of this area is covered by the altimetry data set. In the core Delta region, the
wetness index method has been applied to extract the small scale topography.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 24

4.5.1 Reference elevation data


The quality of the altimeter data set is described in section 5.1. The data set was collected
during a period of various months, during which time variations in the water level must be
expected. It is not possible to correct for this effect, and it may have an influence on the
accuracy of the final model. However, the radar altimetry data set was filtered to remove noise
and mainly depicts the overall topography of the delta so the effect of this temporal effect is
negligible.

4.5.2 Calibration period


Landsat ETM+ data from the period 1999-2002 are used. This period was chosen for two main
reasons. First of all, the hydrological model is being calibrated against the last five years of
hydrological data and accordingly the same period has been chosen for the acquisition of
satellite images. The range contains years with moderate inundation (1999, 2002) as well as
years with more intense flooding (2000 and 2001).

Second, Landsat ETM+ data are available from 1999 and onwards. The quality of Landsat
ETM+ is by far superior to its predecessor, Landsat TM and therefore the period from 1999 to
present is particularly attractive. Data from May 2003 and onwards had to be discarded due to
technical problems with the Landsat ETM+ sensor. The selection of images within the period is
assumed to be representative of the water extent in the images.

4.5.3 Topographic information below lowest water level


No bathymetric data was available for the generation of the Topographic Model. This means
that the model does not represent the bottom profile of lagoons and channels. In the
permanent swamps the wetness index will be high (0.8 to 0.9) but the water level variation
should be low (0.2 m to 0.5 m, depending on the nature of the area and on the interpolation of
water level variation data), giving a topographic effect of 0.15 - 0.45 m that will be subtracted
from the altimeter model. In this way it is ensured that these areas have a lower relative
elevation than the immediately adjacent areas (i.e. islands or seasonal swamps having a lower
wetness index).

4.5.4 Topographic information above highest water level


The altimeter elevation model has only been modified in the areas between highest and lowest
flood. Therefore areas above the maximum water level in the calibration period are exclusively
covered by the altimeter model. Even though the small scale topography is not correct in the
altimeter model, the overall topographic dimensions are assessed to be correct and
consequently the altimeter model above highest water level can be used for the purpose of
hydrological modelling.

4.5.5 Water level variations


An important data set in the creation of the Topographic Model is the interpolation of water
level variations across the delta. The number of gauge level positions across the delta is very
moderate. However, based on expert advice the interpolation is expected to be representative
of the conditions in the delta (Ellery, pers. comm.)

4.5.6 Test conditions


Three different data sets have been used to test the accuracy of the model. The accuracy of all
three test data sets is reportedly very high (in the order of centimetres according to
communication with the Department of Surveys and Mapping).
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 25

5 Data processing
5.1 Quality assessment of the altimetry data sets
A number of tests were performed on the altimetry data set in order to assess the quality of
the data. The tests included georeference tests, small scale topographic tests and finally
filtering to extract the large scale topography of the delta.

5.1.1 Geoid and datum


The documentation on the background elevation model produced by Sefofane did not contain
information about how the conversion from GPS ellipsoidal heights to orthometric heights was
done. This was sought to be clarified through personal communication with the Sefofane
project leader, Dr. Luc Antoine, who claimed that the conversion was performed using a
gravimetry data set (Poseidon) from the Department of Geological Surveys. However, in
GRAS’s ongoing validation of the model there was a clear trend in the spatial distribution of the
residuals comparison the model with test points. The slope of these error residuals coincided
with the slope of the EGM96 geoid in the area and this finding was presented to Sefofane
several times. When Professor Charles Merry also concluded this based on a different data set
(from the University of Cape Town), Sefofane acknowledged that it was likely that a geoid
correction had not been performed at all.

GRAS then performed the correction based on the EGM96 geoid which is the most accurate
geoid model that is available for the area. It was done by subtracting the geoid grid and then
re-calibrating the model by adjusting the absolute level of the model relative to the calibration
points from the University of Cape Town.

5.1.2 Adding original data to the merged model


As mentioned in section 3.1, three different surveys have been performed over the delta.
According to Mr. Luc Antoine, project manager of the recent survey conducted by Sefofane
Geophysics, offset problems between the three models made it difficult to combine the
information. However, using a forced fit procedure the problem was resolved.

In light of the discoveries of the geoid and datum uncertainties in the merged model from
Sefofane, a detailed study of each of the three different altimeter models was performed. By
inter-comparing the models and including the available benchmarks it was discovered that
especially the southern part of the merged altimeter model from Sefofane had been affected
by the forced fit. The fitting between the model covering the central part of the delta (the
Sefofane model) and the model covering the Maun area was most likely done without the
correct geoid correction of the models. Difficulties in merging the two models was also
reported by Dr. Luc Antoine through personal communication.

A correction of these uncertainties was done by merging the models again AFTER the correct
geoid correction had been made. With the geoid corrected merged model (the merged
Sefofane model) as reference, the southern part was exchanged with the original data from
either the Ngami model produced by CGS (merge area shown with black outline in Figure 10)
or the Maun model produced by AeroData Botswana Ltd (merge area shown with blue outline
in Figure 10). A simple gradient merge function was used to avoid sudden elevation gaps due
to different variance in the three datasets. A simple gradient merge function was applied
where the northern boundary gave 100% priority to the northern-most dataset and the
southern boundary gave 100% priority to the southern-most dataset. In the middle of the
overlap area a 50% priority was given to each dataset. A transition zone of 600 meters was
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 26

used to merge the datasets. An analysis after the merge showed the datasets were merged
together giving a smooth transition.

5.1.3 Adding data in the Panhandle area

The data set that was merged by Sefofane Geophysics does not include the entire Panhandle
region, even though this area was covered by the CGS survey. In order to include this, the
Panhandle region was added from the original model from CGS Survey (Figure 10 illustrates
the area added to the model – the area outlined with a red shape). An overlap area of 600
meters was used to merge the data to avoid sudden elevation gaps due to different variance in
the two datasets. A simple gradient merge function was used here as describe in the previous
section optimized to the hydrological zone. Some minor artefacts may therefore be found in
the dune area in the north-east corner of the merge area. However, this will have no effect on
the hydrological modelling, An analysis after the merge showed the datasets were merged
together giving a smooth transition in the delta region.

Figure 10: Location of the merge areas used to correct artefacts from the original merging of models without the proper
geoid correction. Blue shape denotes the area taken from the Maun model produced by AeroData Botswana, Black and
red shows the area were the original data from the CGS model has been used and the green shape shows the area were
SRTM data was used to complete the model in the Boteti area. The dotted area shows the extent of the central delta.
The background colours indicate the elevation range from high (blue) to low (red).

5.1.4 Adding SRTM data in the Boteti outlet area

The data set that was merged by Sefofane Geophysics did also not include the small area
south of Maun with outlet of the Boteti river. Since the area was also missing in the Maun
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 27

model by AeroData Botswana it was decided to add SRTM data in the area. After smoothing
the SRTM data to avoid the majority of the noise in the data the area was merged with the
large model by the simple merge gradient method described previously. In this case also, the
analysis showed a smooth transition between the datasets after the merge.

5.1.5 Geo-reference test


The basic idea behind this test is that the steepest areas in the model would follow geological
structures, rivers etc. and therefore would be coincident with patterns detectable from the
satellite data. A comparison was made between the Landsat ETM+ mosaic from April 2000 and
slope values derived from the DEM. The areas with the steepest slopes were identified by a
simple map query were all values above 0.8 degrees were selected. Due to the very flat nature
of the delta only 0.1 percent of all pixels in the area are characterised by a local terrain slope
of more than 0.8 degrees.

Figure 11 : Location of areas used for georeference check of the merged DEM based on altimeter measurements.

Four test areas in the delta-area were selected for visual examination (Figure 11). The result
shoved that the general accuracy of the locations of specific topographic features are
acceptable. Due to the noise in the altimeter DEM it was not possible to detect the small scale
relief and it was therefore not possible to determine the absolute accuracy either. However,
the overall pattern from the slope map follows structures detectable in the satellite data (see
examples from the four areas for details in Figure 12).
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 28

Test area 1: Northwest corner Test area 2: Northeast corner

Test area 3: Northeast middle part of area Test area 4: Southern middle part of area

Figure 12: Detailed view of the test locations for accuracy of the georeference.

5.1.6 Test of small scale topographic sensitivity


In order to analyse the quality of the altimeter DEM, tests were made on 4 different lakes. The
lakes were chosen since areas of open water should show no or very little variance in elevation
values in an ideal DEM, as the radar signal is reflected from the surface of water bodies. The
level of variance found in these areas is therefore a good indicator of the level of noise that is
present in the DEM. The variance indicates if is it possible to extract information on the small
scale relief (elevation differences due to landscape/land cover changes within a small area) or
if only large scale relief can be extracted (the overall elevation pattern found in the delta) from
the DEM.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 29

Figure 13: Test areas 1 and 2: Left: Lake 1; right: Lake 2. The lines crossing the lakes are profile lines. See figure XX for
details. The colour scale ranges from 956 m (red) – 957 m (blue) to 958 m (green).

Figure 14: Test areas 3 and 4: Left: Lake 3; right: Lake 4. The lines crossing the lakes are profile lines. See figure XX
for details. The colour scale ranges from 977 m (red) – 978 m (blue) to 979 m (green).

From Figure 13 and Figure 14 it is possible to draw several conclusions:

1. It is not possible to see the outline of the lakes in the DEM


2. The altitude differences within the lake polygons are systematically distributed (not
random ‘noise’ in the DEM – distinct separation into relief patterns)
3. Considerable altitude variations are found within the lake polygons (not flat and
homogenous areas).

The conclusions suggest that only the general relief is detectable from the DEM. From the
analysis of the accuracy of the DEM geo-reference, it is evident that the lakes are actually
present in the areas depicted in Figure 13 and Figure 14 and the problem is related to the DEM
elevation values and not the geo-reference of the DEM.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 30

Table 4: Statistics from the profile lines depicted in Figure 13 and Figure 14. The bottom section contains statistics from
the entire lake polygon.
Lake 1 Lake 2 Lake 3 Lake 4
North/South Southeast/Northwest North/South North/South
Max: 957.75 Max: 956.91 Max: 977.83 Max: 978.40
Min: 956.13 Min: 956.33 Min: 977.30 Min: 977.54
Average: 957.24 Average: 956.65 Average: 977.53 Average: 978.05
Range: 1.62 Range: 0.58 Range: 0.53 Range: 0.87
East/West South/North West/East West/East
Max: 957.82 Max: 957.03 Max: 977.63 Max: 978.51
Min: 956.60 Min: 956.23 Min: 977.18 Min: 977.38
Average: 957.38 Average: 956.73 Average: 977.46 Average: 978.02
Range: 1.22 Range: 0.80 Range: 0.45 Range: 1.13
Lake polygon Lake polygon Lake polygon Lake polygon
No. Pixels: 401 No. Pixels: 190 No. Pixels: 165 No. Pixels: 123
Max: 957.89 Max: 957.03 Max: 977.90 Max: 978.44
Min: 956.63 Min: 955.84 Min: 977.13 Min: 977.39
Average: 957.27 Average: 956.64 Average: 977.51 Average: 978.04
Range: 1.26 Range: 1.20 Range: 0.76 Range: 1.05
STD: 0.25 STD: 0.23 STD: 0.17 STD: 0.23

The elevation range from the profile lines varies from 1.62 m to 0.45 m and the range in the
entire polygons varies between 1.26 m to 0.76 m. However, when comparing these levels of
variations to the standard deviation from each lake polygon it is clear that the level of random
noise is relatively limited. The standard deviations vary from 0.25 m to 0.17 m (see

Table 4 for details). The combination of large ranges in elevation values and the low standard
deviations suggests a general sloping surface with little relief.

The shape of the profile line extractions confirms the presence of large scale relief information
in the DEM and the limited information on the small scale relief. The elevation curves from
Figure 15 and Figure 16 are mostly ‘soft’ curves with limited variation between neighbouring
pixels.

In order to analyse the small scale variations in the DEM initial investigations were performed
to test if a fast Fourier transformation (FFT) and/or an Independent Component Analysis (ICA)
could identify (and thereby make it possible to remove) the random noise. However, this was
not possible. It is important to keep in mind that the DEM is interpolated from thousands of
altimeter line segments from flights done over a period of several months and that the line
segments were combined by interpolation routines. Furthermore, during the generation of the
DEM and during the combination of the datasets from 1996-1998 and 2002-2003 data were
once again interpolated and one or more filters were applied to the data. A FFT and/or an ICA
is therefore not an option as the variance due to e.g. aircraft motion, measurement
inaccuracies, data manipulation residuals etc. is very complicated if not impossible to extract
and identify. It was therefore decided to apply an additional filter to the DEM in order to
smooth the DEM and reduce the small scale elevation variances.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 31

Lake 1 profile - North/South Lake 2 profile South/North

958 957,1

957,8 957

957,6 956,9

957,4 956,8
Elevation (m)

Elevation (m)
957,2 956,7

957 956,6
956,8 956,5

956,6 956,4
956,4 956,3

956,2 956,2
956 956,1
0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 200 400 600 800 1000 1200 1400 1600
Distance (m) Distance (m)

Lake 1 profile - West/East Lake 2 profile - Northwest/Southeast

958 957

957,8 956,9

957,6
956,8
Elevation (m)

Elevation (m)
957,4
956,7
957,2
956,6
957
956,5
956,8

956,6 956,4

956,4 956,3
0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 100 200 300 400 500 600 700 800 900 1000
Distance (m) Distance (m)

Figure 15: Profile line extractions from Lake 1 & 2. The horizontal lines indicate the presence of water.

Lake 3 profile - North/South Lake 4 profile - North/South

977,9 978,6

977,8 978,4

977,7
978,2
Elevation (m)

Elevation (m)

977,6
978
977,5
977,8
977,4

977,3 977,6

977,2 977,4
0 200 400 600 800 1000 1200 1400 1600 1800 0 200 400 600 800 1000 1200 1400 1600
Distance (m) Distance (m)

Lake 3 profile - West/East Lake 4 profile - West/East

977,7 978,6

977,6 978,4

978,2
977,5
Elevation (m)

Elevation (m)

978
977,4
977,8
977,3
977,6

977,2 977,4

977,1 977,2
0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 800 900
Distance (m) Distance (m)

Figure 16: Profile line extractions from Lake 3 & 4. The horizontal lines indicate the presence of water
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 32

5.1.7 Reducing the random errors in the altimeter measurements


In order to reduce the level of random error in the DEM a standard convolution low-pass filter
was applied. Since the goal is to reduce the variance a simple smoothing filter was chosen as
the most appropriate. The smoothing filter simply returns the average value to a specific pixel
based on the number of pixels included in the filter. When a filter is applied the result is
naturally very dependent on the filter size. A small filter has limited smoothing effect but also
changes the actual topography minimally. A larger filter has a higher smoothing effect which
also affects the topography more. The filter size is therefore a compromise between smoothing
the most without loosing the large scale topographic variation.

The evaluation of the filter size effect was based on a visual interpretation and examinations of
standard deviations inside the lake polygons described in the previous section. The effect on
existing topography was examined in two areas in the Panhandle at the transition between the
higher-laying dune landscape and the delta where the topographic effect is most pronounced.
The evaluation showed that an 11x11 pixel filter size was a good compromise. The filter was
applied several times to maximize the smoothing effect without having to apply a larger filter
and the optimum combination proved to be an 11x11 smoothing filter applied 3 times. The
effect of the smoothing filter is reduced for areas with little variance in elevation values each
time the filter is applied. In areas of greater topographic variance each filter application
reduces the level of information as a continuous smoothing is taking place. After 3 applications
the change in variance in the delta area was very limited and the negative effect of the filter in
the areas with topographic variation was greater that the positive effects found in the delta
area.

The effect of applying the filters to the DEM can be seen in Figure 17, Figure 18 and Table 5.
The smoothing effect is very clear and the range in elevation values from the profile lines is
reduced to between 0.87 m to 0.06 m. The range in the entire polygons from the smoothed
surface varies between 0.69 m to 0.26 m. The standard deviations from the entire lake
polygons are reduced to vary between 0.17 m to 0.08 m (see Table 5 for details).

Lake 1 profile - North/South Lake 2 profile South/North

958 957,1

957,8 957

957,6 956,9

957,4 956,8
Elevation (m)

Elevation (m)

957,2 956,7

957 956,6
956,8 956,5

956,6 956,4
956,4 956,3

956,2 956,2
956 956,1
0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 200 400 600 800 1000 1200 1400 1600
Distance (m) Distance (m)

Lake 1 profile - West/East Lake 2 profile - Southeast/Northwest

958 957

957,8 956,9

957,6
956,8
Elevation (m)

Elevation (m)

957,4
956,7
957,2
956,6
957
956,5
956,8

956,6 956,4

956,4 956,3
0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 100 200 300 400 500 600 700 800 900 1000
Distance (m) Distance (m)
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 33

Figure 17: Profile line extractions from Lake 1 & 2. The horizontal lines indicate the presence of water. The red curve
illustrates values extracted from the smoothed DEM. The blue curves are identical to the curves in Figure 15.

Lake 3 profile - North/South Lake 4 profile - North/South

977,9 978,6

977,8 978,4

977,7
978,2
Elevation (m)

Elevation (m)
977,6
978
977,5
977,8
977,4

977,3 977,6

977,2 977,4
0 200 400 600 800 1000 1200 1400 1600 1800 0 200 400 600 800 1000 1200 1400 1600
Distance (m) Distance (m)

Lake 3 profile - West/East Lake 4 profile - West/East

977,7 978,6

977,6 978,4

978,2
977,5
Elevation (m)

Elevation (m)

978
977,4
977,8
977,3
977,6

977,2 977,4

977,1 977,2
0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 800 900
Distance (m) Distance (m)

Figure 18: Profile line extractions from Lake 3 & 4. The horizontal lines indicate the presence of water. The red curve
illustrates values extracted from the smoothed DEM. The blue curves are identical to the curves in Figure 16.

Table 5: Statistics from the profile lines depicted in Figure 17 and Figure 18 extracted from the filtered DEM. The bottom
section contains statistics from the entire lake polygon.
Lake 1 Lake 2 Lake 3 Lake 4
North/South Southeast/Northwest North/South North/South
Max: 957.49 Max: 956.66 Max: 977.65 Max: 977.99
Min: 956.62 Min: 956.49 Min: 977.38 Min: 977.66
Average: 957.23 Average: 956.61 Average: 977.51 Average: 977.87
Range: 0.87 Range: 0.17 Range: 0.26 Range: 0.33
East/West South/North West/East West/East
Max: 957.44 Max: 956.70 Max: 977.50 Max: 978.06
Min: 956.94 Min: 956.44 Min: 977.44 Min: 977.67
Average: 957.33 Average: 956.60 Average: 977.48 Average: 977.91
Range: 0.49 Range: 0.26 Range: 0.06 Range: 0.40
Lake polygon Lake polygon Lake polygon Lake polygon
No. Pixels: 401 No. Pixels: 190 No. Pixels: 165 No. Pixels: 123
Max: 957.50 Max: 956.70 Max: 977.63 Max: 978.06
Min: 956.81 Min: 956.10 Min: 977.37 Min: 977.70
Average: 957.27 Average: 956.55 Average: 977.48 Average: 977.90
Range: 0.69 Range: 0.60 Range: 0.26 Range: 0.36
STD: 0.17 STD: 0.14 STD: 0.08 STD: 0.10

5.2 Remote sensing data


The Landsat data used in the generation of the topographic model have been taken through a
number of different processing steps. Data processing was performed using ENVI 4.0 (of
Research Inc.) and WinChips (of GRAS/Institute of Geography). Some of the processing was
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 34

performed manually while many calculations were performed automatically by designing


scripts (batch programmes) in WinChips.

5.2.1 Rectification
In order to adopt the common georeference used in the Okavango Delta, all images were
rectified to the Delta Mosaic of April 10, 2000 created by HOORC. All 20 Landsat ETM images
were rectified with an RMS error of less than 0.5 pixels (15 m on the ground). As all the
images already contained a UTM zone 34S geocoded, a first order rectification model was
applied using Nearest Neighbour resampling.

In the same process, the extent of each of the four different scenes was defined. All Landsat
images for each area were rectified and matched exactly to this common area to ensure that
all images had exactly the same corner coordinates.

5.2.2 Tasselled Cap Transformations


The Tasseled Cap (TC) indices were derived following the procedure described in Huang et al.
(2002). This involves first a conversion from digital number (DN) to at-satellite radiance and
then a conversion of the at-satellite radiance to at-satellite reflectance. This was done by the
standard routines listed below:

DN to at-satellite radiance: Lλ = Gainλ*DNλ+Biasλ

at-satellite radiance to at-satellite reflectance: ρλ = (pi * Lλ * d2)/(ESUNλ * sin(θ))

where:

λ = ETM+ band number


L = at-satellite radiance
Gain = band specific, provided in the header file of the raw data
Bias = band specific, provided in the header file of the raw data
ρ = at-satellite reflectance, unitless
d = Earth-Sun distance in astronomical unit
ESUN = Mean solar exoatmospheric irradiance listed below
θ = Sun elevation angle, provided in the header file of the raw data

The Earth-Sun distance in astronomical unit can be calculated by equation 1.2.1 and 1.2.2
from Iqbal (1983):

phi=2*pi*(DOY-1)/365

d=1.00011+0.034221*cos(phi)+0.00128*sin(phi)+0.000719*cos(2phi)+0.000077*sin(2phi)

and the mean solar exoatmospheric irradiance for the different ETM+ bands is listed below:

Band watts/(metre squared * µm)


1 1969.000
2 1840.000
3 1551.000
4 1044.000
5 225.700
7 82.070
8 1368.000
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 35

The at-satellite reflectance was reduced to 8-bit in order to reduce the data amount. This was
simply done by multiplying the calculated at-satellite reflectance by 400 in accordance with the
method described in Huang et al. (2002).

The advantage of using the at-satellite reflectance as input to the tasselled cap transformation
is that the vast majority of the spectral variance of the individual scenes is reduced by
accounting for different illumination conditions and varying Sun – Earth distance. Huang et al.
(2002) found that 97 % of the variance was explained by the transformation in the Multi-
Resolution Land Characteristics (MRLC) dataset compiled to cover the entire USA by Landsat
ETM+ data although no atmospheric correction was applied.

The TC indices were calculated by applying the TC coefficients from Huang et al. (2002) to the
calculated at-satellite reflectances (denoted Ref below):

TC index: Ref1*coef1+Ref2*coef2+Ref3*coef3+Ref4*coef4+Ref5*coef5+Ref7*coef7

Table 6: Tasseled cap coefficients for Landsat ETM + (Huang, 2002)


Index Band 1 Band 2 Band 3 Band 4 Band 5 Band 7
Brightness 0.3561 0.3972 0.3904 0.6966 0.2286 0.1596
Greenness -0.3344 -0.3544 -0.4556 0.6966 -0.0242 -0.2630
Wetness 0.2626 0.2141 0.0926 0.0656 -0.7629 -0.5388

The derived TC indices were transformed to 8-bit in order to reduce the data amount. The 8-bit
conversion was done by a calculation of the minimum and maximum TC values from all dates.
The total minimum and maximum value was then used to scale the derived values to a range
between 0 – 255. The following expression was applied to the wetness index:
255
TC Wetness 8-bit = (TC Wetness + 300) ∗
380

5.2.3 Data calibration


Although Huang et al. (2002) found that 97% of the spectral variance between multi date
scenes was removed by the at-satellite reflectance based TC transformation, analysis of the
derived TC values showed that some variation persisted between different scenes for the
Okavango Delta study area. The remaining variance is most likely due to atmospheric effects
not accounted for by the transformation. To test the level of variance between different scenes
2 lakes were chosen as test areas. Lake areas were chosen as test areas such as open water
are considered stable surfaces and they mark the upper boundary of the derived TC wetness
values. If the between-scene variance is explained by the TC transformation the lakes would
return similar TC wetness values over time.

However, an analysis of the derived TC values showed that some variation persisted between
different scenes. 2 lakes were chosen as test areas as open water is considered a stable
surface and mark the upper boundary of the derived TC wetness values. If the between-scene
variance is explained by the TC transformation the lakes would return similar TC wetness
values over time.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 36

212

208

TC wetness 8bit scaled value


204

200

196

192
0 1 2 3 4 5 6
Scene number

Figure 19: TC wetness 8 bit scaled values from the 5 scenes. The vertical variance at a given scene number denotes the
variance between the lakes at a given date. The horisontal variation shows the variation over time. Scene numbers are
1) 0211 1999, 2) 1906 2002, 3) 1908 2001, 4) 2512 2001 and 5) 2803 2001.

Figure 19 shows that some variance remains after the TC transformation and that further
normalisation is needed. Since open water (= 100% wet) and dry land (=100% dry) marks the
theoretical upper and lower boundary of the TC wetness values it was decided to normalize the
TC wetness values between these ranges. The identification of these two surface types was
based on an Interactive Box Classification (IBC) based on the TC wetness image as input and
with the TC brightness image and a colour composite of bands 437 as supplement. The IBC
was performed for both classes on all scenes. To identify areas with permanently open water
or dry land a combined mask was created by adding the results from the IBC’s and then
exclude areas that were not classified as either Open Water or Dry Land on all images. The
resulting mask therefore contains areas classified as Open water / Dry land on all images. The
purpose of the mask was to be able to identify areas that are certain to belong to either of the
two classes. These areas were used to calculate an average value for the two classes which is
used in the final normalization of the TC wetness values. Summary statistics from the classes
from all images is listed in Table 7.

Table 7: Summary statistics of the TC wetness values identified by the IBC masks
Summary statistics
Date 021199 190602 190801 251201 280301
Dryland Min. 52 29 20 39 46
Max. 93 137 138 132 143
Mean 80 119 120 108 130
Var. 66,634 201,633 137,868 303,881 210,093
Std. Dev. 8,163 14,2 11,742 17,432 14,495

Open water Min. 200 201 206 195 201


Max. 220 215 216 215 213
Mean 205 205 209 201 204
Var. 7,688 2,805 1,505 6,567 2,885
Std. Dev. 2,773 1,675 1,227 2,563 1,699

The normalization was done by applying the following expression to the scaled 8-bit TC
wetness values. In order to avoid saturation of the normalized scaled TC wetness values all
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 37

values above Open Watermean were set equal to Open Watermean and values below Dry Landmean
were set equal to Dry Landmean:

200
TCwetness8−bit ,normalized = (TCwetness8−bit − DryLand mean ) ∗
OpenWatermean − DryLand mean

The normalization produces TC wetness values in the range 0 – 200 with Dry land represented
by 0 and Open water represented by 200. Figure 20 shows the same statistics as Figure 19
only based on the normalized TC wetness values. Some variance still exists, but it has been
significantly reduced with the normalization.

212

208
TC wetness 8bit scaled value

204

200

196

192
0 1 2 3 4 5 6
Scene number

Figure 20: TC wetness 8bit normalized values from the 5 scenes. The vertical variance at a given scene number denotes
the variance between the lakes at a given date. The horisontal variation shows the variation over time. Scene numbers
are 1) 0211 1999, 2) 1906 2002, 3) 1908 2001, 4) 2512 2001 and 5) 2803 2001.

5.3 Interpolation of Water Level Variations


A map of generalised water level variations is needed for computing the local weight of the
wetness index. The base information for this was generated from the DWA water gauges in the
area. The annual variation in water level was derived from the available data from each station
(see Figure 21). The files were interpolated using the Natural Neighbours function in ArcGIS.
Natural Neighbours is based on Delauney triangulation and it is particularly suited for points
that are unevenly distributed. The result of the interpolation is shown in Figure 22.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 38

Figure 21: Map of water level variations estimated from gauge board records.

Figure 22: Interpolation of water level variations in the Okavango Delta using the Natural Neighbours method.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 39

5.4 Model script implementation


The Chips Scripting Language (CSL) has been used to handle the processing of Landsat data.
CSL provides a fast and power method of performing image arithmetic, it offers a batch
interface to the Chips applications and it acts as a tool for building image processing
applications within the Chips environment.

All scripts used for the data processing involved in the generation of the Topographic Model are
presented in Appendix A. Below is a summary of the main operations of the individual scripts.

1) Calculate Tasseled Cap wetness (TCW) index based on the rectified Landsat ETM
images
(Script: 1_ tasseled_cap_8bit.txt)
2) Perform interactive box classification of the TCW results from 1) identifying areas
with open water and areas that are completely dry. Generate two separate files (1 for
dry land and 1 for open water) with the masked value set to 1
(This is done manually in chips)
3) Identify area containing valid data in all bands at all dates at the given path/row
area. The extent of the different bands and the different scenes is not constant. Small
shifts in the areas covered might occur and a general mask that identifies the valid data
area is therefore necessary. Create a polygon shape in Chips and manually adjust the
shape to cover the valid data area. Create an image file based on the shape file with
the value 0 outside the shape file (the area outside the valid data area) and the value 1
inside the shape file.
(This is done manually in chips)
4) Create combined mask based on the results from 2). All masks from a given
path/row area is used to identify areas that are wet/dry at all dates included in the
model generation.
(Script: 2_DryLand_&_OpenWater_mask_generation.txt)
5) Perform the TCW normalization based on the combined mask generated in 4) and
the TCW indices generated in 1)
(Script: 3_TCW_normalization.txt)
6) Calculate the topographic effect based on the average normalized TCW and the
water level variation information. The data from the 4 different path/row areas are
mosaic together to create a combined map of the topographic effect. The extent is set
to be equal to the RAMSAR area.
(Script: 4_Topographic_effect.txt)
7) Create the topographic model by subtracting the topographic effect from the
smoothed Altimeter model. Since the topographic effect is stored in an 8-bit image the
following expression can be used in the Chips arithmetic application:

• Altimeter_model-Topographic_effect/100

In order to remove the border effects from the smoothed altimeter model and to
redefine no-data areas from the Altimeter model (which are labelled -9999) the
following expression is applied in chips arithmetic:

• LSS(Altimeter_model,915,-9999, Altimeter_model)

The expression identifies areas with a value less than 915 m in the altimeter model and
gives them the value 0. NODATA in the model is therefore labelled with the value 0.

It is important to note that the final step in the topographic model creation described in
this paragraph 7) has to be done directly on the altimeter file. Due to the large file sizes
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 40

WinChips cannot handle creating a copy of the altimeter model as an intermediate step.
For future updates it is therefore important to keep a backup copy of the model.

5.5 Model maintenance


In the future it may be relevant to update the Topographic Model as new data become
available. If deemed necessary, the topographic model will be revisited with regards to the
results of the preliminary hydrological model when this task is completed in September 2004.
Updates to the Topographic Model may be conducted by adding or removing Landsat data or
by updating the water level interpolation. Addition of new water level gauge measurements will
have a much more profound impact on the model than adding new Landsat data. This is
because the effects of adding an extra Landsat scene will to some extent be reduced by the
averaging procedure (there are currently five images making up the average), whereas the
water level interpolation is used directly in the model.

During a training course in the development and the maintenance of the Topographic Model in
April 2004, staff from the Modelling Unit at the Department of Water Affairs were instructed in
updating and modifying the model.

5.5.1 Inclusion of additional Landsat scenes


Additional Landsat scenes can be incorporated into the model and this may be relevant if
future data covering extremely dry or extremely wet years are acquired. This would increase
the dynamic range of the model. The inclusion of extra Landsat data would mean that all seven
tasks described in Section 5.4 should be re-processed. In the process of adding new data, it
may be relevant to remote an existing Landsat image before computing the average TCW.

5.5.2 Inclusion of additional water level gauge data


The data layer containing the water level interpolation is a critical piece of information in the
model. In the event that additional water level gauge data becomes available or if the
interpolation of the water level map has to be changed and this can be done fairly easily. There
is considerable scope for improving the model by adding more data in case they become
available. This will increase the accuracy of the model in areas that are currently far away from
water level gauge measurements. All stations included in the systematic monitoring of the
delta have been included in this test, so any improvements of the water level variation layer
should probably come from individual researchers, either in the form of measurements or as
expert knowledge about natural boundaries in the system.

In order to add new water level gauge data, steps 6) and 7) described in Section 5.4 have to
re-processed again in order to generate a new version of the final model.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 41

6 Results
6.1 Model Presentation
Contour lines with 5 metre equidistance are displayed in Figure 23. A close up example of the
level of detail in the model is shown in Figure 24.

Figure 23: 5 metre contour lines derived from the Topographic Model.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 42

Figure 24: Example of a permanent swamp area just downstream of the panhandle (left) and the corresponding
topography (right). Bright values indicate high terrain while dark colours indicate low terrain. The image subset is app. 1.2
by 1.2 kilometres. Not that the delta gradient is visible from the northwest to the southeast, as well as the river.

6.2 Topographic Model accuracy


The accuracy of the Topographic Model has been tested using three sets of reference points.
Based on 57 points from the old benchmark data set the R2 value is 0.99 and a root mean
square (RMS) error of 0.96 m is achieved. The correlation is significant with p < 0.01. The
results for testing the recently acquired benchmarks associated with the hydrological stations
(DSM Hydro Reference) are similar to the first test. 46 points were included in the test having
an R2 of 0.99 and an RMS of 0.83 m, significant at p < 0.01. Finally, a third reference data set
from the University of Cape Town was used. Tested against this dataset the R2 is 0.99 and the
RMS value is 0.97 m.

When combining all three data sets, the RMS value for the 153 points is 1.03 metres.

Figure 25, Figure 26 and Figure 26 show graphical representations of the correlation
standardised residuals of the tests.

Table 8: Statistics for testing the model against two different


reference data sets
Parameter DSM REFERENCE DSM HYDRO REFERENCE UCT REFERENCE COMBINED
n 57 46 50 153
R2 0.995 0.997 0.995 0.995
Adjusted R2 0.994 0.997 0.995 0.995
RMS 0.96 m 0.83 m 0.97 m 1.03
p <0.01 <0.01 <0.01 <0.01

One conspicuous outlier was identified in the DSM reference data set. The point identified as
IS/5 deviates by -4.4 metres from the Topographic Model. However, adjacent test points show
no major discrepancies compared to the model and thus there is reason to believe that this
test point is not valid. When excluding this point from the statistics, the RMS value for the DSM
reference data set is reduced to 0.69 m. The overall RMS value including all 152 points is
reduced to 0.96 m.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 43

y = 0.9727x + 25.446
1000

990

980
DEM_V12

970

960

950

940

930
930 950 970 990
HYDRO DSM

2
Standardized residuals

-1

-2

-3
930 950 970 990 0 5 10 15
HYDRO DSM

Figure 25: Graphical representation of the correlation and standardised residuals for the hydro DSM reference data.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 44

y = 1.0023x - 1.6842
990

980

970
DEM_V12

960

950

940

930
930 940 950 960 970 980 990
DSM REFERENCE

4.5

2.5
Standardized residuals

0.5

-1.5

-3.5

-5.5
930 940 950 960 970 980 990 0 5 10 15
DSM REFERENCE

Figure 26: Graphical representation of the correlation and standardised residuals for the DSM reference data.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 45

y = 0.9633x + 34.548
990

980

970
DEM_V12

960

950

940

930
930 940 950 960 970 980 990
UCT REFERENCE

2.5

1.5

1
Standardized residuals

0.5

-0.5

-1

-1.5

-2

-2.5
930 940 950 960 970 980 990 0 5 10 15
UCT HEIGHT
REFERENCE

Figure 27: Graphical representation of the correlation and standardised residuals for the DSM reference data.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 46

7 Discussion
A draft version of the model was delivered in April 2004 along with a draft version of the
report. In accordance with the Terms of Reference specified in Section 2, the draft model was
evaluated by the DWA hydrological modelling team in connection with the preliminary setup of
the Hydrological Model. The Team Leader requested that additional data should be added for
the areas outside the Okavango Delta, but within the proposed Ramsar boundary. These
additional areas included the Lake Ngami area and the downstream Boteti River. The Lake
Ngami area was covered using original altimeter data from CGS, while the only solution for the
Boteti river was to use SRTM data.

Problems in the overlap zone between two altimeter models in the Panhandle region were
identified by DHI/DWA and these problems have been solved in the current version of the
model.

Dr. Piotr Wolski from HOORC also submitted comments on the model. While the comments and
remarks were well considered from a hydrological viewpoint, most of them were not feasible to
implement over the 22.000 km2 Okavango Delta within the given mapping scale and budget of
the Topgraphic Model.

An independent review, requested by the ODMP Chief Technical Advisor, Dr. Eliot Taylor, was
conducted by Professor Charles Merry of the University of Cape Town. In his report, professor
Merry recommends the following updates to the model (Merry, 2004):

“It appears that, through a complicated process, the GRAS DEM has been referenced to the
Clarke 1880 ellipsoid, not the geoid (MSL). The impact of this effect should be investigated by
correcting the DEM and re-comparing it with all the test data sets.”

This discrepancy was also identified by GRAS and based on these results backed by Professor
Merry’s finding, Sefofane Geophysics changed their opinion and admitted that the geoid
correction had probably not been performed. Accordingly, GRAS performed the correction
based on the EGM96 geoid.

Professor Merry further recommended that:

“Once the test data have been used to assess the revised DEM, all these data (that used by
GRAS; that used by me; any new data that may come to light) should be used (once outliers
have been removed) to warp the GRAS DEM to fit these data.”

This recommendation was also followed and Professor Merry kindly provided the necessary
data.

Professor Merry concludes his report with the following remark:

“The improvements recommended above will, in all likelihood, bring about only a marginal
increase in accuracy and reliability, and they do not resolve the problem of modelling the
terrain that is permanently underwater. Unless a major investment in time and money is
made, the GRAS DEM, with the modifications suggested above, is probably the best that can
be produced.”

In Professor Merry’s report, an RMS error of 1.5 metres is reported for the draft Topographic
Model. Using the same test points for testing the RMS error of the final Topographic Model
(version 1.2) the RMS error has been reduced to 0.97 m.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 47

8 Recommendations
In the event that more resources become available for improving the Topograhic Model, a
number of different approaches could help to improve the model.

Base elevation data


The altimeter model is suitable as a background layer but the processing of this data has been
extremely complex as the model was produced by three different contractors and over a total
period of 6-7 years. Currently, no data sets exist that would supersede the accuracy of this
elevation data and there are no indications that any existing or upcoming remote sensing data
set will be able to change this situation within a time frame of several years.

An airborne lidar survey would be the only way to significantly improve or replace the current
model as accuracies of around 0.20 m are obtainable. However, this would require a
substantial budget.

Satellite altimetry
Currently, spaceborne radar altimetry products are available for accurate estimates of water
level variations in the oceans, but land areas are masked out. However, ESA is currently
developing a radar altimetry product for rivers and lakes based on the ENVISAT satellite
(http://earth.esa.int/riverandlake/). GRAS has been in contact with the development team and
has asked for the Okavango Delta to be included in the second test phase of the project. If this
data set becomes available for the Okavango Delta it would be an extremely useful way to
monitor the water level in the delta in near-real time but also to update the water level
variation layer with continuous information.

Water level variations


Additional information about the water level variations in the Delta could improve the accuracy
of the interpolated water level variation map. More information could be added, possibly by
collection of any additional data that may exist outside the DWA system, i.e. from researchers
at universities in Botswana and abroad.

Bathymetry
Bathymetric information should be collected in the field. An echo sounder combined with a
DGPS system can easily be mounted on the light boats that the DWA use in the Delta. This
would make it possible to generate a volume model of the hydrology.

Vegetation classification
The current method development does not rely on specific vegetation classification. It is
possible that a stratification of the delta based on vegetation classes would be able to improve
the accuracy of the model if included as an ancillary data layer. However, this should be done
with caution as a traditional vegetation classification would introduce abrupt boundaries in the
model (going from one vegetation class to another) and the classification result is very much
dependent on the season of the satellite images it is based on. Also, a classification of a
system as complex as the Delta will inevitable include uncertainties which would be
incorporated into the model.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 48

9 Conclusion
A Topographic Model of the Okavango Delta was created based on an existing elevation model
and various remote sensing data sets and information from water gauge stations in the area.
The anticipated approach was based on contour extraction of the water-land boundary from
time series of satellite data. However, this method had to be rejected due to delays in the
delivery of the hydrology data that was required to and because of the inadequate spatial and
temporal coverage of the water level data.

Instead a different method was set up based on enhancing an aerial altimetry elevation model
using a combination of water level information and a remote sensing wetness index derived
from time series of satellite images. The concept of the model is that the water level at any
given location is weighted according to the frequency of flooding at that location and then
subtracted from the base elevation data set. This assigns a relatively lower elevation to areas
that are permanently flooded that are areas that are less frequently flooded. This information
is generated for each 30 x 30 metre pixel in the model. By using time series of satellite images
for deriving the wetness index, the temporal dynamics of the delta are reflected in the
Topographic Model making it more robust.

Various steps of data validation and pre-processing were performed. On the base elevation
data set, quality assessment was carried out. It was shown that the amount of noise of this
data set was of a magnitude that prevented the extraction of small scale topography.
Accordingly, these small scale variations were removed through filtering and instead generated
from the remote sensing data.

The Tasseled Cap Wetness band that is used for assigning the weight to the water level
variation was able to discriminate different vegetation and land cover classes based on
different degrees of wetness. This wetness is related to the water depth at each location.
Based on five different temporal coverages of the delta, an average wetness was computed for
each pixel. Through an interpolation of water level gauges in the Delta, a generalised map of
water level variations was created. These two data layers were combined and subsequently
subtracted from the base elevation in order to derive a Topographic Model including small scale
topographic variations.

The model was tested against three different geodetic benchmark data sets. With a total of
153 reference points, the computed RMS error is app. 1 metre, significant at the 99%
confidence limit.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 49

10 Acknowledgements
GRAS wishes to thank a number of people who have provided input for the report. First of all,
Alasdair Macdonald of DHI has arranged field trips and provided all the necessary support from
his base at the DWA in Gaberone and has pursued data and relevant information for the
model. Also from the DWA, Mr. Dikgomo and Mr. Bombo were knowledgeable field
companions, as well as Dr. Naidu from the DWA office in Maun who contributed with his
profound knowledge of the delta during the overflight. Good discussions with Dr. Margaret
McFarlane in Maun and her report on the geomorphology of the delta were also extremely
valuable. The DWA staff and boat drivers at the camps were extremely skilled and friendly.

Special thanks go to Professor William Ellery who has provided important comments on the
approach through lengthy email discussions. Further, Dr. Ellery willingly commented on image
examples and thus provided an invaluable source of ground truth. Also thanks to Terence
McCarthy from the University of the Witwatersrand in Johannesburg and Pete Ashton from
CSIR in Pretoria for interesting discussions about the Delta in August 2003.

The staff at HOORC have also been helpful and we had good discussions regarding the method
during the GRAS field mission. Professor Susan Ringrose and Dr. Cornelis Vanderpost kindly
made the HOORC archive of Landsat data available to the Topographic Model. Also thanks to
Dr. Piotr Wolski for thorough and constructive comments on the model and for making two
data sets of field GPS measurements available.

At the DGS, Mr. Hilary Koketso is sincerely acknowledged. Mr. Hilary kindly provided the
altimeter data set to GRAS and the ODMP. In connection with the quality assessment, Dr. Luc
Antoine of Sefofane Geophysics was very helpful in resolving version problems regarding the
model and for kindly providing the latest edition of the altimeter model.

We also wish to thank Professor Charles Merry from the University of Cape Town for
suggestions and comments and for making a GPS data set available.

At the Institute of Geography, University of Copenhagen, Dr. Kjeld Rasmussen was a good
partner in the initial discussions regarding the method development.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 50

11 Bibliography
Alsdorf, D.A.Water Storage of the Central Amazon Floodplain Measured with GIS and Remote
Sensing Imagery

Ellery, K. and W. Ellery (1997): Plants of the Okavango Delta. A field Guide. Tsaro Publishers,
Durban South Africa.

Fisher, P. (1998). Improved Modelling of Elevation Error with Geostatistics. GeoInformatica,


Vol. 2, No. 3, pp. 215-233.

Gieske, A (1997). Modelling outflow from the Jao/Boro river system in the Okavango Delta,
Botswana. Journal of Hydrology, Vol. 193, 214-239.

Gumbricht, T., McCarthy, T.S., Merry, C.L., 2001. The topography of the Okavango Delta,
Botswana, and its tectonic and sedimentological implications. South African Journal of Geology
104, 243–264.

Guild, L.S., W.B. Cohen and J. B. Kaufmann (2004). Detection of deforestation and land
conversion in Rondonia, Brazil using change detection techniques. International Journal of
Remote Sensing, Vol. 25, No. 4, 731-750.

Huang, C., Wylie, B., Yang, L., Homer, C. and Zylstra G. (2002): Derivation of a tasseled cap
transformation based on Landsat 7 at-satellite reflectance, International Journal of Remote
Sensing, Vol. 23, No. 8, 1741 – 1748.

Iqbal, M. (1983). An introduction to solar radiation. Academic Press, Toronto.

McCarthy, J. 2002. Remote sensing for detection of landscape form and function of the
Okavango Delta, Botswana. PhD thesis. KTH, Stockholm.

McCarthy, T.S. & W. N. Ellery (1998). The Okavango Delta. Trans. Roy. Soc. S. Afr. 53 (2),
157-182.

McCarthy, T.S., Bloem, A., Larkin, P.A., 1998. Observations of the hydrology and geohydrology
of the Okavango Delta. South Africa Journal of Geology, 101: 101–117.

McCarthy, T.S., G.R.J. Cooper, P.D. Tyson and W.N. Ellery. 2000. Seasonal flooding in the
Okavango Delta, Botswana – recent history and future prospects. South African Journal of
Science. 96: 25-33.

Merry, C. 2004. Accuracy Assessment of the Digital Elevation Model of the Okavango Delta.
September 2004, version 1.2.

Ringrose, S.C. Vanderpost and W. Matheson (1997). Use of image processing and GIS
techniques to determine the extent and possible causes of land management/fenceline induced
degradation problems in the Okavango area, northern Botswana. International Journal of
Remote Sensing, VOl. 18, No. 11, 2337-2364.

Ringrose, S.C. Vanderpost and W. Matheson (2003). Mapping ecological conditions in the
Okavango delta, Botswana using fine and coarse resolution systems including simulated SPOT
vegetation imagery. Internatnional Journal of Remote sensing, Vol. 24, No. 5, 1029-1052.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 51

12 APPENDIX A
12.1 Topographic Model script documentation
12.1.1 Calculating Tasseled cap wetness index

Script: 1_ tasseled_cap_8bit.txt

Input:
• Folder containing rectified Landsat ETM images – bands 1-5 & 7 in chips format. Naming
convention must follow this:
R2_030102_17473.img
o R: rectified
o 2: band 2
o _DDMMYY
o _PATHROW (WRS2 system)
o .img (chips format)
• DOY and sun elevation angle – listed in the metadata file from the raw data.
• Gain settings has to be adjusted in the script to the appropriate setting listed in the
metadata file.

Output:
• Tasseled cap wetness index scaled to 8-bit.

1) Adjust the gain settings in the beginng of


the script. Information of Gain settings is
found in the raw data header file/meta file

2) When prompted type in DOY and Sun


elevation angle (information of this is found
in the raw data header file/meta file

Naming convention:
Rectified Landsat ETM+ data must
follow this naming convention:
3) Select folder containing rectified Landsat Rbandnumber_DDMMYY_pathrow.img
ETM+ data. (e.g. R1_280301_17573.img)
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 52

12.1.2 DryLand & OpenWater mask generation

Script: 2_ DryLand_&_OpenWater_mask_generation.txt

Input:
• Folder containing results from the interactive box classification (masks identifying
permanently dry land and open water. The mask value has to be 1 and each mask
(dryland/openwater) must be in a separate file)
• Mask generated by a shapefile that covers the valid data area in all images. (The bands
from different dates have different extent. The shapefile covers the area that contains
data in all bands from all dates in each PathRow area. The shapefile must be adjusted if
new data is added to the model generation.

Output:
• Combined mask identifying areas that is permanently dry/wet in all images. Dryland has
the value 1 and open Water the value 2

1) Select input folder containing results from Naming convention:


the interactive box classification for the Dry land mask: has to start with ‘dry’
given PathRow area. (e.g. dry_land_280301_17573.img)
Open Water mask: has to start with
‘ope’ (e.g.
open_water_280301_17573.img)
2) Select Output folder where the combined
mask will be stored.
Dryland maskvalue = 1
OpenWater maskvlue = 2

3) Select the mask delineating the valid


data area common for all bands from all
dates at a given PathRow area
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 53

12.1.3 TCW Normalization

Script: 3_TCW_normalization.txt

Input:
• 8 bit scaled tasselled cap wetness index from the script ‘tasselled_cap_8bit.txt’
• Combined mask identifying areas that are permanently dry/wet in al images. Dryland
has the value 1 and open Water the value 2
• The mask generated from ‘DryLand_&_OpenWater_mask_generation.txt’ identifying
areas that are permanently dry/wet in al images. Dryland has the value 1 and open
Water the value 2
• Mask generated by a shapefile that covers the valid data area in all images. (The bands
from different dates have different extent. The shapefile covers the area that contains
data in all bands from all dates in each PathRow area. The shapefile must be adjusted if
new data is added to the model generation. The area inside the shapefile (the image
data area) has the value 1; the area outside has the value 0.

Output:
• Normalized tasselled cap index with value ranges from 0 (permanent dry) to 200
(permanent wet).

1) Select the scaled tasselled cap index


(result from the script
‘tasselled_cap_8bit.txt’

2) Select the combined mask identifying


areas that is permanently dry/wet in al
images (result from the script
‘DryLand_&_OpenWater_
mask_generation.txt’. Dryland has the value
1 and open Water the value 2

3) Select the mask delineating the valid


data area common for all bands from all
dates at a given PathRow area

4) Select Output folder where the combined


mask will be stored.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 54

12.1.4 Calculating the Topographic effect

Script: 4_Topographic_effect.txt

Input:
• normalized TCW indices from the script 3_TCW_normalization.txt
• Image containing the interpolated water level variation information.
• The shape files defining the valid data area in each path/row area.

Output:
• The effective topographic effect found from all the Landsat images used in the model
generation. The output is stored in an 8-bit image with the unit centimetres. This output
contains the information about how much the Altimeter surface is to be modified (the
value is subtracted from the surface)

1) Define how many path/row areas you


wish to include in your calculation.

2) Select the image containing water level


variation (the interpolated surface)

3) Select the 4 shape files delineating the


valid data area for each path/row area.

4) If the number of path/row areas define in


the beginning is less than 4 the script is
terminated. Output must then manually be
mosaic with the remaining areas. If the
number equals 4 the information from all 4
areas are included in the combined mosaic
covering the entire RAMSAR area.
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 55

12.2 Topographic Model scripts


12.2.1 Tasseled cap calculation script

; Tasseled cap calculation


;
; The Tasseled cap indices are calculated based on the at-satellite radiance
; approach.
; The script requires that the Landsat ETM data follow the naming convention
; Rbandnumber_DDMMYY_pathrow.img - e.g. R1_280301_17573.img
;
;----------------------------------------------------------------------------------------------

integer test
test=getYes("It is recommended that you start the Script Log. Continue?")
if test=1 goto START
exit

START:

; **** DEFINE VARIALBLES USED IN THE SCRIPT ***


Object Rad_ETM1, Rad_ETM2, Rad_ETM3, Rad_ETM4, Rad_ETM5, Rad_ETM7
Object Ref_ETM1, Ref_ETM2, Ref_ETM3, Ref_ETM4, Ref_ETM5, Ref_ETM7
Double pi

pi=3.141592654

; **** LANDSAT ETM CALIBRATION COEFFICIENTS ****


double gain1, gain2, gain3, gain4, gain5, gain7
;gain1= 1.1760784 ;Low gain ETM band 1
gain1= 0.775686297697179 ;High gain ETM band 1
;gain2= 1.205098 ;Low gain ETM band 2
gain2= 0.795686274883794 ;High gain ETM band 2
;gain3= 0.9388235 ;Low gain ETM band 3
gain3= 0.619215662339154 ;High gain ETM band 3
gain4= 0.9654902 ;Low gain ETM band 4
;gain4= 0.637254877651439 ;High gain ETM band 4
;gain5= 0.1904706 ;Low gain ETM band 5
gain5= 0.125725488101735 ;High gain ETM band 5
;gain7=0.0662353 ;Low gain ETM band 7
gain7=0.043725490920684 ;High gain ETM band 7

double offset1, offset2, offset3, offset4, offset5, offset7


offset1= -6.199999809265137 ;offset ETM band 1
offset2= -6.400000095367432 ;offset ETM band 2
offset3= -5.000000000000000 ;offset ETM band 3
offset4= -5.099999904632568 ;offset ETM band 4
offset5= -1.000000000000000 ;offset ETM band 5
offset7= -0.349999994039536 ;offset ETM band 7

; **** Exo-ATMOSPHERIC SOLAR_SPECTRAL IRRADIANCES ****


double Eo_B1, Eo_B2, Eo_B3, Eo_B4, Eo_B5, Eo_B7
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 56

Eo_B1 = 1969.000
Eo_B2 = 1840.000
Eo_B3 = 1551.000
Eo_B4 = 1044.000
Eo_B5 = 225.7
Eo_B7 = 82.07

; **** Calculate Earth-Sun distance ****


integer DOY

DOY = GetParameter("Enter DOY number for scene","-1")


If DOY==-1 goto Nothing_Entered

; Calculating Earth-Sun distance


double phi, D
phi=2*pi*(DOY-1)/365
D=1.00011+0.034221*cos(phi)+0.00128*sin(phi)+0.000719*cos(2*phi)+0.000077*sin(2*ph
i)
log("Sun - Earth distance: %D%")

; **** Get sun elevation ****


double SunElev

SunElev = GetParameter("Enter Sun elevation (Degrees) ","0.0")


If SunElev == 0.0 goto Nothing_Entered

; ****Get Sun Zenith Angle ****


double SZA
SZA = 90 - SunElev
log("Sun zenith angle: %SZA%")

; **** Initialize programme ****


EmptyAllLists()

; Get the source folder


string SourceFolder
SourceFolder = BrowseForFolder("")

; Set this folder as working directory


SetWorkingDirectory("%SourceFolder%")

; Create a text file to use as file list


object FileList
FileList = NewTextFile("Filelist.txt")

; Fill the file list (do not include path name)


FileList.CreateFileList("%SourceFolder%\*.img",FALSE)

; Iterate the file list


integer LineCount
LineCount = FileList.GetLineCount()
integer CurrentLine
CurrentLine = 0
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 57

; Declare variables used in main loop


string CurrentFile, Temp_Fname, Shortname, BandNumber
integer BandNumberInt
Object InImage

repeat
; Get first file name
CurrentFile = FileList.GetLine(CurrentLine)

; Add image
InImage = AddObject("%SourceFolder%\%CurrentFile%", OT_IMAGE, FALSE)

; Get image details


double sizex, sizeY, pixelsizex, pixelsizeY, offsetx, offsetY
OffsetX = InImage.getGeoOffsetX() ; Upperleft pixel offset
OffsetY = InImage.getGeoOffsetY() ; Upperleft pixel offset
sizeX = InImage.getImageSamples() ; imagesize - no. of lines
sizeY = InImage.getImageLines() ; imagesize - no. of lines
PixelsizeX = InImage.getPixelSizeX() ; Pixel size X
PixelsizeY = InImage.getPixelSizeY() ; Pixel size Y

; Get bandnumber from ETM file


Temp_Fname = GetFname("%InImage%")
BandNumber = Substr("%Temp_Fname%", 1, 1)

; convert string to integer


BandNumberInt = %BandNumber%
if BandNumberInt = 6 goto NextBand

; **** CONVERT FROM DN TO RADIANCE (W m-2 um-1) ***


Rad_ETM%BandNumber% =
NewImage("%SourceFolder%\Rad_%Temp_Fname%.img", sizeX, sizeY, 32, pixelsizeX,
pixelsizeY, offsetX, offsetY)
Rad_ETM%BandNumber% =
pi*InImage*Gain%BandNumber%+Offset%BandNumber%

; **** CALCULATE TOA REFLECTANCE ***


Ref_ETM%BandNumber% =
NewImage("%SourceFolder%\TOARef_%Temp_Fname%.img", sizeX, sizeY, 8, pixelsizeX,
pixelsizeY, offsetX, offsetY)
Ref_ETM%BandNumber% =
(Rad_ETM%BandNumber%*d^2)/(Eo_B%BandNumber%*cos(pi/180*SZA))*400

; Advance to next position


delete(Rad_ETM%BandNumber%)
NextBand:
Remove(InImage)
CurrentLine = CurrentLine + 1

until CurrentLine>=LineCount
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 58

; **** CALCULATE TASSELED CAP TARNSFORMATION ****


; The Brightness and Greenness components can be included by removing the semicolon
; However, no thorough test has been done to check the 8-bit conversion scaling
Object Brightness, Greenness, Wetness, Brightness8b, Greenness8b, Wetness8b

;Brightness = NewImage("%SourceFolder%\TCB_%Temp_Fname%.img", sizeX, sizeY, 32,


pixelsizeX, pixelsizeY, offsetX, offsetY)
;Brightness =
Ref_ETM1*0.3561+Ref_ETM2*0.3972+Ref_ETM3*0.3904+Ref_ETM4*0.6966+Ref_ETM5*0.22
86+Ref_ETM7*0.1596

;Brightness8b = NewImage("%SourceFolder%\TCB_%Temp_Fname%_8b.img", sizeX, sizeY,


8, pixelsizeX, pixelsizeY, offsetX, offsetY)
;Brightness8b = (Brightness-20)*255/380
;remove(Brightness)
;remove(Brightness8b)

;Greenness = NewImage("%SourceFolder%\TCG_%Temp_Fname%.img", sizeX, sizeY, 32,


pixelsizeX, pixelsizeY, offsetX, offsetY)
;Greenness = Ref_ETM1*-0.3344+Ref_ETM2*-0.3544+Ref_ETM3*-
0.4556+Ref_ETM4*0.6966+Ref_ETM5*-0.0242+Ref_ETM7*-0.2630

;Greenness8b = NewImage("%SourceFolder%\TCG_%Temp_Fname%_8b.img", sizeX, sizeY,


8, pixelsizeX, pixelsizeY, offsetX, offsetY)
;Greenness8b = Greenness+100
;remove(Greenness)
;remove(Greenness8b)

Wetness = NewImage("%SourceFolder%\TCW_%Temp_Fname%.img", sizeX, sizeY, 32,


pixelsizeX, pixelsizeY, offsetX, offsetY)
Wetness =
Ref_ETM1*0.2626+Ref_ETM2*0.2141+Ref_ETM3*0.0926+Ref_ETM4*0.056+Ref_ETM5*-
0.7629+Ref_ETM7*-0.5388
Wetness8b = NewImage("%SourceFolder%\TCW_%Temp_Fname%_8b.img", sizeX, sizeY, 8,
pixelsizeX, pixelsizeY, offsetX, offsetY)
Wetness8b = (Wetness+300)*255/380

delete(Wetness)
;remove(Wetness)
remove(Wetness8b)

Goto End

Nothing_Entered:
MessageBox("Not enough information to execute script - Aborting")

End:
; Clean up
EmptyAllLists()
Delete(FileList)
delete(Ref_ETM1)
delete(Ref_ETM2)
delete(Ref_ETM3)
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 59

delete(Ref_ETM4)
delete(Ref_ETM5)
delete(Ref_ETM7)

Exit
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 60

12.2.2 DryLand_&_OpenWater_mask_generation
; Generation of mask file containing permanent dry land and open water
;----------------------------------------------------------------------------------------------

integer test
test=getYes("It is recommended that you start the Script Log. Continue?")
if test=1 goto START
exit

START:
EmptyAllLists()

; **** DEFINE VARIALBLES USED IN THE SCRIPT ****


string OutputFolder, SourceFolder, PathImageMask
object ImageMask

; Ask if a normalization is wanted


integer yes
yes=getYes("Do you wish to normalize the Tasseled Cap wetness indices?")

; Select folder containing results from interactive box classification - the source folder
MessageBox("Browse for Input folder containing results from interactive box classification")
SourceFolder = BrowseForFolder("")

; Select folder were results will be placed - the output folder


MessageBox("Browse for Output folder were the mask will be stored")
OutputFolder = BrowseForFolder("")

; Set Outputfolder as working directory


SetWorkingDirectory("%OutputFolder%")

; Select the Mask generated from the shape covering the valid image data area from all
images in the given PathRow area
PathImageMask = GetPathName("Select the Mask covering the valid image data area from all
images in the given PathRow area", 1)

; Add mask to project


ImageMask = Addobject("%PathImageMask%",OT_IMAGE,TRUE)

; Create a text file to use as file list


object FileList
FileList = NewTextFile("%OutputFolder%\Filelist.txt")

; Fill the file list (do not include path name)


FileList.CreateFileList("%SourceFolder%\*.img",FALSE)

; Iterate the file list


integer LineCount
LineCount = FileList.GetLineCount()
integer CurrentLine
CurrentLine = 0
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 61

; Declare variables used in main loop


string CurrentFile, Temp_Fname, Shortname, ImageContent
Object InImage, TempDry, TempWater
integer NumberOfDryFiles, NumberOfWaterFiles, PathRowVariable

NumberOfDryFiles = 0
NumberOfWaterFiles = 0

repeat
; Get first file name
CurrentFile = FileList.GetLine(CurrentLine)

; Add image
InImage = AddObject("%SourceFolder%\%CurrentFile%", OT_IMAGE, FALSE)

; Get image details


double sizex, sizeY, pixelsizex, pixelsizeY, offsetx, offsetY
OffsetX = InImage.getGeoOffsetX() ; Upperleft pixel offset
OffsetY = InImage.getGeoOffsetY() ; Upperleft pixel offset
sizeX = InImage.getImageSamples() ; imagesize - no. of lines
sizeY = InImage.getImageLines() ; imagesize - no.
of lines
PixelsizeX = InImage.getPixelSizeX() ; Pixel size X
PixelsizeY = InImage.getPixelSizeY() ; Pixel size Y

;Create temp image - Dry land - if it does not exist already


object TestDryLand

TestDryLand = FindObject("TempDry.img")
integer test
test = ObjectExists(TestDryLand)
if test = 1 goto foundDry

TempDry = NewImageBasedOn("%OutputFolder%\TempDry.img", InImage)

foundDry:

;Create temp image - Open Water - if it does not exist already


object TestOpenWater

TestOpenWater = FindObject("TempWater.img")
integer test2
test2 = ObjectExists(TestOpenWater)
if test2 = 1 goto foundWater

TempWater = NewImageBasedOn("%OutputFolder%\TempWater.img", InImage)

foundWater:

;Get image content based on the InImage file name


Temp_Fname = GetFname("%InImage%")
ImageContent = LeftStr("%Temp_Fname%", 3)
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 62

; Check if filename starts with dry - if yes the value from Inimage is added to the
temp dry mask
integer condition1
condition1 = comparestring("%imagecontent%", "dry")
if condition1 <> 0 goto NEXTCON

TempDry = Tempdry + InImage


NumberOfDryFiles = NumberOfDryFiles +1
PathRowVariable = RightStr("%Temp_Fname%", 5) ;
used to rename the final mask images with the correct Path and Row

Goto FinishedComparison

NEXTCON:
; Check if filename starts with ope - if yes the value from Inimage is added to the
temp water mask
integer condition2
condition2 = comparestring("%imagecontent%", "ope")
if condition2 <> 0 goto FinishedComparison

TempWater = TempWater + InImage


NumberOfWaterFiles = NumberOfWaterFiles +1
Goto FinishedComparison

FinishedComparison:

; Advance to next position


Remove(InImage)
CurrentLine = CurrentLine + 1

until CurrentLine>=LineCount

; Create the mask files containing permantly classified dry land or open water and a combined
mask
object DryMask, WaterMask, CombinedMask

DryMask = NewImageBasedOn("%OutputFolder%\Dryland_mask_%PathRowVariable%.img",
TempDry)
DryMask = EQU(TempDry, NumberOfDryFiles, 1, 0)

WaterMask =
NewImageBasedOn("%OutputFolder%\Open_Water_mask_%PathRowVariable%.img",
TempDry)
WaterMask = EQU(TempWater, NumberOfWaterFiles, 1, 0)

CombinedMask =
NewImageBasedOn("%OutputFolder%\Combined_mask_%PathRowVariable%.img", TempDry)
CombinedMask = EQU(WaterMask, 1, 2, DryMask)
CombinedMask = CombinedMask * ImageMask

;***************** Normalization routine ******************************


if yes=0 goto End
MessageBox("Run the script 3_TCW_normalization.txt for normalization of the scaled Tasseled
cap wetness Indices")
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 63

End:
; Clean up
EmptyAllLists()
Delete(FileList)
Delete(TempDry)
Delete(TempWater)
Delete(WaterMask)
Delete(DryMask)
Remove(PathImageMask)
Exit
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 64

12.2.3 TCW Normalisation Script


; Tasseled cap Wetness normalization
;----------------------------------------------------------------------------------------------

; **** Define variables used in script ****


Object Input, MaskImage, ValidDataAreaMask
String OutputFolder, InputImage, CombinedMask, PathValidDataAreaMask

; **** Get user response ****


; Select the Tasseled Cap Wetness index to be normalized
InputImage = GetPathName("Select the Tasseled Cap Wetness index you wish to normalize",
1)
Input = Addobject("%InputImage%",OT_IMAGE,TRUE)

; Select the Combined mask with permanent Dry/Wet areas


CombinedMask = GetPathName("Select the combined mask with permanent Dry/Wet areas",
1)
MaskImage = Addobject("%CombinedMask%",OT_IMAGE,TRUE)

; Select the Mask generated from the shape covering the valid image data area from all
images in the given PathRow area
PathValidDataAreaMask = GetPathName("Select the Mask covering the valid image data area
from all images in the given PathRow area", 1)
ValidDataAreaMask = Addobject("%PathValidDataAreaMask%",OT_IMAGE,TRUE)

; Select folder were results will be placed - the output folder


MessageBox("Browse for Output folder were the normalized product will be placed")
OutputFolder = BrowseForFolder("")

; Set Outputfolder as working directory


SetWorkingDirectory("%OutputFolder%")

; **** Calculate the average values for Dry Land and Open Water areas ****
object stat
stat=newStatistics("%OutputFolder%\Stat_object.sta")

; Create a file list and calculate statistics


Double Average_Dry, Average_Water

emptylist("FileList2")
addtolist("FileList2", Input)

stat.create("FileList2", NONE,STM_NONE,0,0,1,256,SFL_FULLIMAGEROI,MaskImage,NONE)

Average_Dry = stat.GetMean(2,0)
Average_Water = stat.GetMean(3,0)

log("Average_Dry = %Average_Dry%")
log("Average_Water = %Average_Water%")
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 65

; **** Create temporaty image used in scaling process and set TCW values higher and lower
than the average values to the average values ****
Object TempImage
TempImage = NewImageBasedOn("Temp.img", Input)
TempImage = GRT(Input, %Average_Water%, %Average_Water%, Input)
TempImage = LSS(TempImage, %Average_Dry%, %Average_Dry%, TempImage)

; Get filename from the input file and use as base for the normalized file name
string InputName
InputName = GetFname(Input)

; **** Scale Index image ****


Object ScaledIndex
ScaledIndex = NewImageBasedOn("%InputName%_N.img", Input)
ScaledIndex = (TempImage-Average_Dry)*200/(Average_Water-Average_Dry)
ScaledIndex = ScaledIndex * ValidDataAreaMask

EmptyAllLists()

;CleanUp
Delete(TempImage)
Delete(stat)
Remove(MaskImage)
Remove(ValidDataAreaMask)
Remove(Input)

exit
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 66

12.2.4 Topographic Effect Script


; Generation of the topographic effect - the altitude variation
;----------------------------------------------------------------------------------------------
EmptyAllLists()

; **** DEFINE VARIALBLES USED IN THE SCRIPT ***


string OutputFolder, SourceFolder, PathRowInfo1, PathRowInfo2, PathRowInfo3, PathRowInfo4
integer NumberOfFolders, LoopCount, PathRow1, PathRow2,PathRow3,PathRow4

NumberOfFolders = GetParameter("Enter number of Path/Row sections","-1")


If NumberOfFolders==-1 goto Nothing_Entered

; **** Select the image containing Water level variation ****


string PathWaterLevelVariation
object WaterLevelVariation
PathWaterLevelVariation = GetPathName("Select the image containing Water level variation",
1)
WaterLevelVariation = Addobject("%PathWaterLevelVariation%",OT_IMAGE,TRUE)

; **** Select the shapefiles covering the valid data area in all bands for every date in a given
PathRow area ****
string PathNWDataArea
object NWDataArea
PathNWDataArea = GetPathName("Select the shapefile covering valid image data for PathRow
area 17573", 1)
NWDataArea = Addobject("%PathNWDataArea%",OT_SHAPEFILE,TRUE)

string PathNEDataArea
object NEDataArea
PathNEDataArea = GetPathName("Select the shapefile covering valid image data for PathRow
area 17473", 1)
NEDataArea = Addobject("%PathNEDataArea%",OT_SHAPEFILE,TRUE)

string PathSWDataArea
object SWDataArea
PathSWDataArea = GetPathName("Select the shapefile covering valid image data for PathRow
area 17574", 1)
SWDataArea = Addobject("%PathSWDataArea%",OT_SHAPEFILE,TRUE)

string PathSEDataArea
object SEDataArea
PathSEDataArea = GetPathName("Select the shapefile covering valid image data for PathRow
area 17474", 1)
SEDataArea = Addobject("%PathSEDataArea%",OT_SHAPEFILE,TRUE)

; **** Select folder were results will be placed - the output folder ****
MessageBox("Browse for Output folder were the products will be placed")
OutputFolder = BrowseForFolder("")

; Set Outputfolder as working directory


ODMP – Topographic Model Final Report – Issue 1.2.1 Page 67

SetWorkingDirectory("%OutputFolder%")

LoopCount = 1

; Loop that is initialized the number of times as chosen in beginning of script execution - the
number of different PathRow areas
Repeat
; Select folder containing the normalized TCW images
MessageBox("Select folder number %LoopCount% containing normalized TCW
indices")
SourceFolder = BrowseForFolder("")

; Create a text file to use as file list


object FileList
FileList = NewTextFile("%OutputFolder%\Filelist.txt")

; Fill the file list (do not include path name)


FileList.CreateFileList("%SourceFolder%\*.img",FALSE)

; Iterate the file list


integer LineCount
LineCount = FileList.GetLineCount()
integer CurrentLine
CurrentLine = 0

; Declare variables used in secundary loop


string CurrentFile, ImageFname, PathRowInfoTemp, PathRowInfo
object InImage, TempAverageImage, AverageImage

; Loop that creates the Average TCW image based on TCW images located in the
folder selected as InputFolder - for one PathRow area
repeat
; Get first file name
CurrentFile = FileList.GetLine(CurrentLine)

; Add image
InImage = AddObject("%SourceFolder%\%CurrentFile%",
OT_IMAGE, FALSE)

;Get image PathRow information based on the InImage file name


ImageFname = GetFname("%InImage%")
PathRowInfoTemp = RightStr("%ImageFname%", 10)
PathRowInfo = LeftStr("%PathRowInfoTemp%", 5)

Log("ImageFname: %ImageFname%")

;Create Average TCW index image - Average_TCW_PathRow - if it


does not exist already

TempAverageImage =
FindObject("%OutputFolder%\TempAverage_TCW_%PathRowInfo%.img")
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 68

integer test
test = ObjectExists(TempAverageImage)
if test = 1 goto foundAverage

double sizex, sizeY, pixelsizex, pixelsizeY, offsetx, offsetY


OffsetX = InImage.getGeoOffsetX() ; Upperleft pixel
offset
OffsetY = InImage.getGeoOffsetY() ; Upperleft pixel
offset
sizeX = InImage.getImageSamples() ; imagesize - no.
of lines
sizeY = InImage.getImageLines() ; imagesize - no.
of lines
PixelsizeX = InImage.getPixelSizeX() ; Pixel size X
PixelsizeY = InImage.getPixelSizeY() ; Pixel size Y

TempAverageImage =
NewImage("%OutputFolder%\TempAverage_TCW_%PathRowInfo%.img", SizeX, SizeY, 32,
PixelSizeX, PixelSizeY, OffsetX, OffsetY)

foundAverage:
TempAverageImage = TempAverageImage + InImage

; Clean up
Remove(InImage)

; Advance to next position


CurrentLine = CurrentLine + 1

until CurrentLine>=LineCount
; End of Innner Loop

; Calculate the actual average image


AverageImage =
NewImage("%OutputFolder%\Average_TCW_%PathRowInfo%.img", SizeX, SizeY, 8,
PixelSizeX, PixelSizeY, OffsetX, OffsetY)
AverageImage = TempAverageImage / LineCount

Delete(TempAverageImage)
Delete(FileList)
;set variable containing PathRow information
;PathRowInfo%LoopCount% = %PathRowInfo%

LoopCount = LoopCount + 1

until LoopCount>NumberOfFolders
;end of outer loop

if NumberOfFolders == 4 goto MOSAIC_Routine


exit

MOSAIC_Routine:

; **** Create image covering the entire delta defined by the RAmsar Proposed area ****
ODMP – Topographic Model Final Report – Issue 1.2.1 Page 69

Object TCWDelta, Mosaic1, Mosaic2, Mosaic3, Mosaic4


integer sizeX, sizeY, pixelsizeX, pixelsizeY, offsetX, offsetY

sizeX=10298
sizeY=9740
pixelsizeX=30
pixelsizeY=30
offsetX=570000
offsetY=8008500

TCWDelta = NewImage("TCW_Delta.img", SizeX, SizeY, 8, PixelSizeX, PixelSizeY, OffsetX,


OffsetY)

; **** Merge data into the image covering the entire area ****
Mosaic1 = AddObject("%outputFolder%\Average_TCW_17573.img", OT_IMAGE, FALSE)
ImageMosaicSimple(Mosaic1, TCWDelta, NWDataArea,IMF_COPYNONZEROONLY)
remove(mosaic1)

Mosaic2 = AddObject("%outputFolder%\Average_TCW_17473.img", OT_IMAGE, FALSE)


ImageMosaicSimple(Mosaic2, TCWDelta, NEDataArea,IMF_COPYNONZEROONLY)
remove(mosaic2)

Mosaic3 = AddObject("%outputFolder%\Average_TCW_17474.img", OT_IMAGE, FALSE)


ImageMosaicSimple(Mosaic3, TCWDelta, SEDataArea,IMF_COPYNONZEROONLY)
remove(mosaic3)

Mosaic4 = AddObject("%outputFolder%\Average_TCW_17574.img", OT_IMAGE, FALSE)


ImageMosaicSimple(Mosaic4, TCWDelta, SWDataArea,IMF_COPYNONZEROONLY)
remove(mosaic4)

; Multiplying the average water level variation map with the average TCW index map
object DEM
DEM = NewImage("Okavango_Delta_Altitude_Variation.img", SizeX, SizeY, 32, PixelSizeX,
PixelSizeY, OffsetX, OffsetY)
DEM = (((TCWDelta+1)/200)-0.005) * WaterLevelVariation ; to avoid division
by 0

Nothing_Entered:
exit

You might also like