raster cell problem

Malcolm Williamson malcolm at cast.uark.edu
Thu Jan 6 11:36:03 EST 1994


> 
> GrassHoppers,
> 
> I am having a problem with raster cell data.  I understand that
> Grass uses the edges of a raster cell to define its location.
> However, I am exporting a product to a user whose program defines
> a raster cells location by its center point.  Does anyone have any
> suggestions on how I can get around this problem?  Is there a way
> that I can "shift" my raster cells to match the users?
> 
> Thanks in advance,
> Jim
> jim at sar_ws.fb4.noaa.gov
> 

Since a raster data file is really nothing more than a matrix of numbers, all
you really have to do is alter the header information that tells the program
where the matrix is geographically referenced. In GRASS, the header info is 
found under the directory $LOCATION/cellhd. Basically, you're just going to 
take 1/2 the resolution and add it to the westing and southing, and subtract
it from the easting and northing. This should obviously only be done to the 
data that is going to be directly read by your other program, as GRASS will not
be happy with the alteration!

Regards,

-- 
Malcolm D. Williamson - Research Assistant       E-mail: malcolm at cast.uark.edu
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-3846 
University of Arkansas              
Fayetteville, AR 72701



More information about the grass-user mailing list