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

GRASS allows users to store the geometrical component of a vector map layer in the binary vector format, which is the default, and optionally in the ASCII vector format, mostly used for data exchange or modification by text editor. The category labels are always stored in ASCII format, and both the category numbers file and the category labels file are shared between ASCII and binary vector format.

It is generally recommended to store vector line features and vector area features in separate map layers.

GIS vector data are available in a wide range of different formats, with no single standard available, although some formats (e.g. ESRI SHAPE) are more common than others. Because of the complex data structure, exchange of vector data is often more complicated than is the case for raster data. In GRASS 5.3, the import is handled by a specific command for each different format; a vector equivalent to r.in.gdal is available from GRASS 5.7 onwards (v.in.ogr).

4.2.2 Import of vector data

After running the appropriate command, the imported vector data are stored in the GRASS binary vector format. For each vector map layer, topology has to be built. This is done either by the import module by specifying the relevant flag, or it needs to be done after the import using the module v.support. If the vector map does not have the topology built, commands which need the topology will print a related error message. The actual topology status can be queried with v.info.

Import of SHAPE files. Vector data in the commonly used ESRI SHAPE format are imported using the module v.in.shape. It is important to know that SHAPE files are not stored in a topological format but as Simple Features . This may lead to problems because common area boundaries are stored duplicated (can lead to gaps and slivers problems). The module v.in.shape contains an internal topology engine which fixes a lot of common SHAPE file problems. The parameters snapdist and sliver are useful when importing a manually digitized SHAPE map to properly snap common lines. Files can be read from any directory; if no path is specified, the current directory is used. Because GRASS 5.3 internally supports only a single attribute per vector, you have to select the column with the attribute that you want to store while importing. When using the flag -l, only the table field definitions (field names and types) of the associated .dbf file are listed. For the data import, the columns used for category number and category label have to be selected from the DBF table:



Import of E00 files. Vector data in the ESRI E00 format are imported with m.in.eQQ. The E00 format is preferred to the SHAPE files because it keeps a better data structure as well as the projection information. The attribute import differs from v.in.shape in that m.in.eQQ imports all attribute columns and stores them in different category label files while generating a single map containing the vector geometry. To illustrate how to create vector map layers with the desired attributes we import the vector map:

m.in.eOO -s roads.eOO

The name of the imported file in GRASS will be roads and, with the flag -s, the topology is automatically built. Assume that this E00 file contains the columns with attributes called width and velocity . The best way to create the two vector map layers (one for each attribute) is to generate copies of the vector geometry map with the same names as the category label files. This leads to replicated geometry files but is the only way to make all attributes available without external DBMS. For this modification you can look into the GRASS DATABASE to get the names of the category label files. The procedure is somewhat inconventient, a much smarter attibute management is provided with GRASS 5.7. First we change into the GRASS DATABASE into the MAPSET subdirectory. The g.gisenv command delivers the required variable names:


The flag -l generates a long (complete) directory listing; the flag -t sorts by timestamp and -r reverses the sort order to have the newest files at bottom for convenience. By running this command you will see the names of the recently generated category label files. In our example there will be the files roads.width and roads.velocity according to the attribute columns in the E00 file. We have to preserve the category label files from overwriting during this procedure, so we change their names to temporary names:

mv roads.width roads.width.tmp

mv roads.velocity roads.velocity.tmp

V.in.shape -1 roads.shp out=myroads

V.in.shape roads.shp out=myroads scale=l:24000 att=CAT ID\

label=CAT DESC

Because the map scale is not stored in the SHAPE files, the appropriate scale should be specified during import. Please refer to the module manual page for details.



Now copy the vector geometry map to the desired new names:

g.copy vect=roads,roads.width mv roads.width.tmp roads.width v.info roads.width

g.copy vect=roads,roads.velocity

mv roads.velocity.tmp roads.velocity

v.info roads.velocity

The v.info command should report that both vectors and attributes are stored in the map. Generally this procedure can be performed for all category label files in the dig cats/ directory which were generated by m.in.eQQ during a E00 file import.

The module can read E00 files from any directory. If no path is specified, the current directory is used.

Import of UNGENERATE files. The ESRI UNGENERATE format is a generic ASCII vector exchange format which is supported by numerous GIS. Depending on the vector map type (line vectors or polygon vectors) it consists of a differing number of files. Line vector maps, also called line coverages , are two files with .lin (vector lines) and .dat (line attributes) extension. Polygon vector maps, also called polygon coverages , consist of three files with .pol (vector polygons), .pt (attribute label points) and .dat (polygon attributes) extensions. You have to take care to receive or provide a complete set of files when exchanging data in UNGENERATE format.

These data are imported with v.in.arc. An import example for a polygon map:

v.in.arc type=polygon lines in=topol2.pol points in=topol2.pnt\ text in=topol2.dat vector out=topol2 idcol=l attcol=2 catcol=4

It is important to specify the correct columns for the parameters idcol, catcol and attcol. The parameter idcol links to a numerical field containing the vector IDs (line-IDs). The parameter attcol links to the category numbers (attribute IDs) which also contains numbers. The parameter catcol links to the category labels which may be an attribute text label. Files can be read from any directory. If no path is specified, the current directory is used. An import example for a line map:

v.in.arc type=line lines in=topol2.lin text in=topol2.dat\ vector out=topol2 idcol=l attcol=2 catcol=3

After import the topology has to be built by:

v.support topol2



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