[GRASS5] Problems about v.surf.idw

Paul Kelly paul-grass at stjohnspoint.co.uk
Thu Nov 17 06:40:17 EST 2005


On Wed, 16 Nov 2005, Muzaffer Ayvaz wrote:

> Firstly thank you for your help;
>
>  But in my second quesiton;
>
>  for(i=0;i<nsearch;i++){
>>  ..
>>  }
>>  the other;
>>
>> /* go thru rest of the points now */
>>  for(;i<npoints;i++){
>>  ..
>>  }
>>  What is the rest?? nsearch is either eq! ual to npoints or bigger
> than
>> npoints.
>
> in the first loop the final i is equal to nsearch -1. So the second loop will be like that:
>
>  for(i=nsearch;i<npoints;i++){
>  ...}
>  nsearch is either eq! ual to npoints or bigger
> than  npoints.

Only if there are less than 12 points in the map.

>  How will this loop be exacuted?

If there are there are more than 12 points in the map, i.e. npoints > 12.

The integer variable npoints in the source code has a different meaning to 
the npoints command-line parameter; perhaps that is confusing?

Paul




More information about the grass-dev mailing list