I have worked on something similar to what you are trying to do. Our objective was to produce surfaces showing the number of structures (electricity pylons) visible from each elevation pixel, and also their visibility impact for each pixel (discounted for distance). In this case there were 180 structures (points) and the target surface had 16 million visible pixels. The beginning of the workflow was to create viewsheds for every point. For this, rather than using UI scripting in Manifold, we used Global Mapper, which has a built-in option to create viewsheds for multiple selected points, as well as allowing for the curvature of the Earth, and to specify the height of the observer as well as each structure. The structures were subdivided and processed in multiple instances of Global Mapper at once (crude parallelism). It took a more-than-trivial amount of time. The combined output was a set of 180 overlapping areas—one complex area (usually multipart) showing the viewshed for each structure. Manifold SQL was then used to sum, for each surface cell, the number of viewshed areas with which it intersected. It wasn't as simple as that in practice—the size and complexity of the data meant it took some effort to produce a workflow and code that would complete in a reasonable amount of time. For you, it is probably out of the question (for now) to create viewsheds for every surface pixel, unless you have a very coarse surface. Well, that is one option (at the cost of relevant detail, obviously). A better option may be to create surface-specific points (as implemented in SAGA for example), that is, points marking peaks, saddles and possibly others—which are probably the best candidates for places to view terrain from (common sense is sometimes right). You could treat this moderate number of potential viewpoints in more or less the same way we treated structures—though conceptually, the line of sight would run in reverse. There has to be a better way though, right? This is a case (well, two cases) where a seemingly simple question (in human terms) can easily consume a massive amount of development and processing time. It seems an ideal task for GPGPU execution. I hope you do take the time to outline what you want Manifold to do for you "out of the box", and why, and send the request to Sales.
|