[GRASS-dev] Re: [GRASS GIS] #809: v.db.addtable consistently fails
in winGrass
GRASS GIS
trac at osgeo.org
Fri Jan 8 03:42:03 EST 2010
#809: v.db.addtable consistently fails in winGrass
------------------------------+---------------------------------------------
Reporter: JonBall | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: Vector | Version: svn-releasebranch64
Resolution: | Keywords: v.db.addtable, wingrass
Platform: MSWindows Vista | Cpu: x86-64
------------------------------+---------------------------------------------
Comment (by mmetz):
Replying to [comment:11 hamish]:
> stuff to audit, both for spaces in path names and for correct column
parsing when fs=':' and a path like "C:\Documents and Settings" is being
parsed.
I had a look at the vector lib routines for reading/writing database
connections (dblinks in the vector libs).
The database is written to dbln without parsing any variables in it; that
makes it possible to copy entire locations or provide sample datasets with
vectors and attribute tables. Any variables in the database info are
parsed by Vect_get_dblink() which calls Vect_subst_var().
v.db.addtable calls v.db.connect which calls Vect_get_dblink() -> any
variables like $GISDBASE/$LOCATION_NAME/$MAPSET are already substituted.
The only way I see to get the database used by an existing layer *without*
parsing any variables is raw parsing of the dbln file. AFAICT, vector
modules use default database connection settings when adding a new table,
also when e.g. adding a table for layer 2 and there is already a table
connected to layer 1. Therefore it would not be unusual behaviour if
v.db.addtable also always uses the default database connections.
Markus M
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/809#comment:12>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list