[GRASS-user] Region Definition in GRASS

Good Evening

I’m a kind of a new GRASS user and I’m a bit lost on regarding something. REGION (or spatial extent).
For instance the Location North-Carolina. When the location was created a certain extent, projkection a Spatial Resolution was defined. But, inside this location there is a lot of data with different extent and regional cover. And, inside GRASS I can re-define region properties (g.region) and use a certain data to define region. And, it’s possible to have a region with a small extent than a vectorial that exists in the Location.
My question is, what is the region and what is its purpose? Because I don’t see any impact of region over my image/data processing or image visualization. Or is it?

Thank you and I’m sorry for making such a “WIDE” question

Best regards
Pedro from Stocholm

Pedro Roma wrote:

I'm a kind of a new GRASS user and I'm a bit lost on regarding something.
REGION (or spatial extent).
For instance the Location North-Carolina. When the location was created a
certain extent, projkection a Spatial Resolution was defined. But, inside
this location there is a lot of data with different extent and regional
cover. And, inside GRASS I can re-define region properties (g.region) and
use a certain data to define region. And, it's possible to have a region
with a small extent than a vectorial that exists in the Location.
My question is, what is the region and what is its purpose? Because I don't
see any impact of region over my image/data processing or image
visualization. Or is it?

The region is mostly used for raster processing and graphical display.

Most commands which read or write raster maps will use the bounds and
resolution from the current region. Any input maps will be cropped,
padded and/or resampled according to the region settings.

Display commands translate geographic or cartographic coordinates to
display coordinates such that the current region just fits inside the
display window.

Vector commands are normally unaffected by the current region.

--
Glynn Clements <glynn@gclements.plus.com>

Pedro Roma wrote:
> I'm a kind of a new GRASS user and I'm a bit lost on
regarding something. REGION (or spatial extent).

Glynn wrote:

The region is mostly used for raster processing and
graphical display.

Most commands which read or write raster maps will use the
bounds and resolution from the current region. Any input
maps will be cropped, padded and/or resampled according to
the region settings.

Display commands translate geographic or cartographic
coordinates to display coordinates such that the current
region just fits inside the display window.

Vector commands are normally unaffected by the current
region.

see also
  http://grass.osgeo.org/wiki/GRASS_6_Terminology

and
  http://grass.osgeo.org/grass64/manuals/html64_user/rasterintro.html
  http://grass.osgeo.org/wiki/GIS_Concepts#Raster_Data

Hamish

Ok but for instance. If my region is defined with a Spatial Resolution of 1kilometer and, if I do some r.mapcalc with two LANDSAT images, the output image will have which one of the resolutions? the Region or the 2 landsat images?

Thank you Glynn for the overview. And thank you Hamish for the weblinks

On Thu, Feb 4, 2010 at 7:14 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Pedro Roma wrote:

I’m a kind of a new GRASS user and I’m a bit lost on regarding something.
REGION (or spatial extent).
For instance the Location North-Carolina. When the location was created a
certain extent, projkection a Spatial Resolution was defined. But, inside
this location there is a lot of data with different extent and regional
cover. And, inside GRASS I can re-define region properties (g.region) and
use a certain data to define region. And, it’s possible to have a region
with a small extent than a vectorial that exists in the Location.
My question is, what is the region and what is its purpose? Because I don’t
see any impact of region over my image/data processing or image
visualization. Or is it?

The region is mostly used for raster processing and graphical display.

Most commands which read or write raster maps will use the bounds and
resolution from the current region. Any input maps will be cropped,
padded and/or resampled according to the region settings.

Display commands translate geographic or cartographic coordinates to
display coordinates such that the current region just fits inside the
display window.

Vector commands are normally unaffected by the current region.


Glynn Clements <glynn@gclements.plus.com>

Pedro,

If you run a r.mapcalc, the extent and resolution will follow the current region. So, check g.region -p before run r.mapcalc. You can use g.region rast=MapLandsat to set the current region to use MapLandsat dimensions as reference. After you can reset your extention and resolution using g.region -d . By the way, read g.region --help.

best
milton

2010/2/5 Pedro Roma <pedroroma1982@gmail.com>

Ok but for instance. If my region is defined with a Spatial Resolution of 1kilometer and, if I do some r.mapcalc with two LANDSAT images, the output image will have which one of the resolutions? the Region or the 2 landsat images?

Thank you Glynn for the overview. And thank you Hamish for the weblinks

On Thu, Feb 4, 2010 at 7:14 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Pedro Roma wrote:

I’m a kind of a new GRASS user and I’m a bit lost on regarding something.
REGION (or spatial extent).
For instance the Location North-Carolina. When the location was created a
certain extent, projkection a Spatial Resolution was defined. But, inside
this location there is a lot of data with different extent and regional
cover. And, inside GRASS I can re-define region properties (g.region) and
use a certain data to define region. And, it’s possible to have a region
with a small extent than a vectorial that exists in the Location.
My question is, what is the region and what is its purpose? Because I don’t
see any impact of region over my image/data processing or image
visualization. Or is it?

The region is mostly used for raster processing and graphical display.

Most commands which read or write raster maps will use the bounds and
resolution from the current region. Any input maps will be cropped,
padded and/or resampled according to the region settings.

Display commands translate geographic or cartographic coordinates to
display coordinates such that the current region just fits inside the
display window.

Vector commands are normally unaffected by the current region.


Glynn Clements <glynn@gclements.plus.com>


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Pedro Roma wrote:

Ok but for instance. If my region is defined with a Spatial Resolution of
1kilometer and, if I do some r.mapcalc with two LANDSAT images, the output
image will have which one of the resolutions? the Region or the 2 landsat
images?

The region.

Most raster modules (including r.mapcalc) generate maps with the
bounds and resolution of the current region. Input maps are cropped,
padded and/or resampled to the current region, so all processing
within the module takes place on the grid defined by the current
region.

The main exceptions are the r.in.* modules, which import files
cell-for-cell, using the bounds specified in the file's metadata if
present. The current region is ignored.

Modules which perform their own resampling (e.g. r.resamp.*, r.proj)
create output maps according to the current region but read their
input maps without cropping or resampling.

--
Glynn Clements <glynn@gclements.plus.com>

By the way. Instead of being setting everytime g.region xxxx -p can I save a region definition and use it everytime? If so, how do I load region definition in a script?

Thanks

Best regards
Pedro

On Fri, Feb 5, 2010 at 6:50 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Pedro Roma wrote:

Ok but for instance. If my region is defined with a Spatial Resolution of
1kilometer and, if I do some r.mapcalc with two LANDSAT images, the output
image will have which one of the resolutions? the Region or the 2 landsat
images?

The region.

Most raster modules (including r.mapcalc) generate maps with the
bounds and resolution of the current region. Input maps are cropped,
padded and/or resampled to the current region, so all processing
within the module takes place on the grid defined by the current
region.

The main exceptions are the r.in.* modules, which import files
cell-for-cell, using the bounds specified in the file’s metadata if
present. The current region is ignored.

Modules which perform their own resampling (e.g. r.resamp.*, r.proj)
create output maps according to the current region but read their
input maps without cropping or resampling.

Glynn Clements <glynn@gclements.plus.com>

Pedro Roma wrote:

By the way. Instead of being setting everytime g.region xxxx -p can I save a region definition

As it says in the g.region manual:
      save=name
           Save current region settings in named region file
So:
g.region xxxx -p save=<your_region_name>

and use it everytime? If so, how do I load region definition in a script?

Each time you start GRASS it begins with the region settings from the previous session. You can go to any other saved region by:
g.region region=<your_region_name>

Thanks

Best regards
Pedro

On Fri, Feb 5, 2010 at 6:50 PM, Glynn Clements <glynn@gclements.plus.com <mailto:glynn@gclements.plus.com>> wrote:

    Pedro Roma wrote:

    > Ok but for instance. If my region is defined with a Spatial
    Resolution of
    > 1kilometer and, if I do some r.mapcalc with two LANDSAT images,
    the output
    > image will have which one of the resolutions? the Region or the
    2 landsat
    > images?

    The region.

    Most raster modules (including r.mapcalc) generate maps with the
    bounds and resolution of the current region. Input maps are cropped,
    padded and/or resampled to the current region, so all processing
    within the module takes place on the grid defined by the current
    region.

    The main exceptions are the r.in.* modules, which import files
    cell-for-cell, using the bounds specified in the file's metadata if
    present. The current region is ignored.

    Modules which perform their own resampling (e.g. r.resamp.*, r.proj)
    create output maps according to the current region but read their
    input maps without cropping or resampling.

    --
    Glynn Clements <glynn@gclements.plus.com
    <mailto:glynn@gclements.plus.com>>

This mail was received via Mail-SeCure System.
------------------------------------------------------------------------

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

This mail was received via Mail-SeCure System.

--
Micha Silver
Arava Development Co. +972-52-3665918
http://surfaces.co.il

By the way. Instead of being setting
everytime g.region xxxx -p can I save a region definition
and use it everytime? If so, how do I load region definition
in a script?

http://grass.osgeo.org/grass64/manuals/html64_user/g.region.html

Thank you all for your help regarding this.

Ok about this issue: I’m producing vegetation indicators for 3 different spatial resolution (1km, 250m, 30m) using different images but for the same coordinates system and region. My question is, I must have 3 different locations for each spatial resolution or can I have all in the same location but, I define g.region -p for each process before I run vegetation indicators modules?

THanks
Pedro

On Tue, Feb 9, 2010 at 2:59 PM, Hamish <hamish_b@yahoo.com> wrote:

By the way. Instead of being setting
everytime g.region xxxx -p can I save a region definition
and use it everytime? If so, how do I load region definition
in a script?

http://grass.osgeo.org/grass64/manuals/html64_user/g.region.html

Thank you all for your help regarding this.

Ok about this issue: I’m producing vegetation indicators for 3 different spatial resolution (1km, 250m, 30m) using different images but for the same coordinates system and region. My question is, I must have 3 different locations for each spatial resolution or can I have all in the same location but, I define g.region -p for each process before I run vegetation indicators modules?

No. You can work in the same Location (which means the same CRS fro all layers) and set up three different regions, each with a different resolution:
g.region -p res=30 save=res30
g.region -p res=250 save=res250
etc…

···
-- 
Micha Silver
[http://www.surfaces.co.il/](http://www.surfaces.co.il/)
Arava Development Co.  +972-52-3665918

An option for organizing the data would be to work with only one
location but different mapsets, one for each resolution. But you still
would have to set the resolution with g.region.

Daniel

On Wed, Feb 10, 2010 at 8:23 AM, Micha Silver <micha@arava.co.il> wrote:

On 10/02/2010 12:12, Pedro Roma wrote:

Thank you all for your help regarding this.
Ok about this issue: I'm producing vegetation indicators for 3 different
spatial resolution (1km, 250m, 30m) using different images but for the same
coordinates system and region. My question is, I must have 3 different
locations for each spatial resolution or can I have all in the same location
but, I define g.region -p for each process before I run vegetation
indicators modules?

No. You can work in the same Location (which means the same CRS fro all
layers) and set up three different regions, each with a different
resolution:
g.region -p res=30 save=res30
g.region -p res=250 save=res250
etc...

THanks
Pedro

On Tue, Feb 9, 2010 at 2:59 PM, Hamish <hamish_b@yahoo.com> wrote:

> By the way. Instead of being setting
> everytime g.region xxxx -p can I save a region definition
> and use it everytime? If so, how do I load region definition
> in a script?

http://grass.osgeo.org/grass64/manuals/html64_user/g.region.html

This mail was received via Mail-SeCure System.

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

This mail was received via Mail-SeCure System.

--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user