[GRASS-user] getting from DBF to SQLite

Michael Barton Michael.Barton at asu.edu
Fri Feb 15 10:34:08 PST 2013


I'm not sure how to pull it off now given the current structure, but IMHO, the ideal organization would be to have 1 sqlite DB for each vector file--so a single DB for all layers of a single vector. 

That makes vector files portable. I'm not sure if joins across layer tables are needed because the layer structure is an inherent join. 

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Feb 15, 2013, at 9:29 AM, Markus Metz <markus.metz.giswork at gmail.com>
 wrote:

> On Fri, Feb 15, 2013 at 8:21 AM, Micha Silver <micha at arava.co.il> wrote:
>> On 15/02/2013 01:42, Hamish wrote:
>> 
>> Markus Metz wrote:
>> 
>> In GRASS 6.4.1- it was possible to have a separate sqlite db
>> for each vector in $MAPSET/vector/$MAP/sqlite.db. I have no
>> idea why this option has been disabled. The VAR file can be
>> 
>> DB_DRIVER: sqlite
>> DB_DATABASE:
>> $GISDBASE/$LOCATION_NAME/$MAPSET/vector/$MAP/sqlite.db
>> 
>> Should we revert the changes that make it now impossible to
>> have a separate sqlite db for each vector?
>> 
>> AFAIK it's still possible to have a separate sqlite db for each
>> vector if you use v.db.connect (see v.pack.py), it's just that
>> you can't tell db.connect to make that the default for all new
>> maps.
>> 
>> perhaps if [v.]db.connect understood to parse '$MAP' you could
>> have a portable
>> database='$GISDBASE/$LOCATION_NAME/$MAPSET/vector/$MAP/sqlite.db'
>> 
>> string saved in the VAR file? (and so, by default but user-
>> alterable, all sqlite layers for that map saved in the same file)
>> 
>> 
>> "db.sqlite" or "sqlite.db" for the filename?
>> 
>> 
>> If the $MAP variable is available, I'd like to see the database names as
>> '$GISDBASE/$LOCATION_NAME/$MAPSET/vector/sqlite/$MAP.sqlite'
> 
> This could cause problems with SQLite directory locking because of
> [0]. Therefore I would prefer to restore the previous behaviour of
> allowing '$GISDBASE/$LOCATION_NAME/$MAPSET/vector/$MAP/sqlite.db
> 
> Markus M
> 
> [0] http://www.sqlite.org/lockingv3.html
> 
>> 
>> and I think you're suggestion to put all layers for a vector into one sqlite
>> file does make sense. THere are definitely situations where you want to join
>> between different layers within the same vector. Having both in the same
>> sqlite makes that easier.
>> 
>> 
>> Hamish
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>> 
>> This mail was received via Mail-SeCure System.
>> 
>> 
>> 
>> 
>> --
>> Micha Silver
>> GIS Consulting
>> 052-3665918
>> http://www.surfaces.co.il



More information about the grass-user mailing list