Нефть и песок О стали Компрессор - подбор и ошибки Из истории стандартизации резьб Соперник ксерокса - гектограф Новые технологии производства стали Экспорт проволоки из России Прогрессивная технологическая оснастка Цитадель сварки с полувековой историей Упрочнение пружин Способы обогрева Назначение, структура, характеристики анализаторов Промышленные пылесосы Штампованные гайки из пружинной стали Консервация САУ Стандарты и качество Технология производства Водород Выбор материала для крепежных деталей Токарный резец в миниатюре Производство проволоки Адгезия резины к металлокорду Электролитическое фосфатирование проволоки Восстановление корпусных деталей двигателей Новая бескислотная технология производства проката Синие кристаллы Автоклав Нормирование шумов связи Газосварочный аппарат для тугоплавких припоев
Главная --> Промиздат -->  Map principle 

1 2 3 4 ( 5 ) 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127


Table 3.2. GRASS module function classes

module [-flagl[flag2...]] parameterl=mapl[,map2,...]\

[parameter2=number...]

where module is the name of the command (see Table 3.2, optional flags enable specific features and parameters are names of input or output files or may be a constant or name of a method, symbol etc. Note that there must be no space when listing comma-separated names.

For example, v.in.shape is a vector command for importing ESRI SHAPE files, r.buffer calculates a buffer zone along raster lines and around raster areas, d.rast displays a raster map layer, i.ortho.photo creates an orthophoto from a scanned aerial image. To learn the usage of a command (syntax, flags and parameters) run the command with the help option, for example:

d.rast help

and to read the module-related manual pages, run (example for d.rast): g.manual d.rast

To make it easier to move around the manual pages you can change the standard manual page browser temporarily to a text browser lynx, netscape, gnome-help-browser or konqueror, provided you have them installed. For example, to view a manual page under konqueror run (using bash shell syntax):

export GRASS TEXT BROWSER=konqueror g.manual d.rast

You can also find the HTML version of the manual pages and tutorials at the

GRASS Web site.



3.1.3 Starting GRASS with demo database Spearsh

For the following sample session we assume that you have working knowledge of starting commands, creating directories etc. You need to install the Spearfish demo data set which you can download from the GRASS Web site or get on CD-ROM.4 It is a comprehensive set of raster, vector and site data covering two 1:24,000 scale topographic map sheets in the western part of South Dakota (SD), USA. The names of the quadrangles are Spearfish and Deadwood North, SD. The data set includes a large portion of the Black Hills National Forest (Mount Rushmore). The coordinate system is UTM (zone 13N, Transverse Mercator projection, Clarke66 ellipsoid, NAD27 datum, metric units, boundary coordinates 4928000N, 4914000S, 590000W and 609000E) with resolutions of raster map layers ranging from 20 m to 100 m. Data have been provided by the EROS Data Center, U.S. Army CERL, USGS, U.S. Census Bureau, and SPOT Image Corporation. A more complete data description can be

found at the GRASS Web site.5

To start, you need to create your DATABASE directory, for example, under /usr/local/share/. Depending on your system set-up you may have to do it as a user root (or ask your administrator to do it) and change the permissions so that you can read, write and execute within this directory. So as root you run:

mkdir -p /usr/local/share/qrassdata chown yourname /usr/local/share/grassdata chgrp yourgroup /usr/local/share/grassdata chmod ug+rwx /usr/local/share/grassdata

With the flag -p, mkdir first creates all the non-existing parent directories, then the desired subdirectory. Then we set the permissions to read , write and execute for the user and the group (use your selected names for yourname and yourgroup in the example above).

Then move the downloaded file spearfish grass53data.tar.gz into this directory, change into it and unpack the file:


The resulting list of files shows that the data are extracted into a new subdirectory spearfish, which is the name of your LOCATION. After unpacking, the downloaded tar.gz package file can be deleted.

Starting GRASS. You can now call GRASS:

grass53




Figure 3.2. Graphical startup of GRASS

and you will see, after a welcome message, the menu for selecting a LOCATION and a MAPSET in your GRASS DATABASE (Figure 3.2). Your current directory /usr/local/share/grassdata will be automatically entered as a DATABASE. For LOCATION select spearfish; for MAPSET select userl. Then click on Use selection , and you will see the license message and the command line prompt:

Now you are in GRASS and you can call GRASS modules as well as UNIX programs. You can also use a TclTk interface which opens in the upper part of your screen (Figure 3.3). If it is not already there, just type:

Most of the GRASS commands are integrated within this interface and you can find a command for a specific task using the function menus. The interface includes a brief description of the parameters and it also displays the command line version of the module.

To list the available vector, raster and site data layers, type:


or, in TclTkGRASS, select under MA LIS RASTER Run. You can learn more about each data layer in terms of its minimum and maximum coordinates, resolution, and number of classes using the *.info commands, for example:





1 2 3 4 ( 5 ) 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127