[GRASSLIST:2928] Re: s.to.rast help

Eric G. Miller egm2 at jps.net
Thu Jan 17 21:18:08 EST 2002


On Thu, 17 Jan 2002 11:25:10 -0500, Kevin Slover <kjslover at nhc.noaa.gov> wrote:

> I am having some difficulties in getting s.to.rast to produce a raster. 
> The problem that I am having is as follows:
> 1.  Using s.to.rast, I have opted for 3 cells to surround sites.  The
> data is fairly largly spaced apart, ~500m or so.  My cell size is right
> now 100m ( I have changed it to different values, but the same result).
> The attached image is what is produced (it is better explained via image
> than for me to try to explain it...) In the image, the white spaces are
> the exact locations where the sites fall...
> 2.  Attempting to fill in what appear to be null spaces, I use
> r.fillnulls.  However, the same image is produced.
> 
> I have tried several other modules, but none have worked.  Any ideas on
> what I might be doing wrong??  
> Thanks....

I'm sorry, but it's not clear what the problem is.  The s.to.rast module
creates a cell value for each site it falls within (given the current
region settings).  If you ask for additional cells, the cells grow out
in every direction by the number given.  So, "buffered" by three cells
gives you something the following (for a given site):

       X X X X X X X
       X X X X X X X
       X X X X X X X
       X X X O X X X
       X X X X X X X
       X X X X X X X
       X X X X X X X

So, if your sites are 500m apart, with 100m cell size, the edges of the
"buffered" cells will probably colide (and you should get warnings about
this).

As far as nulls go, are you sure there any remaining?  At the beginning
of the run, the program writes out all cells as NULL.  It then writes
the corresponding sites data cells (as buffered), possibly clobbering
previously written values (aforementioned warning).

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-user mailing list