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


Figure 6.6. Methods for transforming and interpolating vector data to raster and site data

6.4.1 Automatic vectorization of raster data

Sometimes we need to convert existing raster data (lines, areas) to vector data. This can either be done by manually digitizing in v.digit or by an automated procedure, described below. GRASS provides modules for the following types of automated vectorizing:

vector lines: r.line

vector areas: r.poly

vector isolines: r.contour

convex hull: s.hull

The first three commands are explained in Section 5.3.1, along with some examples.

To generate an outer convex boundary for a set of points, the convex hull, we can use the s.hull module. A raster or a vector map has to be transformed to the sites using r.to.sites, and v.to.sites respectively, before the module can be applied. As an example, we extract all polygons labeled with soil type VaB (Vale silt loam) from the Spearfish soils raster map and generate the convex hull map surrounding the area where this soil type appears:

r.report soils

r.mapcalc soils . VaB=if {soils == 51, 51, nullO) d.rast soils.VaB

r.to.sites ~a soils.VaB output=soils.VaB s.hull -s soils.VaB vect=soils.VaB.hull d.vect soils.VaB.hull col=blue

The resulting vector area contains all areas where Vale silt loam occurs.




It is important to define the target raster resolution before converting the vector map to raster. The resulting raster map soils.borders contains only the outlines of the soils areas.

To generate a sites map from vector data v.to.sites can be used. It transforms vector lines to sites. Without the flags -ai, only vector point data are transformed; using these flags, points defining the vector line segments are used. The density of the points along the line is controlled with dmax parameter. If these points are farther apart than the dmax, additional points are interpolated along the vector lines. As an example we interpolate sites along the roads map in Spearfish:

v.to.sites -ai roads out=roads dmax=500

This generates a sites map with points along the road at a maximum distance of 500 m (note that it is not the minimum distance!). If the present vector nodes in the input map are further apart than 500 m, new points are interpolated.

6.4.3 Interpolating raster surfaces from contour lines

GRASS provides several different methods for interpolation of raster surfaces from vector data (Figure 6.7). Depending on the method, the surface can be interpolated directly from vector data, or the vector data must first be transformed to raster lines and interpolated with the related raster module, or to sites and interpolated with sites interpolation tool. The following modules can be used:

6.4.2 Direct transformation of vector data to raster or sites

The direct transformation of vector maps into raster lines or areas requires that all vectors are labeled. All unlabeled vectors will be omitted and will thus not appear in the output raster map. Labeling of vector maps is explained in Section 6.2.2.

The module v.to.rast generates a raster map from an input vector map. Transformation of vector objects to raster cells depends on the current resolution. The resolution settings can be defined with g.region using the res (resolution) parameter. You may try several resolutions to see the effect.

If you want to get only the vector area boundaries in a raster map, you can convert the vector area map to a vector line map with v.area2line (losing the original labels), then label the lines again with v.llabel and convert to raster with v.to.rast. An example:




Figure 6.7. Interpolation of a raster elevation map layer from vector data (contours) a) voronoi polygons, b) IDW, c) v.surf.rst with default parameters, d) r. surf.contour. Note that because of their limitations, the first two methods were applied to a smaller data set than the examples c) and d)



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