FREC 682 Spatial Analysis

course syllabus


Regions and Masks

Regions

The current region dictates the boundaries and resolution of any raster map you create during your work session. For example:


                         REGION FACILITY
LOCATION: spearfish                                MAPSET: john
 
CURRENT REGION: N=4928000  S=4914020  RES=30  ROWS=466
                E= 609000  W= 590010  RES=30  COLS=633
PROJECTION: 1 (UTM)
ZONE:       13

You can change region parameters any time with the g.region module. Option 1 of g.region will let you modify bolded region parameters directly:

                              IDENTIFY REGION
 
           ============================= DEFAULT REGION ========
           |          Default North:4928000                    |
           |                                                   |
           |           =======  YOUR REGION  =======           |
           |           | NORTH EDGE:4928000____    |           |
           |           |                           |           |
 Def. West |WEST EDGE  |                           |EAST EDGE  | Def. East
 590000    |590010_____|                           |609000_____| 609000
           |           | SOUTH EDGE:4914020____    |           |
           |           =============================           |
           |                                                   |
           |          Default South:4914000                    |
           =====================================================
           PROJECTION: 1 (UTM)                        ZONE: 13
 
                   Default   GRID RESOLUTION   Region
                     100    --- East-West ---   30________
                     100    -- North-South --   30________
 
 
              AFTER COMPLETING ALL ANSWERS, HIT  TO CONTINUE
                            (OR  TO CANCEL)

Alternately, you can save or set your region from a region parameter file, or set your region from the cellhd information in a raster map or from a vector map, e.g.:
g.region rast=elevation.dem
You can change cell resolution, e.g.: g.region res=100

Note that whenever you change any region parameter with g.region, these changes will apply to any subsequent work, although you must d.erase your GRASS monitor to see the effects of the change.

When you start a GRASS session, you will be in the region you ended your previous work session in.

Masks

r.mask is an interactive utility which lets you mask out (set to zeroes) any cells in areas you are not interested in. It creates a binary raster file called MASK in your mapset, and this mask remains in effect until you remove it with r.mask. (Or, you can issue the command g.remove MASK.)

Any map you create while you have a mask in place will have zero values in all masked cells. .



course syllabus