Convert all GRASS 6 vector maps to GRASS 7

From GRASS-Wiki
Revision as of 22:57, 15 March 2013 by Neteler (talk | contribs) (+Can I reopen the vector maps later in GRASS GIS 6?)
Jump to navigation Jump to search

Convert automatically all GRASS 6 vector maps to GRASS 7 (including attribute transfer from DBF to SQLite)

To become usable in GRASS 7, all vector maps in a mapset need to be updated to the improved vector file format (i.e., rebuild the topology with v.build.all along with the change to the SQLite database backend (new default in GRASS 7 instead of DBF in GRASS 6, using db.connect and v.db.reconnect.all).

Run this in GRASS 7:

# first rebuild topology for all vector maps
v.build.all

# set new default db connection (from DBF to new SQLite default)
db.connect -d

# copy attribute tables from old DB to new SQLite DB, delete old tables in DBF format
v.db.reconnect.all -cd

FAQ

Q: Can I reopen the vector maps later in GRASS GIS 6?

A: Yes, but you need to rebuild the topology. Hence, run this:

v.build.all

Then the vector maps of the current mapset will be readable by GRASS GIS 6 again.