[GRASS-dev] GRASS-Python Interface: Vector API added

Markus Neteler neteler at itc.it
Sun Sep 24 04:46:09 EDT 2006


Hi,

I have added the Vector API to the GRASS-SWIG-Python interface.
Now w have to figure out how to use it :-)


I am struggling there (don't know much about Python yet):

#### snip #####
import python_grass6 as g6lib

input = 'soils'
mapset = 'PERMANENT'

g6lib.G_gisinit('')
g6lib.Vect_set_open_level (2)

## how to set Map?
g6lib.Vect_open_old_head (Map, input, mapset)
print 'Vect is 3D:'
print g6lib.Vect_is_3d (Map)

g6lib.Vect_open_old(input, mapset)
print 'Vect DB links'
print g6lib.Vect_get_num_dblinks(Map)


g6lib.Vect_close(Map)

#### snap #####


Markus




More information about the grass-dev mailing list