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

v.in.dxf -a dxf=vmap.dxf prefix=vmap

For every DXF layer (DXF lines, DXF labels, .), an ASCII vector map is created within the LOCATION in the subdirectory dig ascii/. In our example it will be an ASCII vector map vmap.lines. To build its topology, this map then needs to be converted to the GRASS binary vector map vmap xy:

v.in.ascii in=vmap.lines out=vmap xy v.support vmap xy

Now the DXF map is in the xy coordinate system in the LOCATION with Gauss-Boaga Grid System. Next step is to identify the ground control points by selecting them from the maps displayed in the GRASS monitor. To do that, we have to reset the current region to the imported DXF map before using the display command, otherwise we would see nothing (i.e., the map is located outside the displayed area). The adjustment of the current region is done with g.region by specifying the vector map name. The optional flag -p will also output the map boundary coordinates:

g.region -p vect=vmap xy d.erase

d.vect vmap xy

The command d.erase sends the updated coordinates to the GRASS monitor and erases the screen, and then d.vect displays the map.

Because we do not expect internal map distortions, we have to identify only four ground control points for the transformation. To get these GCP xy coordinates for the imported DXF map, we can use d.where. We store the coordinates of these four GCPs of the xy vector map in an ASCII file (e.g. called POINTS) in the $HOME directory. We can use any text editor to write each xy coordinate pair on a separate line. The next step is to find the corresponding four GCPs in the projected reference map or to assign corresponding coordinates from a GPS measurement. When using GPS data, just enter the georeferenced coordinates values. When using a reference map in the current LOCATION, for example the vector map refmap, the current region has to be reset to this map and the map should be displayed:

g.region -p vect=refmap d.erase d.vect refmap

Again, d.where helps to get the corresponding four GCP coordinate pairs from the reference map. Store these values in the ASCII table next to the related xy coordinates as EASTING NORTHING with all values delimited by a space. Such a table may look as follows (the first two values are the X and Y coordinates, the second two values are EASTING and NORTHING):



Now the coordinate transformation from xy coordinates to Gauss-Boaga coordinates can be performed. The module v.transform will read the GRASS ASCII vector file vmap.lines which is stored within the LOCATION in the related MAPSET subdirectory dig ascii/. The command sequence for our example is:

v.transform in=vmap.lines out=vmap trans point=$H0ME/P0INTS v.in.ascii in=vmap trans out=vmap trans v.support -r vmap trans

The module transforms the coordinates of the nodes and vertices of the DXF map and prints out the RMS (root mean square) error for each GCP. An acceptable RMS error for a 1:24,000 map would be 1.2 to 2.4 meters. If this is not reached, the selection of the GCPs should be redone. Finally, the transformed map must be converted to the binary vector format with v.in.ascii for later usage (same names are allowed) and the topology generated.

To verify the transformation result, we have to reset the current region to the transformed map. Then we can display it over the reference map:

g.region -p vect=vmap trans

d.vect refmap

d.vect vmap trans col=red

Both maps should match well.

Import of GSHHS Shoreline files. An interesting vector data set with excellent accuracy is the GSHHS (Global Self-consistent, Hierarchical, High-resolution Shoreline Database, Wessel and Smith, 1996). The sources of data were the CIA World Data Bank II, designed for a scale of about 1:2,000,000, and the NOAA World Vector Shoreline, which is at a scale of 1:250,000. The GSHHS shorelines are constructed entirely from hierarchically arranged closed polygons. The data can be used to simplify data searches and data selections, or to study the statistical characteristics of shorelines and land-masses. The data set can be accessed from the GSHHS Web site5 and from the National Geophysical Data Center (NGDC), Boulder, Colorado (USA). The related GRASS module is v.in.gshhs. It optionally allows us to geographically limit the import to a subregion. The GSHHS data are freely available at five different resolutions: crude, low, intermediate, high, and full. The [c,l,i,h]-versions were derived from the GSHHS full resolution file using the Douglas-Peucker algorithm which simplifies a line segment given a tolerance (0.2 km

838.8 244.2 1661701.3 5108172.4

796.2 192.6 1661643.2 5108204.3

796.2 91.6 1661543.7 5108181.8

1110.6 379.0 1661864.4 5108076.6



to 25 km). GSHHS coordinates are originally in the latitude-longitude coordinate system. If required, they can be transformed during import to the current LOCATION coordinate system. A selected subarea can be imported by specifying boundary coordinates, or by using the flag -g to use the current GRASS region as boundary constraints. The flag -a allows us to import vector data as area type (default is line type). The following example imports an intermediate resolution shoreline map file into GRASS using the current GRASS region and automatically runs v.support after import:

v.in.gshhs -gs gshhs i.b out=shoreline.lowres

This imports the map into the current region, clipping it to the region boundaries and builds the topology.

4.2.3 Export of vector data

Data exchange of GRASS vector data with other GIS is supported in various formats.

Export into SHAPE format. To export GRASS vector files to ESRI SHAPE format, the module v.out.shape can be used. A GRASS vector file to be exported to SHAPE may contain both vector lines and vector polygons. If you select the parameter type=both for conversion, two layers will be produced with the appended suffixes line and area respectively for lines and polygons. However, lines used as area edges are not duplicated in the lines layer. Please keep in mind that it is generally recommended to store vector lines and areas in separate map layers. The cats parameter allows us to optionally export category labels if they are present. They may be written according to their type as character string, integer, or float number into the associated DBF file. The flag -v enables verbose output to see the export progress.

As an example, we export the vector roads map of the Spearfish data set, stored in MAPSET PERMANENT. The stored vector types can be checked with v.info which reports whether the topology is present, the numbers of category labels, vector lines, areas and islands (areas in areas). To export, the vector type has to be set accordingly ( line , area or both ). An example for the Spearfish roads map which contains only lines is:

v.info roads

v.out.shape -v roads type=Iine mapset=PERMANENT cats=string

Three files are written into the current directory: roads.shx, roads.shp and roads.dbf. From GRASS 5.7 onwards also the corresponding .prj file containing the projection information will be generated when exporting to SHAPE format. The written DBF file may be inspected with gnumeric, a free spreadsheet software.



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