[GRASS-user] migrate entire location/mapset to new DB backend?

Markus Neteler neteler at osgeo.org
Tue Oct 21 14:20:41 EDT 2008


On Tue, Oct 21, 2008 at 6:01 PM, Dylan Beaudette
<dylan.beaudette at gmail.com> 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.

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


More information about the grass-user mailing list