def __init__(self, number=None, name=None, table=None, key=None, database=None, driver=None, c_fieldinfo=None): if c_fieldinfo is not None: self.c_fieldinfo = c_fieldinfo else: self.c_fieldinfo = ctypes.pointer(libvect.field_info()) self.number = number self.name = name self.table_name = table self.key = key self.database = database self.driver = driver
def __init__(self, layer=1, name=None, table=None, key='cat', database='$GISDBASE/$LOCATION_NAME/' '$MAPSET/sqlite/sqlite.db', driver='sqlite', c_fieldinfo=None): if c_fieldinfo is not None: self.c_fieldinfo = c_fieldinfo else: self.c_fieldinfo = ctypes.pointer(libvect.field_info()) self.layer = layer self.name = name self.table_name = table self.key = key self.database = database self.driver = driver