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

(C - Customize, O - backdrop vector map or B - backdrop raster map). The D key gives you access to the digitizing menu, t changes the vector type from lines to site. By pressing <SPACE> you can start to digitize single vector sites. The next step is assigning labels with l; for example, in the case of an archaeological site you can add the name to each site. When labeling, each vector site is assigned a category number with the text label as category label. For digitizing, mark the vector site in the map appropriately. A labeled site mark changes its color.

As mentioned before, the digitized sites are saved as point vector data and can be converted into GRASS sites model using v.to.sites. Manual digitizing of point data can be a time consuming process prone to errors; therefore, it is used only as a last resort solution.

7.1.2 Generating site data within GRASS

Several GRASS modules can be used to create a new sites map layer. For example, a raster can be transformed directly to sites using r.to.sites, which creates a site for each grid cell center expressed as east north #value. If the current resolution is lower than the resolution of the raster file, the nearest neighbor cell value is used. Optionally, the values stored in the raster map layer can be expressed as a floating point attribute or a third dimension using the -a or -z flags, as illustrated by the following examples showing the command (stored as a desc entry in the site file header) and the resulting sites file format (note that you can use the same name for your site and raster maps, because GRASS stores them in a different directory):

nameroads

descIr.to.sites input=roads output=roads label=rd.category form I I I#

labels I Easting I Northing I#rd.category 60568514927985#3

nameslope

descIr.to.sites -a input=slope output=slope label=slope form I I I %

labels I EastingNorthing%slope 5902 35 I 4 921965 1%13.61707306

nameelevation.dem

descIr.to.sites -z input=elevation.dem output=elevation.dem ... form I I I I

labelslEastingI Northing I elevation 590235 I 49219651193

Similarly, a 3D raster volume can be transformed to 3D sites by using rS.to.sites, which is useful for viewing the 3D data with nviz (see Section 8.2.4).



A raster map layer can be sampled randomly using r. random resulting in a sites map layer which contains points that are the centers of randomly selected grid cells. For example, you can create a random grid points site file from our Spearfish DEM by running:

g.region rast=elevation.dem

r.random elevation.dem nsites=3000 sites out=elev.rnd.3k

The module writes the coordinates of 3000 points along with the values from the elevation.dem as a decimal attribute to the site file elev.rnd.Bk. You can specify the number of random sites to be generated either as a positive integer, or as a percentage of the raster map layers cells (e.g., 10%). If you already have a site file and you want to add an attribute based on the values stored in a raster map, you can use s.sample:

s.sample archsites out=archsites.slope rast=slope

The new site file will now include the slope at each archeological site stored as a floating point attribute:

namearchsites.slope

descI slope[rast] sampled at archsites[sites] by Nearest Cell 593493M914730 I #1 %5.75962543

Vector data can be transformed to sites using v.to.sites. You can transform only the point features (nodes) from your vector map layer, or all vertices that define the vector lines. If the distance between any two vertices on a line is greater than a distance given by dmax parameter, additional points are interpolated on the line using a spline function to keep the maximum distance between the vertices within the dmax range.

It is also possible to create new site data from an existing sites map layer by perturbing (adding a variable spatial deviation) the east and north coordinates using s.perturb. This deviation can be a uniform value or a delta value with normal distribution. Randomly distributed sites can be generated by s.random. Unlike the result of r.random, these sites will include only the coordinates and no attributes.

Generating site lists using UNIX pipes. Several GRASS modules can be used to produce output in a format suitable for input to s.in.ascii. For example, you can pipe output produced by d.where into s.in.ascii to create a site list file containing site locations selected by a mouse:

d.where s.in.ascii sites=mysites



In another example, you can calculate distances of given points, stored as GRASS sites, to the nearest vector line. Here, the distances of archaeological sites to the closest road, given in a vector map, are calculated. The individual distances are stored as a new sites map (columns east, north, sitesID, distance, vectorline-catnum):

s.out.ascii -d archsites v.distance roads Is.in.ascii fs= Г\

sites=dist

In this case, the field separator is required as v.distance outputs the pipe character.

7.2. VIEWING AND MANAGING SITE DATA

Basic information about a sites map layer can be obtained by running s.info. The output prints out the number of sites within the given region, number of dimensions, as well as the minimum and maximum values for coordinates, categories and attributes:

If the output is not what you have expected, check your format - you can read your site data by going into the site lists directory in your MAPSET and edit the file archsites using any of the UNIX text tools (see Appendix A) or any text editor.

7.2.1 Displaying site data and creating subsets

You can view your site data in the GRASS graphical window using d.sites, for example:

d.sites archsites color=red size=2 type=diamond

will draw your sites using a diamond symbol with 2 pixel size in red color. Use d.site.labels to label the sites using the category, floating point or text (string) attribute. You can also query your sites interactively, using the mouse to get the coordinate values and attributes of site(s) nearest to the location selected using the mouse:





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