s.to.rast rountine

Susan Huse sue at ced.berkeley.edu
Fri Jun 24 14:39:57 EDT 1994


> 
> 	I am using the grass routine s.to.rast to convert meterological data to
> a raster so point in polygon searches can be accomplished.  The only problem
> that I have is that some of the sites fall in the same grid cell and only
> the last one is actually assinged to the raster.  
> 	Ideally I would like to get some type of message telling me that this
> is occuring and then the value(station number) displayed to the screen or to 
> a file.  Can anyone point me in the right direction towards achieving this.  
> 	Note that I am already using a fine raster 1 minute global scale
> and that going any finer is going to provide a severe hinderance.
> 
> Craig
> caa at noaacrd.colorado.edu
> 

You could do a round about check.
Use s.menu option 7 - convert to raster (frequency of occurrence)
This will create a raster file whose values equal the number of sites
that fell within that cell.  You can then run a report against your
other raster file to show which it chose in cases where there were
more than one site.  Unfortunately, it still doesn't tell you the
value of the unconverted sites, only where they are and how many 
were not converted.

If you wanted to get fancy you could write a script that would
pull out the coordinate range for each of the multi-site cells
and then use that to sort through your site list and write a new file
showing all the sites that fell within each of the multi-site cells.

-sue huse
REGIS
UC Berkeley



More information about the grass-dev mailing list