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

Generally, we recommended setting the map scale to the true map scale. As the scale is unfortunately not stored in the UNGENERATE format (GRASS will set an imported UNGENERATE map to 1:1 scale per default), the map scale can be set with the module v.digit. The first metadata screen after loading the vector map (for Select digitizer select none ) provides the entry for the map scale. After leaving this screen with <ESC><ENTER>, v. digit can be left: Either answer Shall we continue? [y] with n or leave it from the main menu with Q (quit).

Import of GRASS ASCII vector files. The generic GRASS ASCII vector format is very similar to the UNGENERATE format. For lines, the label points are positioned on the vector lines. For polygons, the label points are stored within the polygons. If these rules are not fulfilled, v.support will print a warning ( PNT TO AREA failed ). If you have an imported binary vector map with some topological problems, exporting the map to ASCII format is a way to investigate the data. Each line or polygon is written into an ASCII file which can be edited with a text editor. This file has an associated label points file and an attribute table.

The module v.in.ascii expects the vector lines file within the LOCATION and MAPSET in subdirectory dig ascii/. The category labels (attributes) have to be stored in dig cats/ (in this directory, GRASS keeps its category label table as ASCII files). The label points file is written into the directory dig att/. To get some experience, it is a good idea to export an existing vector map layer and study the resulting files - for an example, see the paragraph Export into GRASS ASCII vector format in the next Section.

The ASCII vector map can be converted to a GRASS binary vector map with v.in.ascii. As mentioned, the module will read the associated files from the dig ascii/, dig att/ and dig cats/ directory. The resulting GRASS binary vector file is stored in dig/ while the other files remain unchanged.

Import of SDTS files. SDTS (Spatial Data Transfer Standard) and the TVP (Topological Vector Profile) define two basic types of spatial objects: simple spatial objects, i.e., lines, polygons, nodes, etc. and composite objects, which are made up of one or more other simple and/or composite spatial objects. SDTS composite objects, which GRASS cannot handle directly, are imported as records in DBMS-ready tables.

v.in.sdts creates one or more GRASS vector maps in the current MAPSET from a Spatial Data Transfer Standard data set conforming to the Topological Vector Profile (TVP). The program generates file within the LOCATION in the directories dig/, dig att/, and dig cats/. If requested, files of attributes in database-ready form are created, along with scripts to create an appropriate



SQL-compliant relational database and load the attribute files into the new database. Special database-ready files of tables linking the attributes to the GRASS vector map layer or layers are also generated. The source SDTS data set must be in the users current directory. Before importing, it is possible to look at the files contents with flag -i:

v.in.sdts -i catd=ROADCATD.DDF

v.in.sdts catd=ROADCATD.DDF output=sdtscoads

We can use the module m.sdts.read for querying info about SDTS files, such as the data quality, lineage, etc. It reads SDTS or other data from files in ISO 82II (FIPS 123) format and dumps contents to screen and/or file:

m.sdts.read in=ROADCATD.DDF

m.sdts.read -s in=FFFFCATD.DDF out=sdtsdump

With first command the data are shown record-wise, the second command dumps the data into text file sdtsdump. For further details please refer to the manual pages.

Import of DXF files. GRASS supports import and export of vector maps in DXF format. Both 2D and 3D DXF are supported for reading, but GRASS 5.3 stores the vector information as 2D vectors with an attribute.

As an example we show the import of a 3D DXF contour line map. This requires a few steps. When only specifying the map name and no further parameters, the DXF map is completely imported. In case of different map layers existing within the DXF file, these layers will be written into separate GRASS vector maps. Alternatively, you can specify the line selector to only import a subset of layers or just a single layer. As an example, we import the layer CURVES from the DXF file contour.dxf which is stored in the current directory. The first command v.in.dxf will print a warning WARNING: 3-d data in dxf file in case 3D data such as contour lines are present. This indicates that v.in.dxfBd should be run afterward to attach the elevation information to the line vectors (not required for 2D DXF files):

v.in.dxf dxf=contour.dxf line=CURVES v.in.dxf3d dxf=contour.dxf line=CURVES v.support contour.CURVES d.vect contour.CURVES d.what.vect

The GRASS vector name is a composition of the imported DXF file name and the selected layer. The layer names, as stored in the DXF layer, are displayed at the end of the import process. For an inspection, the imported map may be displayed with d.vect and queried. The query module d.what.vect



allows us to select vectors by mouse and to print their attributes. Such vector queries are explained in Section 6.3.1 in further detail.

Note that, apart from the GRASS binary format, DXF files can be imported also into GRASS ASCII format using the flag -a (v.in.dxf). This will require a subsequent run of v.in.ascii to convert the map to a GRASS BINARY vector map for the later usage with other vector modules. Please refer to the manual page for further details. If desired, you can also specify the optional parameter prefix which allows us to define the name of the map within GRASS. The prefix is extended with the layer name extension.

When importing DXF polygons, a problem occurs because the second mentioned module v.in.dxfSd works correctly only for line vectors. As a workaround you can run v.line2area after importing the DXF file to convert the vector type from lines to polygons. Subsequently use v.alabel to label the polygon vectors. Finally, use v.support to build the topology.

When importing DXF contour maps, it is possible to import a 3D contour DXF file in one step with the script v.in.dxfSd.sh. It internally runs the v.in.dxf, v.in.dxfSd and v.support modules. It requires to specify the DXF layer names for the layer keeping the contour information and the layer for the z values (the name may be identical):

V.in.dxfSd.sh dxf=contour.dxf linel=CURVES line2=CURVES

Coordinate transformation for xy DXF vector data. Often DXF data are delivered in non-georeferenced xy coordinates. To use them along with other GIS data, these coordinates have to be transformed to the coordinate system of the current LOCATION. The module v.transform requires a table of ground control points (GCPs, also called tie points) to perform this transformation. It is a table of points with xy coordinates and their corresponding georeferenced coordinates. To generate this table, coordinates of points such as road intersections etc. are identified in the DXF map and another corresponding reference map. Also, GPS points measurements can be used.

In GRASS, the DXF map geocoding process is three-fold. First, the DXF data are imported into the projected LOCATION, although the DXF map keeps its xy coordinates reference. Second, the ground control points are identified within the imported DXF map as well as the reference map or taken from GPS measurements and stored in a text GCPs table. Finally, the imported map is transformed to the current LOCATION coordinate system by shifting and rotating the input DXF map using the GCPs table.

To illustrate the procedure we will import the DXF map vmap.dxf (xy coordinates) and transform it to the map refmap stored in a georeferenced LOCATION, in this case in the Gauss-Boaga Grid System (Italian national grid system). To start, the DXF map is imported into this LOCATION as a GRASS ASCII vector map:



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