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

ing catlist you can selectively display categories for integer map, while vallist applies to floating point maps. For example,

d.rast geology catlist=4,5 bg=black

shows only categories 4 and 5 of the geology map (i.e. sandstone and limestone for the Spearfish area) with black color for the other raster cells. You can run

d.rast aspect vallist=225-315 bg=blue

to see southern exposed slopes (note that in GRASS the aspect angles are calculated from east counterclockwise). The GRASS monitor can be erased with d.erase.

A nice script is slide.show.sh which just requires an open GRASS monitor. When running it, it will show all available raster maps. Optionally you can define a name prefix to see only selected maps. To learn how to view raster data in 3D using the nviz module, see Chapter 8.

Color tables. Each raster map has its own color table. When no color table file is present, the rainbow color coding will be used (which may not be satisfying in many cases). Colors can be assigned with r.colors. The module provides a range of pre-defined color tables. To give it a try, change the color table of the aspect map to waves:


As the chosen color coding may be unusual for an aspect map, we can restore the typical color coding for aspect maps by:

r.colors aspect col=aspect

Later on, in Section 5.4.4, we will show how to fine-tune a color table using user defined color values and you will find a number of examples for creating color tables in Chapter 12.

Displaying a legend and a scale. The legends for raster maps can be displayed using the module d.legend:

d.rast fields d.legend fields

If you want to define the location and extent of the legend using the mouse, include the -m flag. Then click the left mouse button to Establish a corner and




By clicking at a certain location, you will get the coordinates at that point as well as the category values and labels in the given map layer(s). The command d.what.rast will also work without specifying a map name when a raster map is displayed in the GRASS monitor. When you are finished with the query, dont forget to end the request mode using the right mouse button within the GRASS monitor. To get only the coordinates at a point by mouse click, use d.where.

To generate a profile, you can run d.profile. It allows you to interactively draw profiles within the GRASS monitor. You may try it with the elevation map:

d.profile elevation.dem

Then follow the menu provided within the monitor.

Non-interactive query can be performed either at individual points or at a transect (profile along a line). With module r.what you can query the map at a point given by its coordinates:

r.what -f geology east north=598514,4921908

With -f flag, the category label is included in the output.

To generate a profile with parameters provided on the command line, you can use r.profile. It outputs the raster map values located on user-defined

subsequently the right button to Accept box for legend . The menus for these interactive display commands are always explained in the terminal window. For continuous field data such as elevation models, the -s flag can be used to draw a continuous color gradient legend. If you have selectively displayed only certain categories or values using the catlist or vallist options for the d.rast command, you can selectively display the relevant colors in your legend using the use option for a list of categories and the range option for a range the map values.

You can place a map scale with d.barscale, choosing its location using mouse.

5.1.2 Raster map queries and proxies

One of the most common tasks when working with digital maps is querying the values at a given location. This can be done either interactively using a mouse, or on the command line for a location given by its coordinates. To query a single or multiple map layers interactively use d.what.rast:



Use the left mouse button to define the first corner point, then move around the mouse to open the zoom box and use the middle mouse button to set the second zoom box corner. If the zoom level is acceptable, confirm it with right mouse-click. The related mouse button menus are explained in the terminal window. To zoom out with d.zoom, use the middle mouse button. You can save the region defined interactively by d.zoom using the g.region command. The GRASS monitor can be erased with d.erase.

Besides zooming, g.region can be used to adjust the current region settings to well defined region boundary values. Note that you have to run d.redraw (or the sequence d.erase;d.rast map) after using g.region as the GRASS monitor needs to get the information about the changed current region. The d.erase which is internally used by the d.redraw script sends the updated coordinates to the monitor while erasing its contents. Therefore, a redraw is required to get the map(s) back.

To get a list of the maps currently displayed in the GRASS monitor, run:


line(s). You can write the result to a file or to standard output (stdout). For example, we want to get a profile along a line specified by coordinates of two GPS tracking points:

r.profile geology out=- profile=595346,4921504,595518,4915456

The output list has two columns. The first column shows the cumulative transect length (cum length), the second column contains the category value found at the corresponding location. If you additionally specify the flag -g, you get the output: easting, northing, cum length, map value. Alternatively, you can use r.transect for profiles defined by a starting point, direction and distance.

The module r.report can be used to report statistics for raster maps. For the given raster map, it will write out a table containing category numbers (cell values), category labels, and optionally area sizes in units selected by the user for the parameter units (see examples of the output in Chapter 12). Unlike the overall statistics calculated by r.report, the command r.stats operates cell-wise. It outputs individual cell values (left to right, top to bottom) in a format that can be customized using flags. Often, the result is piped to other tools such as awk for further processing (see an example in Section 5.1.6).

5.1.3 Zooming and generating subsets from raster maps

You can interactively zoom into a selected location within a map displayed in the GRASS monitor using the command:

d.zoom



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