Efficient viewshed computation on terrain in external memory