University of California, Los Angeles Department of Statistics Statistics C173/C273 Instructor: Nicolas Christou More on raster maps We will work with data from North Carolina. These data can be found under the LOCA- TION nc spm 07. We enter GRASS through this LOCATION and the mapset PERMA- NENT. There are many raster and vector maps that will be used for some of our tutorials. Let’s open a monitor and display the raster map elevation, which is represents the elevation of the southwest part of the Wake county of North Carolina: GRASS 6.3.cvs (nc_spm_07):~ > d.mon x0 using default visual which is TrueColor ncolors: 16777216 Graphics driver [x0] started GRASS 6.3.cvs (nc_spm_07):~ > d.rast elevation 100% GRASS 6.3.cvs (nc_spm_07):~ > 1
8
Embed
University of California, Los Angeles Department of Statistics Statistics …nchristo/statistics_c173_c273/stat_c... · 2010-03-03 · University of California, Los Angeles Department
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
University of California, Los AngelesDepartment of Statistics
Statistics C173/C273 Instructor: Nicolas Christou
More on raster maps
We will work with data from North Carolina. These data can be found under the LOCA-TION nc spm 07. We enter GRASS through this LOCATION and the mapset PERMA-NENT. There are many raster and vector maps that will be used for some of our tutorials.
Let’s open a monitor and display the raster map elevation, which is represents the elevationof the southwest part of the Wake county of North Carolina:
To erase a map with legend (the previous map) you need to use the flag -f. If the flag is notused, only the map will be erased.
GRASS 6.3.cvs (nc_spm_07):~ > d.erase -f
3
To add text to your map use the module d.text. This will open the dialog box window whereyou can add the text, its location on the map, choose the font size, etc. Here is the dialogbox window: And here is the map with the text:
4
Zooming and generating subsets from raster maps
Once a raster map is displayed on the monitor, we can zoom using the d.zoom module.Therefore we select a subset of the raster map and save the new region. This is how itworks:
GRASS 6.3.cvs (nc_spm_07):~ > d.zoom
1 raster, 0 vector
Buttons:
Left: 1. corner
Middle: Unzoom
Right: Quit
With the left button of your mouse click on the raster map to define the first corner of thezoomed region. Then, move the mouse around to define the desired region (a box) and finallyright click to select the region. Note that once you right click you go back to the commandwindow. If you want to keep this new region save it. All these are shown below:
The above commands display the map using the original region for the elevation map, erasethe displayed map, defines the new zoomed region, and displays the zoomed map. Of course,we can generate the above zoomed region using the g.region module that we discussed in aprevious handout as follows:
The last command will display the new region of the map.
7
Generating a new raster map from an existing raster map:Suppose you want to save the zoomed region as a raster map. To do this we use the d.mapcalcmodule as follows. First let’s make sure that our current region is the zoomed region.