1 |
# Copyright (c) 2001, 2002, 2003 by Intevation GmbH |
# Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH |
2 |
# Authors: |
# Authors: |
3 |
# Bernhard Herzog <[email protected]> |
# Bernhard Herzog <[email protected]> |
4 |
# Jan-Oliver Wagner <[email protected]> |
# Jan-Oliver Wagner <[email protected]> |
367 |
else: |
else: |
368 |
raise ValueError("DBConnection %r is still in use" % (dbconn,)) |
raise ValueError("DBConnection %r is still in use" % (dbconn,)) |
369 |
|
|
370 |
def OpenDBShapeStore(self, db, tablename): |
def OpenDBShapeStore(self, db, tablename, id_column = None, |
371 |
|
geometry_column = None): |
372 |
"""Create and return a shapstore for a table in the database |
"""Create and return a shapstore for a table in the database |
373 |
|
|
374 |
The db parameter must be a database connection previously passed |
The db parameter must be a database connection previously passed |
375 |
to AddDBConnection(). |
to AddDBConnection(). |
376 |
""" |
""" |
377 |
store = postgisdb.PostGISShapeStore(db, tablename) |
store = postgisdb.PostGISShapeStore(db, tablename, |
378 |
|
id_column = id_column, |
379 |
|
geometry_column = geometry_column) |
380 |
self._add_shapestore(store) |
self._add_shapestore(store) |
381 |
return store |
return store |
382 |
|
|