Importing different kinds of raster layers

Agustin Lobo alobo at ija.csic.es
Fri Feb 12 08:00:22 EST 1999


> As far as I understand the manual of proj it transforms the "values" of
> given coordinates. What I would like / have to do is a transformation /
> reprojection of a whole image - it should something similar to
> i.rectify without having to find pixels / point in the "source image"
> but knowing its projection parameters - you understand???
Yes, I do. There are 2 steps:
1. Finding the new coordinates: proj would do it
2. geting the new values of the new pixels by interpolation: normally 
nearest neighbour. Check on a RS book the orthorectification process, 
i.e. Richards 1993, S-V.

Regarding the actual process, I do not know if grass5. has the necessary 
programs to re-project rasters, I guess it does but only between a limited
number of projections. You must either do the processing in a different
package and then import to grass once you have all your imagery in the
same projection, or do the interpolation by yourself in grass. The second
solution would imply:

1. Defining the corners of your image in the new projection.
2. Defining the corners of the new image in the new projection (i.e., 
define the rectangle including the corners calculated in 1.)
3. Defining the new resolution.
4. Defining the centers of the new pixels in the new coordinate system.
5. Calculating the centers of the new pixels in the old coordinate system.
6. Selecting the nearest old pixel for each new pixel (if you follow a 
nearest neighbour method) and assigning this value to the new pixel.

In any case, you must know how to pass from your arbitrary x,y coordinate
system to your "Equidistant Cylindrical" projection back and forth. 
Normally you'll have to pass from x,y to lon,lat and then to "Equidistant 
Cylindrical" coordinates. If you do not know how to pass from 
the x,y coordinates to lon,lat or to any projection, you 
must use i.rectify to georectify to a known projection, i.e. 
UTM. Then reproject your "Equidistant Cylindrical" DEM to UTM. 
Personally, I would look for a package 
supporting the "Equidistant Cylindrical" and do that work with it
(I guess that grass5.0 does not support "Equidistant Cylindrical"). Then
export to grass. 

Agus





More information about the grass-user mailing list