After running this program, GRASS support files must be built with v.build for the binary output file
ORGANIZATION: GRASS Development Team DIGIT DATE: 1/9/2002 DIGIT NAME: - MAP NAME: test MAP DATE: 2002 MAP SCALE: 10000 OTHER INFO: Test polygons ZONE: 0 MAP THRESH: 0.500000 VERTI: A 13 5958812.48844435 3400828.84221011 5958957.29887089 3400877.11235229 5959021.65906046 3400930.7458436 5959048.47580612 3400973.65263665 5959069.92920264 3401032.64947709 5958812.48844435 3400828.84221011 A 8 5959010.9323622 3401338.36037757 5959096.7459483 3401370.54047235 5959091.38259917 3401450.99070932 5959010.9323622 3401338.36037757The associated dig_att file needs following format (store in dig_att/):
A 3401180.463379 5959003.209139 1 A 3401516.741397 5958966.635071 2
The associated dig_cats file needs following format:
# 2 categories Vector map: test 0.00 0.00 0.00 0.00 1:forest 2:water
Example 2
Generate a points vector file 'coords.txt' as ASCII file:
1664619|5103481 1664473|5095782 1664273|5101919 1663427|5105234 1663709|5102614
Import into GRASS:
cat coords.txt | v.in.ascii out=mymap
Example 3
Generate a points vector file 'points.dat' as ASCII file:
1|1664619|5103481|studna 2|1664473|5095782|kadibudka 3|1664273|5101919|hruska 4|1663427|5105234|mysi dira 5|1663709|5102614|mineralni pramen
Import into GRASS:
cat points.dat | v.in.ascii out=mypoints xcol=2 ycol=3 catcol=1 columns='cat int, x double, y double, label varchar(20)'
The module is reading from standard input, delimiter is '|' (pipe).
Example 3
Generating a 3D points vector map from DBMS (idcol must be an integer column):
echo "select east,north,elev,idcol from mytable " | db.select -c | v.in.ascii -z out=mymapThe module is reading from standard input, delimiter is '|' (pipe). The import works for 2D maps as well (no elev column and no '-z' flag).
The GRASS program v.out.ascii performs the function of v.in.ascii in reverse; i.e., it converts vector files in binary format to ASCII format. These two companion programs are useful both for importing and exporting vector files between GRASS and other software, and for transferring data between machines.
The input from v.in.ascii has to be placed into $LOCATION/dig_ascii (this directory must be created if not existing) or piped into the module.
Last changed: $Date: 2004/04/14 14:11:23 $