Hex-utils: A Tool Set Supporting HexASCII Hexagonal rasters
Lu
´
ıs Moreira de Sousa and Jo
˜
ao Paulo Leit
˜
ao
Eawag - Swiss Federal Institute of Aquatic Science and Technology,
¨
Uberlandstrasse 133, 8600 D
¨
ubendorf, Switzerland
Keywords:
HexASCII, Hexagonal raster, Hexagonal Mesh, Hex-utils.
Abstract:
The advantages of hexagonal meshes over squared grids in discretising spatial variables have been known
for long. Notwithstanding, the raster data formats used in geo-spatial disciplines to this purpose are still
today almost exclusively reliant on squared grids. The HexASCII file format is a core element in an attempt
to introduce hexagonal rasters to mainstream GIS, defining a simple vehicle to store and share such data
structures. This article describes the hex-utils tool-kit, an Application Programming Interface (API) and a
set of command line tools enabling the use of HexASCII rasters. Basic operations are supported: creation
of new hexagonal rasters from different inputs and transformation into file formats readable by desktop GIS
programmes. The API sets a framework for the development of further functionality.
1 INTRODUCTION
In Geographic Information Systems (GIS), the raster
data structure provides a straightforward mean to cap-
ture real world phenomena, by discretising spatial
variables into tessellations of samples. Rasters divide
the cartographic plane regularly into small areas of
the same shape, inside which the spatial variable in
question is assumed to be constant. This is possible
only with three regular geometric shapes (i.e., hav-
ing all sides of equal length): the equilateral triangle,
the square and the hexagon. Raster grids used in GIS
have been predominantly organised in squared pat-
terns in which the space between each row and each
column of samples is constant; to a good extent this is
a consequence of spatial data acquisition methods.
However, hexagonal rasters yield two essential
advantages over square grids that are relevant in GIS.
In first place is the higher spatial resolution pro-
vided by hexagonal meshes of equal area (Mersereau,
1979); or conversely, the lower number of cells re-
quired by a hexagonal raster to match the resolu-
tion of a squared counterpart. In second place is the
isotropy of the hexagonal neighbourhood; in a square
grid each cell has four neighbours to which it shares
an edge and four with which it shares only a vertex.
In a hexagonal raster each cell shares an edge with
each of its six neighbours, and all their cell centroids
are at the same distance.
On the downside, hexagons yield the distinc-
tive characteristic of not being dividable into smaller
hexagons, and neither forming a larger hexagon when
agglomerated. This issue has been addressed in dif-
ferent ways, such as that proposed with the Gener-
alised Balanced Ternary cell index system (Gibson
and Lucas, 1982). Moreover, raster cell aggregation
is not a frequent operation in spatial analysis pro-
cesses.
The shortcomings of square grids became evident
early in the history of Computer Science, motivat-
ing suggestions for a shift to hexagonal meshes al-
ready in 1960s (Golay, 1969). But in spite of further
theoretical developments and other advantages iden-
tified, this shift never fully materialised. Likewise in
the GIS field, neither hexagonal raster file formats,
nor supporting tools were ever fully developed. Scant
work with hexagonal sampling schemes or hexagonal
meshes is conducted on vector topologies.
These were the motivations leading to the specifi-
cation of the HexASCII file format (HASC for short),
an open formalism to store and port hexagonal rasters
as text files (de Sousa and Leit
˜
ao, In review). This
specification sets the minimum information required
to capture cell geometry, mesh dimensions and loca-
tion, plus the cell data themselves.
A prototype application is presented in this article,
a set of tools developed to provide basic functional-
ity for HexASCII rasters. It comprises an Applica-
tion Programming Interface (API) and a set of com-
mand line tools demonstrating the creation of Hex-
ASCII rasters and their integration with existing GIS
software. These assets intend to be a step towards the
Sousa, L. and Leitão, J.
Hex-utils: A Tool Set Supporting HexASCII Hexagonal rasters .
DOI: 10.5220/0006275801770183
In Proceedings of the 3rd International Conference on Geographical Information Systems Theory, Applications and Management (GISTAM 2017), pages 177-183
ISBN: 978-989-758-252-3
Copyright © 2017 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
177