If you find this document usefull, please consider ordering a printed hardcopy!



11 Working with vector data

The file structure for saving vector data differs between GRASS 5.4GRASS 6.0illustrated in figure 5 of chapter 2.3. For this reason, old and new vector data can be created and managed in parallel in the same location/mapset. Furthermore, file names can be maintained by converting data from GRASS 5.4the new native GRASS 6.0. The module v.convert converts 'old' vector data out of GRASS 5.4the new native vector format:

v.convert in=grass5old_vector out=grass60_vector
g.region -p vect=grass60_vector
v.info grass60_vector
v.db.connect -p grass60_vector
d.vect grass60_vector

If necessary, conversion from GRASS 6.0to the old vector format is possible, via the ASCII format or the SHAPE format (the latter process is recommended). Note that the vector format of GRASS 5.4only save one attribute and one label each. When using v.in.shape the attribute columns can be displayed by GRASS 5.4the parameter -d:

# EXPORTING VECTOR MAP FROM GRASS AS SHAPE
v.out.ogr in=grassnew_vector dsn=. layer=vector_areas type=area

# IMPORTING SHAPE INTO GRASS 5.0/5.4
v.in.shape -d in=vector_areas.shp 

Attribute layers available in vector_areas.shp:
1: ShapeID [int4:4] 
2: TypID [int4:2] 
3: Name [text:50] 
4: TypName [text:50]

v.in.shape in=vector_areas.shp out=vector attr=TypID label=TypName
...



Subsections


If you find this document usefull, please consider ordering a printed hardcopy!


© 2005, GDF Hannover bR - Solutions for spatial data analysis and remote sensing
Last modified: 29-08-2005