[mapserver-users] An intellectual exercise

Richard Greenwood Rich at GreenwoodMap.com
Wed Mar 13 20:33:48 EST 2002


Steven,

There are (at least) three fundamental ways to solve your problem;
1. With an elevation grid ( a DEM)
2. With a 3D surface (a TIN)
3. With contours, as you propose
I think it is generally accepted that this kind of modelling is easiest on 
a DEM. And in my experience, working with a TIN would be a lot easier than 
working with contours. Contours are pretty easy for us humans to interpret, 
but they're not a handy format for computer processing.

So I'd suggest that you look at your dataset and the tools that you have to 
reprocess or reformat it, before you spend a lot of time coding a solution 
against a set of contours. If it was me, I think I'd convert my contours to 
a TIN, calculate a normal vector for each triangle, store that as an 
attribute of the polygon. Then in mapserver I'd make the theme 'invisible' 
and display a rotated arrow symbol when the user clicked on a polygon.

Rich



At 10:54 AM 3/14/2002 +1100, you wrote:
>Hi All,
>
>I am rolling out a 2m contour layer on an existing application focused on
>environmental education. The contours are coloured based on height giving a
>quasi 3d effect:
>
>http://www.streamwatch.org.au/gisdemo
>
>It would be a truly fantastic educational resource if a user could click
>somewhere on the map and have an arrow drawn showing which way runoff will
>flow based on some kind of algorithm that calculates the nearest two contour
>lines and works out which is the highest and perhaps their angle with
>respect to each other. I am using mapscript and can already return shape
>indexes etc (thanks to the help of several on this list) but I am not sure
>how to approach this kind of query - if indeed it can be done.
>
>Any ideas anyone?
>
>Regards
>
>Steven Hayes


Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich at GreenwoodMap.com
(307) 733-0203
http://www.GreenwoodMap.com




More information about the mapserver-users mailing list