If you find this document usefull, please consider ordering a printed hardcopy!
In GRASS 6.0are no longer stored seperately in a directory site_lists but they are saved as vector points and analysed with the vector modules. Vector sites that are for instance available as SHAPE data will be imported with the module v.in.ogr like it is mentioned in the following example:
v.in.ogr -o dsn=./frida-1.1-shp-joined/poi-joined.shp out=poi
268 primitives registered 0 areas built 0 isles built Number of nodes : 268 Number of primitives: 268 Number of points : 268 Number of lines : 0 Number of boundaries: 0 Number of centroids : 0 Number of areas : 0 Number of isles : 0
Importing Eastings and Northings (X|Y)
Often sites are given as eastings and northings in simple ASCII table to be imorted into GIS. For this purpose, GRASS offers the module v.in.ascii. The sites should be listed in the order Easting Northing Value. The separator plays no special role. For example, a file (coord.txt) shall be imported whose columns are separated by the 'pipe' sign:
1664619|5103481 1664473|5095782 1664273|5101919
cat coords.txt | v.in.ascii out=points
Missing category values (IDs) can be added after the fact using the v.category module, so that it is possible to assign additional attributes to be stored in the database:
v.category in=punkte out=points2 op=add
v.category points2 op=report
The site information is then available as GRASS vector format
in the current location in the folder vector of the GRASS database.
Importing elevation data (X|Y|Z) If a third column contains elevation data as the attribute, the parameter -z must be added to the v.in.ascii command:
1664619|5103481|101.2 1664473|5095782|102.2 1664273|5101919|101.7
cat coords3d.txt | v.in.ascii -z out=elevation
v.category in=elevation out=elevation2 op=add
v.category elevation2 op=report
Examples of how to extract sites from existing databases are given in chapter 10.
If you find this document usefull, please consider ordering a printed hardcopy!