I have some mapsets and i want to assemble them into one new mapset and have everything into it. How do i do it?
-
Why? you can access each mapset from one mapset– geneCommented May 28, 2015 at 19:49
-
i think i understand. Can you provide info on how to do it?– gsaCommented May 28, 2015 at 19:59
-
1Menu Settings/GRASS Working environment/Mapset access (g.mapset)– geneCommented May 28, 2015 at 20:08
2 Answers
Option 1 (if you have many maps, maybe too much effort):
- use r.pack/r.unpack or v.pack/v.unpack to export and import the data in a lossless way (they remain in the respective GRASS GIS format).
Option 2:
- Simply use g.mapsets (or g.mapsets -s for a GUI variant)) to add the other mapsets to the search path of the actually mapset and voilà you see all the maps.
Option 3:
- You can "hop" from one mapset to the next in a running session with g.mapset (note the absence of the 's'). Of course this is also reachable from the menu.
If you want to have the maps copied in the new Mapset, use:
- g.copy to copy one by one, e.g.
g.copy raster=streams@practice1,streams
- g.copyall to copy all at once (available in GRASS Addons, use
g.extension g.copyall
or GUI to install it) - you may want to delete the original maps (using g.remove) or whole Mapsets in order to save space
If you want to just access the maps for reading, use:
- use g.mapsets as markusN already suggested, for example
g.mapsets mapset=practice1,practice2 operation=add
To give a complete picture, in case Mapsets are in different Locations but Locations have exactly the same (!) projection and coordinate system, you can copy the Mapsets as directories. If you want to copy just few maps or you don't mind scripting, it is safer to use the "pack" modules (e.g. r.pack).
If you are not sure or if Locations have different projection, you have to use "proj" modules (e.g. r.proj) or g.proj.all module available in GRASS addons.