Content uploaded by Luís Moreira De Sousa
Author content
All content in this area was uploaded by Luís Moreira De Sousa on Dec 17, 2013
Content may be subject to copyright.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
191
Assessing the accuracy of hexagonal versus square tilled grids in
preserving DEM surface flow directions
Luís de Sousa, Fernanda Nery, Ricardo Sousa and João Matos
Departamento de Engenharia Civil e Arquitectura
Instituto Superior Técnico (IST)
Avenida Rovisco Pais
1049-001 Lisbon, Portugal
Tel. +351-218418350, Fax: +351-218419765
lads@mega.ist.utl.pt; nery@ist.utl.pt; rts@civil.ist.utl.pt; jmatos@civil.ist.utl.pt
Abstract
The theoretical advantages of hexagonal grids over rectangular grids have been known for a
large number of years. Among these, two can be stressed out: the higher spatial resolution
achieved with the same number of samples and the isotropy of local neighbourhoods. This
work explores such advantages in the representation of flow directions used in hydrologic
modeling. The 3 arc-second resolution DEM data collected by the Shuttle Radar Topography
Mission (SRTM) was resampled to increasingly lower resolution grids, both of squares and
hexagons. The flow direction vectors where computed in each of these grids using the steepest
down slope neighbour criteria; for the hexagonal grids an equivalent model was used.
Reference data was obtained from the original full resolution DEM, calculating the resulting
flow direction vectors of the samples contained inside each of the lower resolution cells. The
accuracy of each model in preserving the original DEM flow direction characteristics was
assessed by comparing the angles defined by lower resolution flow vectors with the resulting
vectors of the corresponding full resolution samples. In the data analysis phase, the influence
of local terrain morphology and variability was evaluated. A set of tests where conducted in
the Minho River basin (ca. 16950 Km2 in the northwest of the Iberian Peninsula). The results
obtained suggest a superior capacity of the hexagonally tilled grids in maintaining the original
flow directions, as given by the resulting vector of the original samples.
Keywords: regular tessellation, hexagonal grid, flow direction
1 Introduction
Hexagonal tiles have long been known to be a better structure than squares tiles to
continuously divide the bi-dimensional space. Hexagons yield a compacter division of space
and an isotropic neighbourhood.
Each cell on a square grid has four neighbours with which shares an edge and another four
with which shares a vertex. This kind of anisotropic relation allows for the definition of
neighbourhood at least in two different fashions:
• 4-neighbourhood, including only the cells to which the central one shares an edge;
• 8-neighbourhood, including all the cells to which the central one shares an edge or a
vertex.
The diagonal cells are at a larger distance to the central cell, as can be observed in Figure 1.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
192
Figure 1 Neighbourhood relations on a square grid.
On a hexagonal grid there are no ambiguities in neighbourhood definitions, all six neighbours
share an edge with the central cell, and are at the same distance from its center (Figure 2).
Figure 2 Neighbourhood relations on a hexagonal grid.
In the digital information systems field, work with hexagons dates back to decade of 1960,
especially by the hand of Goolay [Goolay 1969] who investigated hexagonal sampling patterns
applied to pattern recognition techniques. Goolay understood that these techniques are
independent of the type of coordinate system, and so can be defined on a hexagonal sampling
scheme the same way as on a square one. Furthermore, hexagons simplify the logic based on
the nearest neighbour connectivity and in tandem the pattern transformations in binary images.
Ten years later, Mersereau presented arguably the most important work on the realm of
hexagonal grids applied to the digital information systems [Mersereau, 1979]. Knowing that
the mean sampling density is proportional to the area of sampling on the Fourier spectrum
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
193
Mersereau proved that a circular band-limited signal can be sampled by a hexagonal grid with
13.4% less samples than by a square grid. Figure 3 shows this difference: the square sampling
scheme has to cover a larger area of the Fourier spectrum than the hexagonal sampling
scheme, in order to fully rebuild the band-limited signal. A larger area covered in the Fourier
spectrum results in a larger number of sampling points in space.
Figure 3 Area of the Fourier spectrum sampled in order to fully rebuild a circular band-limited signal (left,
square sampling scheme; right , hexagonal sampling scheme.
From the work of Mersereau onwards others are worth mentioning: Frisch, Hasslacher and
Pomeu [Frisch
et al., 1986] showed that hexagonally tilled cellular automata can evolve to
reproduce the laws of flow dynamics, a property not found in square tilled automata. Hexagons
have been proved a viable alternative in Digital Image Processing [Snyder
et al., 1999] and has
a base for artificial vision systems, in this last case yielding the same or better results than
square systems, without cost overheads [Stauton and Storey, 1989] [Stauton, 1989]. Hexagonal
grids were also shown to be more efficient in representing linear elements than its square
counterparts [Brimkov and Barneva, 2001].
Today the Environmental Monitoring and Assessment Program (EMAP) from the
Environmental Protection Agency (EPA) of the United States advises as sampling scheme on
the field a discrete global grid known as ISEAG (Icosahedral Snyder Equal Area Grid) which
is an hexagonal grid with twelve singularities that are pentagons [Sahr et al., 2003]. This kind
of global grids tackles the distortions introduced in traditional global square grids based on
cylindrical cartographic projections [Sahr and White, 1998].
But not all are advantages for hexagons, a hexagon cannot be divided in smaller hexagons, like
can be done with squares. Still hexagons can be grouped in seven hexagons figures that yield
the same neighbourhood properties of hexagons, like shown in Figure 4 [Lundmark
et al.,
1999].
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
194
Figure 4 Super-hexagons built with seven hexagons.
2 Flow directions
Hydrologic modeling with Digital Elevation Models (DEM) always starts with the
determination of water flow directions from each grid cell. Traditionally this is obtained using
the algorithm proposed by O’Callaghan and Mark [O’Callaghan and Mark, 1984], known as
D-8, in which the flow direction from a given cell is the direction of steepest descend to an
immediate neighbour. This technique has some drawbacks in traditional square grids
[Tarboton, 1997], and other models have been proposed were flow is considered to more than
one neighbour, in order to reproduce more accurately the Hortonian flow paths observed in
nature [Endreny and Wood, 2001][Endreny and Wood, 2003].
Despite its limitations, the D-8 model remains the most widely used flow direction coding
system for DEM grids. Hence, D-8 algorithm was used in this work (partly because a clearly
superior alternative hasn’t yet emerged). The implementation of the D-6 counterpart in
hexagonal grids is quite simple to devise: as all neighbours stand at the same distance the
center cell, the flow direction is simply the one of the neighbour with the lowest elevation
value. Note that with a hexagonal grid only six different flow vectors can be coded in each
cell, each of these vectors separated by an angle of
π/3 radians. With a square grid eight
different directions can be coded each with
π/4 radians apart.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
195
3 Data
In order to assess the performance of hexagonal grids in determining flow vectors a
comparison was made against square grids of the same spatial resolution (cells with the same
area).
The topographic data were derived from the DEM resultant from the Shuttle Radar
Topography Mission (SRTM). These DEM are publicly available with a spatial resolution of 3
arc seconds covering about 70% of the planet’s area. The DEM where projected using a
Lambert Projection (which bears no area distortions) using the ellipsoid of the World Geodetic
System (WGS84), with its central point on 2º 30’ West and 40º North. The SRTM data are
prone to errors resulting from Radar acquisition, namely the absence of return signal in large
water bodies and noisy response in the oceans. Ocean areas were masked out of the DEM,
using ancillary 1:25000 scale coastline vector data. The null elevation values in water bodies,
due to lack of radar signal, were estimated using a raster adaptation of the second order
interpolation algorithm proposed for the treatment of level triangles in TIN models by Zhu
[Zhu
et al., 2001], according to the algorithms described in [de Sousa et al., 2006].
The tests were conducted on the Minho (Miño) river watershed, located on the northern border
of Portugal with Galicia, covering an area of 16 950 km
2
. This particular watershed is
interesting given its relatively large dimension and its morphology, which is mountainous to
the East and with vast flatlands near the coastline.
The original DEM used for the test encompasses entirely the known watershed of the Minho
River in a span of 2854 by 2235 square 90-meters cells.
4 Interpolating test grids
A set of DEM with diminishing spatial resolution was produced from the original grid. For
each of the lower spatial resolutions, two new grids where created, one of hexagons and one of
squares. These grids where obtained by averaging the values of the original full resolution grid
in the neighbourhood of the center of each cell in the new grid. Although practical and simple
this interpolation technique has the property of applying a low-pass filter to the original signal.
The chosen resolutions for testing where 30, 27, 24, 21, 18, 15, 12, 9 and 6 per cent of the
original number of cells for the square grids and its equivalent for the hexagonal grids
(Table 1). Note that the hexagonally tilled grids have less 13.4% cells than their square tiles
counterparts.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
196
Table 1 Test grids dimensions.
Resolution
(fraction of
original)
Nº cells
Squares
Nº cells
Hexagons
Square cell area
(m
2
)
Hexagon cell
area (m
2
)
0.30 574376 504855 90000 102150.0
0.27 464913 407925 111111 126111.1
0.24 367160 323856 140625 159609.4
0.21 280931 247036 183673 208469.4
0.18 206628 180950 250000 283750.0
0.15 143380 126283 360000 408600.0
0.12 91656 80730 562500 638437.5
0.09 51657 45325 1000000 1135000.0
0.06 22914 20414 2250000 2553750.0
This sequence of spatial resolutions was chosen by two main reasons:
• First of all for being multiples of 3, which avoids the interpolation becoming a cell
aggregation process in the square case;
• Above this interval there are no major differences between square and hexagonal
grids, and below this the interpolation degrades in excess the original DEM.
5 Process of test
The D-8 flow direction was determined for each cell of the original full resolution grid. Then
for each grid of degraded resolution set, the resulting flow vector was computed. This was
achieved by determining which original resolution cells have their center inside a given
degraded resolution cell, and thus calculating the resulting flow vector (Figure 5). Beside this
“averaged flow direction vector”, the simple D-8 and D-6 flow direction vectors were also
calculated directly upon each of the lower resolution square and hexagonal grids (Figures 8
through 10).
Figure 5 Resulting flow direction for the lower resolution cells.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
197
6 Results
For each cell of each degraded resolution grid the angular difference between the two flow
vectors explained above was computed. Then for each grid the mean angular error was
calculated and also the number of cells in which the angular difference was greater than zero.
These results are reunited in Table 2.
Table 2 Results.
Mean Angular difference (rad) Number of errors
Resolution
(fraction of
original)
Squares Hexagons Squares Hexagons
0.30 0.669 0.499 528047 462989
0.27 0.689 0.515 427355 374451
0.24 0.708 0.533 337665 296016
0.21 0.730 0.551 258183 225853
0.18 0.753 0.573 189320 165528
0.15 0.779 0.595 131376 114990
0.12 0.808 0.629 83791 73077
0.09 0.839 0.667 46897 41148
0.06 1.623 0.713 4726 18172
The angular difference is consistently lower for the hexagonal grids; as for the number of cells
with differences, hexagonal grids yield lower values which can be explained by the also lower
number of cells these grids have (Figures 6 and 7).
Number of errors
0
100000
200000
300000
400000
500000
600000
0.30 0.27 0.24 0.21 0.18 0.15 0.12 0.09 0.06
Squares Hexagons
Figure 6 Number of errors in each test grid.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
198
Mean angular difference
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
123456789
rad
Squares Hexagons
Figure 7 Mean angular difference from the test grids to the resulting flow grids.
7 Conclusions
Given the above results, it can be concluded that hexagonally tilled grids have better capacity
in preserving original flow direction vectors when compared to squarely tilled ones. The
results are more significant when considering that hexagonal grids only allow for the coding of
six different flow directions whereas square grids allow for the coding of eight.
Figure 8 Detail of the original flow vector grid.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
199
Figure 9 Detail of the 12% resolution test grids. Left, square tilled grid, right hexagon tilled grid.
Figure 10 Detail of the 12% resolution resultant flow vector grids. Left, square tilled grid, right hexagon
tilled grid.
References
Brimkov, V. E. and Barneva, R. P., 2001, “Honeycomb” vs Square and Cubic Models, Electronic Notes in
Theoretical Computer Science
, 46.
de Sousa, L., Nery, F. and Matos J., 2006, Metodologias de Processamento de dados SRTM para a
produção de Modelos Digitais de Direcções de Escoamento,
VIII Congresso da Água.
Endreny, T, and Wood, F., 2001, Representing elevation uncertainty in runoff modeling and flowpath
mapping,
Hydrologic Processes, 15, 2223-2336.
Endreny, T, and Wood, F., 2003, Maximizing spatial congruence of observed and DEM-delineated
overland flow networks,
International Journal of Geographical Information Science, vol. 17, no. 7, 699-
713, Taylor & Francis.
Frisch, U., Hasslacher, B. and Pomeu, Y., 1986, Lattice-Gas Automata for the Navier-Stokes Equation,
Physical Review Letters, vol. 56, no. 14, pp1505-1508.
Goolay, M., 1969, Hexagonal parallel pattern transformations,
IEEE Transactions on Computers, vol. c-
18, no. 8, pp733-740.
Lundmark, A., Wadstromer, N., Li, H., 1999, Recursive subdivisions of the plane yielding nearly
hexagonal regions,
RadioVetenskap och Komunikation.
Mersereau, R. M., 1979, The processing of hexagonally sampled two-dimensional signals,
Proceedings of
the IEEE
, 67, no. 6, pp930-949.
O’Callaghan, J. and Mark, D., 1984, The extraction of drainage networks from digital elevation data,
Computer Vision Graphics Image Processes, 28, 323-344.
7th International Symposium on Spatial Accuracy Assessment in Natural Resources and Environmental Sciences.
Edited by M. Caetano and M. Painho.
200
Sahr, K and White, D., 1998, Discrete Global Grid Systems, Computing Science and Statistics, 30, ed. S.
Weisberg, Interface Foundation of North America, Inc., Farfax Station, VA.
Sahr, K., White, D., and Kimerling, A. J., 2003, Geodesic Discrete Global Grid Systems,
Cartography
and Geographic Information Science,
vol. 30, no. 2, pp. 121-134.
Snyder, W., Qi, H., and Sander, W. 1999, A Coordinate System for Hexagonal Pixels,
SPIE, San Diego.
Stauton, R. C., and Storey, N., 1989, A comparison between square and hexagonal sampling methods for
pipeline image processing,
Proc. SPIE, Vol. 1194, pp. 142-151.
Stauton, R. C., 1989, Hexagonal Image Sampling: A Practical Proposition,
Proc. SPIE, vol. 1008, pp23-
27.
Tarboton D., 1997, A new method for the determination of flow directions and upslope areas in grid digital
elevation models,
Water Resouces Res., 33(2), 309-319.
Zhu, H., Eastman, J. R., Toledano, J., 2001, “Triangulated irregular network optimization from contour
data using bridge and tunnel edge removal”, International Journal of Geographical Information Science,
Volume 15, Number 3, pag. 271 – 286, Taylor & Francis.