No subject

chuck at castor.GEOG.UCSB.EDU chuck at castor.GEOG.UCSB.EDU
Mon Mar 8 14:05:00 EST 1993


>>When I asked about this, r.surf.contour was described as using a "flood fill
>>algorithm", what ever that is. 

>my understanding is that r.surf.contour does not do any interpolation---
>it simply fills areas between raster contour lines. Is this not correct?

r.surf.contour linearly interpolates between contour lines. Unfortunately,
the program uses a flood fill algorithm to find which contour lines to
interpolate between (the algorithm is described in most introductory 
computer graphics textbooks). 

Without going into detail, the flood fill part of the algorithm is what is 
taking all the time to run the program. The most sensitive variable in 
determining how long the program will run is the ammount of "open space" 
between contour lines (exponental growth). Example, if the average "distance" 
between contour lines is 10 cells, the program will run about four times 
slower than a map with a "distance" of 20 cells.

If there is a region of your map that has a large open space without contours,
the program will drag on for a real long time compared to a similar project
with tight contours.

The MAN page doesn't mention this (r.surf.contour bug), but a MASK doesn't
help speed up the program. In fact, a MASK can only slow things down (by
erasing contour lines). The program will "do" the masked regions.

Advise: follow every hint in the Notes section of the MAN page. In addition
to making the output look nice, the program will run faster.

Chuck Ehlschlaeger



More information about the grass-user mailing list