Map Calculus in GIS a proposal and demonstration(11)

发布时间:2021-06-07

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

)

(define distance

(lambda (x1 y1 x2 y2)

(sqrt (+ (power2 (- x2 x1)) (power2 (- y2 y1))))

)

)

(define length

(lambda (polyline)

(if (null? (rest(rest polyline)))

(distance

(first(first polyline))(second(first polyline))

(first(second polyline))(second(second polyline))

)

(+ (distance

(first(first polyline))(second(first polyline))

(first(second polyline))(second(second polyline))

)

(length (rest polyline))

)

)

)

)

power2 and distance hold a function and, apart from the use of the “Polish

notation” to represent mathematical operations, it is easy to see that they are similar to

any other representation of these functions in conventional language. Now, assume that a

polyline is represented as a list of co-ordinates in the form ((x1 y1) (x2 y2) (x3 y3) …(xn

yn)). The command first takes the first element of a list, while rest extracts the rest

of the list.

Notably, the function here is recursive and the values are not being assigned to

temporary variables during the various calls to the function but are used directly, thus the

state of the computation is explicit.

Garbage collection and interdependency

The ability to evaluate functions as symbols and the relationship to the Lambda Calculus

are not the only elements that should be borrowed from functional computer languages

to implement Map Calculus-enabled GIS. Other useful elements include the ability to

manage memory and perform “garbage collection”.

“Garbage collection” is the examination of computer memory to return allocated but

unused blocks of memory to the shared memory used by the application or the operating

system. This is required due to the continuous creation of temporary values and the need

to manage interdependency amongst functions. In a Map Calculus-enabled GIS, if f1, f2

Map Calculus in GIS a proposal and demonstration(11).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219