[GRASS-user] Perform resample a raster using another image as a reference for the process?

Nikos Alexandris nik at nikosalexandris.net
Wed Aug 3 14:17:31 PDT 2016


>Eddison wrote:
>
>>> >>> Hello thank you very much , you can put some screenshots of the
>>> >>> process?
>
>Helmut Kudrnovsky:
>
>>> >> have a look at https://grass.osgeo.org/grass70/manuals/g.region.html
>>> >> -a     Align region to resolution raster=name[,name,...]
>
>>> See also
>>> https://grasswiki.osgeo.org/wiki/Computational_region
>
>>> >> Set region to match raster map(s)
>>> >> g.region -a raster=your_raster_you_want_align_to
>
>Nikos Alexandris:
>
>>> > Also useful (to read and use):
>>> > https://grass.osgeo.org/grass70/manuals/r.resample.html
>
>Markus Neteler:
>
>>> For an overview, see also
>>> https://grasswiki.osgeo.org/wiki/Interpolation
>
>>> PS: I have now added the second link to all relevant manual pages
>
>Eddison Araya:
>
>>Hello thank you very much , then the command is as follows:
>>g.region -a -p raster=lsat5_1987_10 align=urban  ?
>
>
>Eddison, the command is as Helmut proposed in one of his first posts
>(see below).
>
>Essentialy, you want to set the extent of the region (within which
>grass' raster modules will operate) to match a raster map's dimensions.
>
>That is,
>
>g.region raster=Your_Raster_Map
>
>And, even more, you want to force the alignment of the extent to this
>map.  This is done by addin the -a flag:
>
>g.region -a raster=Your_Raster_Map
>
>That's it, nothing more.

Eddison, seems I was to fast (and writing out of memory) and your above
command is correct, I guess.  The -a will align the region's extent, to,
well, as the manual explains, the resolution.

So, you'd need your `align=` part.

Nikos


More information about the grass-user mailing list