Conversion of GTOPO30

Jason Sperfslage jasperfs at hrc.ucsd.edu
Fri Jul 24 12:36:33 EDT 1998


Hi Stephan,

Perhaps your problem more complicated than I think, but here is what I have
done in similar situations:

1) Import each image independently, just use the original resolution and region
   for each one.
2) Now edit your region to the be entire area of interest and the final 
   resolution of interest.
3) Use r.mapcalc to merge the images together into the new window/resolution.

   g.region region=big.region
   r.mapcalc "newimage1 = gtopoimage1"
   r.mapcalc "newimage2 = gtopoimage2"
   r.mapcalc "bigimage = max(newimage1,newimage2)"

It's been some time since I've done this, so maybe/maybe not - it should only
take a minute or two to test it.  You could probably even skip the separate
resamplings of gtopoimage*, and just do the "max" on them directly.  I don't
know if you need more elaborate sampling than this, but both images are gridded
rasters, you shouldn't need to go to points and then surf the points together - 
I know how slow that can be!  When you redefine a raster with r.mapcalc it will
resample to the resolution of the currently defined region.  You can use this
to sample up to a coarser resolution too, if you don't mind having point samples
from the original data.


Hope this helps - let me know.


Best regards,

Jason

  ___________________________________________________________________________
          HRC is a Non-Profit Research Corporation, Established 1993

  Jason A. Sperfslage                     Hydrologic Research Center
  System Administrator/Programmer         12780 High Bluff Drive, Suite 250
                                          San Diego  CA   92130-2069

  jasperfs at hrc.ucsd.edu                   Tel: (619) 794-2726 
                                          Fax: (619) 792-2519

                                          http://hrc.ucsd.edu
  ___________________________________________________________________________



More information about the grass-user mailing list