On Tuesday 21 October 2008, Markus Neteler wrote: > On Tue, Oct 21, 2008 at 6:01 PM, Dylan Beaudette > > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Is there an elegant solution to migrating an entire location/mapset to a > > new DB backend? I am thinking about moving all of the tables stored in > > DBF to sqlite, however there are a lot of vectors-- and I was hoping to > > avoid changing the connection and copying each one manually. > > > > Ideas? > > Maybe I am missing something but isn't it as easy as > - create new mapset > - set SQLite or whatever with db.connect > - run a "for" loop on g.mlist output, therein g.copy > ? > > Ah, I see: we want this recursively for all mapsets in the location... > Another option is to do it within the actual mapset, renaming first > all maps to a temporary name, then db.connect, then g.copy > locally to the previous name and removal of the temporary maps.
Right- that seems like the best solution for now. > Since GRASS can be easily batch'ed, this could be done > also for the entire location. Maybe Python would be more robust > and portable at this point (yes, wanted for GRASS 7 to change > to the new SQLite backend). > > Markus I'll post a simple script, and then we can work towards making a more robust version for conversions. Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user