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

d.mon stop=PNG

The resolution of the resulting image, its background color, true color support, and the name of the output file are controlled by GRASS variables and UNIX environment variables (see the manual page for the PNG driver). For example, to output your raster map as an image called myimage.png with the size of 3000 x 4000 pixels, you need to set your environmental variables as follows:

export GRASS WIDTH=3000

export GRASS HEIGHT=4 000

export GRASS PNGFILE=myimage.png

Otherwise your output will use the default settings; that means 8 bit colors, the 640 x 480 image size, and the file name map.png.

HTMLMAP driver. The HTMLMAP driver supports the generation of HTML image maps for area vector data. In these maps, different portions of an image are linked to URL targets, such as web sites or web documents.

The driver can be used only with the following GRASS display commands: d.text to pass HREF information for resulting image maps and d.area to draw polygons from a vector map. The use of this driver is similar to the use of the GRASS monitor, but it stores all output to a HTMLMAP file, as illustrated by the following example. First, start up the driver:

d.mon start=HTMLMAP d.mon select=HTMLMAP

Then, you can display two vector maps along with strings to define the target

URLs:


Pipe the text defining the target URLs using the UNIX echo command; alternatively, you can just type d.text and provide the parameters defining the size and color of the text, as well as the text itself ending it with EOF (<CTRL><D>). To write the HTMLMAP file to your current directory, you just stop the driver:

d.mon stop=HTMLMAP

The size of the image, output file name, and the HTML type (client, apache, raw) are defined by GRASS environment variables, as they are for the standard GRASS monitor or PNG driver (see HTMLMAP driver manual entry). By default, the map will be written to a file called htmlmap as a client type of image.



<HTML> <BODY>

<img src=/metimg/ bac)cmap.png ijsemap= #map alt = grass > <MAP NAME= map > <AREA SHAPE= POLY HREF= http: www.dummyurl.dum/gis/ [. . .] </MAP> </BODY> </HTML>

The web user will see the backmap.png in the browser, links are related to the defined area map. Obviously both should be related to each other.

8.1.4 Animations in 2D space

If you have a series of data (temporal, spatial, parameter scans) you can animate them using xganim. The command loads a specified series of GRASS raster map layers and then animates the series. Up to four different map series can be animated simultaneously - a task often needed when analyzing outputs from simulations of landscape processes. For example, you can animate the evolution of water flow and discharge, stored in raster files hh0 010 0 through hh010 0 0, and qw0 010 0 through qw010 0 0 in the Spearfish data set, as follows:

xganim viewl= hhO* view2= qw0*

You can either list all the map layers by name or use wildcards, however, you need to be careful about the numbering system that you use to ensure proper order of map layers, and keep the possibility to insert additional layers. The program provides a simple interface with controls for speed, looping, direction of play, running and stopping the animation, and stepping through the frames. If the animation is jumpy , it is usually because your pattern does not change smoothly - you can add additional frames by interpolating between the map layers. Often, a simple average between two raster maps is sufficient (use r.mapcalc). Animation is also useful for browsing through a larger set of map layers and as a preview tool when preparing data for animation in 3D using nviz. To save your animation slides as an MPEG file, use r.out.mpeg (see the manual how to use wildcards).

The image map can be combined with an underlying raster image (backmap.png in our example) created by the PNG driver and inserted into a HTML document with reference to the HTML map. The basic structure is:



8.2. VISUALIZATION IN 3D SPACE WITH NVIZ

The advanced, interactive visualization tool nviz can be used to view the data in 3D space and to perform visual analysis of multiple surfaces, vector and site map layers. The module is fully integrated with the GRASS data structure and runs directly from the GRASS prompt. It also supports scripting for producing dynamic visualizations via animation. To learn how to use nviz read Nviz tutorial that can be accessed by clicking on the help button of its interface. To get you started, we provide a brief overview of nviz capabilities with few examples. You can find numerous images created by nviz throughout this book. The module provides the following capabilities:

visualization of 2D raster map layers as multiple surfaces in 3D space, with the capability to use different data sets for surface topography, surface color and transparency;

interactive positioning, zooming, and z-scaling;

interactive lighting with adjustable light position, color, intensity and surface reflectivity;

display of multiple vector map layers draped over selected surfaces or flat at a selected height;

display of multiple site data layers draped over selected surfaces or in viewing 3D in their 3D location;

animation capabilities with two options:

- key-frame animation for creating fly-bys,

scripting for automatically generating complex animations from series of map layers;

interactive query of raster data displayed as a surface and color; interactive slicing through multiple surfaces using cutting planes.

The nviz module is enhanced quite frequently, so some differences between the latest version and our description are possible. The most important updates will be posted on the GRASS Tutorials Web site.4

8.2.1 Viewing multiple map layers

You can start the program without defining any map layers by

nviz -q



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