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


The new raster map residential contains only the zoomed subset of spot.image. You can look at it by running:

d. erase

d.rast residential

When zooming out (d.zoom, middle mouse button, right to quit), you will realize that the image residential contains only the desired portion of the source, this area is surrounded by no-data (NULL) raster cells.

Generating map subsets. If you have a large raster map, but you want to work only on a small subset of that area, the subset of interest can be selected and stored into a separate map. This will save you processing time, especially when you want to try a more complex calculation before applying it to the full map.

GRASS raster computations are always limited to the current region at current resolution. After defining the area of interest with g.region or d.zoom, you can use the module r.mapcalc to extract the map portion into a new map:

r.mapcalc newmap=oldmap

Through this simple expression the map portion defined by the current region is saved as newmap, copying the cell values from the larger original map oldmap. As an example, let us copy the residential area in the north-west of the Spearfish area from the SPOT satellite image. We can use g.region to first adjust the current region settings (map boundaries and resolution) to a map, in this case the satellite image spot.image. After adjusting the region (you need to have open a GRASS monitor, if not, run d.mon x0) we display the SPOT image. Then we zoom into the residential area in the north-west of the satellite image. You will see the highway and, in blue shades, the residential area with the dense street network. This spot.image is a false color composite, so the colors are unnatural. For now, it is sufficient if you roughly zoom into the residential area. When zooming, always follow the mouse menu settings explained in the terminal window. Now we can extract the residential map through copying it from the base image (d.erase is required to send the new boundary coordinates to the GRASS monitor):



This will display the data description, boundary coordinates, and data range. If desired, you can even email this information to yourself or to someone else:

r.info residential mail -s residential map recip@domain.org

Raster map timestamps. Because a lot of mapping and monitoring produces time series of spatial data, it is important to store the relevant temporal information. GRASS allows us to store it separately from the history file using the module r.timestamp. This command has two modes of operation. If no date argument is supplied, then the current timestamp for the raster map is printed. If a date argument is specified, then the timestamp for the raster map is set to the specified date(s). An example for an absolute timestamp:

5.1.4 Managing metadata of raster maps

Information about the data source, accuracy, producer, date of mapping or image acquisition, date of map production, and eventual modifications, is called metadata ( data describing data ). Data documentation is crucial for GIS work, for evaluation of data quality and suitability for a given task. This is particularly important for long-term projects, or where GIS data are shared with other users.

GRASS offers the option of maintaining a history file for documentation of a map. Many analytical modules save their calculation steps into the history file automatically. But it may be necessary to store additional information. The map history can be modified using the command:

r.support

in interactive mode, i.e. starting it without any parameter. After entering the map name you may proceed with <ENTER> to the question: Edit the history file for [map]? . Confirming with y an input screen showing the metadata for this map opens up. Especially the fields for Data source and Data Description should be filled in. For example, we may want to edit the metadata for the recently created map residential (see above). Start r.support, select the map residential and proceed to the history screen. You can see that map date, title, creator, a description containing the map creating method generated by r.mapcalc and a few more entries are already stored there. You may fill the field data source with SPOT I MSS false color composite 5/27/89 . With <ESC><ENTER> you reach the next screen where you may apply further comments. Another <ESC><ENTER> takes you back to the questionnaire mode of r.support; you can skip the rest of the questions with <ENTER> and leave the module. To display the metadata of a raster map, use:

r.info residential



5.1.5 Reclassication of raster maps

Reclassification of a raster map creates a new map based on the transformation of existing categories in the original map to a new set of categories. Usually, ranges of categories are grouped into a new class using the module r.reclass. Those category numbers which are not explicitly reclassified to a new value will be reclassified to NULL. Before using r.reclass you need to know:

transformation rules (reclass table) describing which old categories will be assigned into which new categories;

optionally, names for the new categories (category labels).

We recommend using the module on the command line and storing the reclass table in a file. This is convenient in the case that additional modification of the reclass table is required. The file containing the reclass rules is read from standard input (i.e., from the keyboard, redirected from a file, or piped through another program). The following examples illustrate the concept.

First, we will reclassify the raster map roads, which includes five categories (you may check that with r.report roads). The new map will include class 1 (good quality) which will be assigned to the categories 1, 2 and

3 in the input raster, and the class 2 (poor quality) which will include the categories 4 and 5. We store the required reclass rules into a text file roads.recl:

12 3=1 good quality

4 5 =2 poor quality

r.timestamp residential date= 27 may 1989 17:58:48 -0700

Another call to

r.timestamp residential

will query and show the defined timestamp. When specifying two comma-separated timestamps (e.g. date= 27 may 19 89, 2 8 may 1989 ), they are treated as time range. Also relative timestamps can be specified:

r.timestamp rastermapl date= 15 hours 25 minutes 35.34 seconds r.timestamp rastermap2 date= 100 days

Timestamps can be removed by:

r.timestamp residential date=none r.timestamp residential

These timestamp definition rules also apply for related vector and sites modules.



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