This paper provides a new representation for fields (continuous surfaces) in Geographical Information Systems (GIS), based on the notion of spatial functions and their combinations. Following Tomlin’s (1990) Map Algebra, the term “Map Calculus” is used
is largely based on Hudak’s (1989) excellent overview, which should serve any interested
reader as an introduction to these topics.
The Lambda Calculus was presented by Alonzo Church (1941) and, although not
explicitly aimed at the development of computer languages (as none existed at that time),
has had lasting influence, especially in the field of computer languages. The Lambda
Calculus is mainly concerned with the ability to represent functions as a set of symbols
and with providing rules for their manipulation. Using few simple notations and rules,
the calculus provides a powerful set of tools to describe functions, function applications
(where the free variables have been substituted with specific values) and recursions.
Together with the Turing machine, it has influenced the creation of computer languages
and compilers (Rosser, 1982; Gunter, 1992). As Hudak (1989) noted, most of the
languages in use in the Geographical Information Science (GISc) field (such as C, C++,
Pascal or Java) use many of the properties of the Lambda Calculus, albeit implicitly.
These types of language are known as imperative languages as they rely on an implicit state
which is modified through commands that are usually applied in a sequence. For
example, the assignment in C “a = 1” binds the value 1 to the variable a and this
state is used in subsequent commands, such as a++. In contrast, declarative languages, such
as Prolog, do not have implicit states and programming is carried out by using
expressions.
Functional languages use functions as a computational model. They are characterised by the
use of an explicit state and the reliance on recursion to accomplish iterations (loops)
(Hudak, 1989). The first functional language, Lisp, was invented by J. McCarthy in the
late 1950s, although it must be noted that the influence of the Lambda Calculus on its
original concepts was minimal (Stoyan, 1984). Subsequent implementations of Lisp, such
as Scheme, have a clearer link to the theoretical grounding of Lambda Calculus and are
used throughout the world to teach functional languages. However, for the purists, Lisp
and Scheme are not “right” as they enable assignments and have other aspects that
“contaminate” the implementation. Far less popular languages such as Haskel, Miranda
or ML are considered “pure” functional languages. The following snippet of Scheme
code demonstrates how functions that measure the length of a polyline would look in a
functional language:
(define power2
(lambda (x) (* x x))