手机版

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文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)